Re: Hot Swap Disks

From: Keith Lofstrom (keithl_at_kl-ic.com)
Date: 01/20/04

  • Next message: Rui Miguel Seabra: "RE: Whitebox Linux"
    To: fedora-list@redhat.com
    Date: Tue, 20 Jan 2004 08:51:37 -0800
    
    

                                                                                    
    John Sutherland <fedora@sneeu.com> writes:
    > Is there anyway to turn off an IDE hard disk for hot swapping?

    Yes there is, but it is a bit of a kludge until a bug gets fixed.
    Alan Cox and others have written code that permits this, and the
    code is in the FC1 kernel.

    In theory, all you need to do is:

       unmount /dev/hdXXX # for all the partitions
       hdparm -b 0 /dev/hdX # for the whole drive

       # power down drive, swap, power up

       hdparm -b 1 /dev/hdX
       mount /dev/hdXXX /mntpoint # for all the partitions

    The "hdparm -b 0" command tristates the IDE controller lines so you
    can remove the drive without damaging the hardware. Of course, the
    drives should be in caddies so that the powerdown occurs properly.
    I like the Vipower cages for this.
       
    *** HOWEVER ***, there seems to be a bug in the process somewhere
    (see bugzilla.redhat.com #113693) that fails to upgrade the geometry
    tables for the drive. So, I end up doing this to restart the new drive:

       hdparm -b 1 /dev/hdX
       sfdisk /dev/hdX <control C> # !!!
       mount /dev/hdXXX /mntpoint # for all the partitions

    sfdisk seems to know enough to diddle the tables. This is risky,
    though; one wrong character typed into sfdisk and the drive is
    repartitioned. I would sure like a better technique, or else have
    the bug fixed.

    That said, I have done this dozens of times as part of my drive-to-drive
    backup scheme ( http://www.keithl.com/linuxbackup.html ) so if you are
    careful it should work until the bug gets fixed.

    Keith

    -- 
    Keith Lofstrom           keithl@ieee.org         Voice (503)-520-1993
    KLIC --- Keith Lofstrom Integrated Circuits --- "Your Ideas in Silicon"
    Design Contracting in Bipolar and CMOS - Analog, Digital, and Scan ICs
    -- 
    fedora-list mailing list
    fedora-list@redhat.com
    To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
    

  • Next message: Rui Miguel Seabra: "RE: Whitebox Linux"

    Relevant Pages

    • Re: 10.3 cannot find my cd/dvd after the install
      ... and so far Novell has not even responded to this. ... them was on a "T" power connector that was apparently faulty. ... but not in the way it was meant in the bug ... I have two drives. ...
      (alt.os.linux.suse)
    • Re: VAX VMS 7.3, ana/image running out of virtual memory ?
      ... It's a bug in LDdriver, I just reproduced it and it's present for a ... (presently doing a backup to see how much of the drive can be recuperated, but I have no idea how many files have had their actual data overwritten and which may not signal any error until you try to look at the actual contents). ... %ANALDISK-F-ALLOCMEM, error allocating virtual memory ... It broke the OSU web server and had now corrupted my main disk (just before I was to move it to new drives and get rid of this bound volume set). ...
      (comp.os.vms)
    • Re: etch installation fails on two machines
      ... in as a bug maintained by the debian-boot team. ... the install proceeding normally. ... - as i used the same hard disk in both computers and had another one lying ... my P-II is picky what drives it will tolerate. ...
      (Debian-User)
    • Re: 10.3 cannot find my cd/dvd after the install
      ... I'll open it up later on and see about the Master/slave issue. ... I have two drives, both of which were set on cable select. ... them was on a "T" power connector that was apparently faulty. ... but not in the way it was meant in the bug ...
      (alt.os.linux.suse)
    • [opensuse] Bugs? in SuSE11 or fundamental linux flaws? file bug(s)
      ... System wouldn't boot. ... Now it failed "fsck". ... Why are my drives being switch around randomly? ... I can file a routine bug for the 2nd, ...
      (SuSE)