The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Ron House <house@usq.edu.au>
To: linux-kernel@vger.kernel.org
Subject: hdparm and removable IDE?
Date: Wed, 26 Mar 2003 14:41:50 +1000	[thread overview]
Message-ID: <3E812F8E.2030200@usq.edu.au> (raw)

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


             reply	other threads:[~2003-03-26  4:30 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-26  4:41 Ron House [this message]
2003-03-26 14:33 ` hdparm and removable IDE? 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3E812F8E.2030200@usq.edu.au \
    --to=house@usq.edu.au \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox