The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* hdparm and removable IDE?
@ 2003-03-26  4:41 Ron House
  2003-03-26 14:33 ` Alan Cox
  0 siblings, 1 reply; 16+ messages in thread
From: Ron House @ 2003-03-26  4:41 UTC (permalink / raw)
  To: linux-kernel

Hi All,

I apologise that this question is coming from a user, but I believe the 
readers here are the only ones I can trust for a reliable answer, I have 
searched the Internet for many days during the last month for all 
available information, and due to the nature of the problem, I cannot 
tell whether any solution I write actually works properly.

The scenario: I have a ViPower hot-swap mobile rack for swapping IDE HDs 
on the fly. I am assuming that this device properly disconnects the 
hardware and that I am faced with a software problem. Our technical 
staff tell me that they have 'tested' hot swapping under RedHat 7.3 
(Kernel 2.4.18-3) and it 'works'. In other words, they unmounted, 
swapped, and mounted a new disk and didn't observe data loss. I am sure 
that they are mistaken that this is a reliable process, as I have read a 
great deal about the hdparm program and its -R and -U switches. But 
nothing that I can find explains exactly what is going on when hdparm is 
called; the man page is dreadfully vague.

I would like to write a utility that works as follows:

To unmount:
unmount partitions
Use hdparm -U to unregister
Auto-remove lines in fstab referring to removable device (to avoid 
marnings on bootup check)

To remount:
Use hdparm -R to register the new device
Auto-install lines in fstab relevant to removable device
mount partitions

My question: Given your knowledge of the innards of the kernel, does the 
above seem like a sound way to create a useful IDE hot-swap utility? As 
the simple unmount/remount strategy _seems_ to work, I am not confident 
that just programming this up and trying it will necessarily reveal any 
flaws, which is why I seek your advice.

Here are a few other factoids that may be relevant. This utility comes 
with Windoze drivers to set up hot-swapping. I installed them and they 
worked, but immediately Partition Magic started crashing Windoze 
whenever it was run. This behaviour even continued after uninstallation 
of the hot-swap drivers. Furthermore, at that point Linux started 
producing lines like this in /var/log/messages:

Mar 26 13:35:44 Loris kernel: hdd: dma_intr: status=0x51 { DriveReady 
SeekComplete Error }
Mar 26 13:35:44 Loris kernel: hdd: dma_intr: error=0x84 { 
DriveStatusError BadCRC }

(the above repeated half dozen or so times, then:)

Mar 26 13:35:44 Loris kernel: ide1: reset: success

After that, things work. I am startled that a Windoze driver has left an 
effect in the system that is felt by Linux. Everything looks OK in the 
bios setup, but I am not an expert and may have missed something.

Again, I apologise for a user posting on a kernel list, but I have done 
a lot of work looking for answers and I do believe this is the only 
place where solid understanding of the underlying problem is to be found.

Many thanks for any insight.

-- 
Ron House     house@usq.edu.au
               http://www.sci.usq.edu.au/staff/house


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2003-03-31 20:38 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-26  4:41 hdparm and removable IDE? Ron House
2003-03-26 14:33 ` Alan Cox
2003-03-26 18:11   ` Bill Davidsen
2003-03-28  3:21     ` Ron House
2003-03-28 14:04       ` Jeremy Jackson
2003-03-28 16:55         ` Alan Cox
2003-03-29 11:34         ` Andre Hedrick
2003-03-31  4:41           ` Ron House
2003-03-31  9:30             ` John Bradford
2003-03-31 11:08               ` Alan Cox
2003-03-31 11:21                 ` John Bradford
2003-03-31 11:43                   ` Alan Cox
2003-03-31 19:14         ` Bill Davidsen
2003-03-31 20:48           ` Jeremy Jackson
2003-03-28  3:03   ` Ron House
2003-03-28 17:17     ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox