Messages in this thread | | | Date | Fri, 12 Nov 1999 01:53:30 +0100 | From | Francois-Rene Rideau <> | Subject | hot(un)plugging IDE disks |
| |
Dear Andre, dear Mark, dear Kernel Hackers, my latest craze is in cheap removable storage media, as embodied by IDE racks. And my problem (since I write to you) is about switching disks without rebooting, since I can't find a way to force the kernel to re-read the drive's geometry after driver initialization.
When I had a removable (actually external) SCSI drive on my IDE system, I just rmmod'ed the SCSI support, and insmod'ed it back, to force the kernel to re-probe for disks. I suppose that if I had a SCSI system, I could similarly rmmod and insmod back the IDE subsystem to force re-probe; however, since I boot on IDE, this is not an option. So I need some way to reconfigure IDE without rebooting; maybe a new option to hdparm (or maybe a rewrite of hdparm with a more consistent design of command-line invocation). It would also be nice to be able to _atomically_ flush all buffers for a drive and its partitions, stop the drive, wait for the drive to be done, and return to the user; in case some partition is mounted, the program would give an error, or only warning if forced; it would autodetect (and flush) partitions, rather than try to deduce them through a lot of non-reliable userland grepping through the output of fdisk -l.
So, what's the Right Thing(tm) to do? Does what I am looking for already exist? If not, what programs/drivers/foo should be hacked?
PS: with racks come the want of being able to have a linux disk that be bootable independently from its IDE *and* BIOS numbers. I see no way to nicely satisfy _both_ constraints in the way things are done currently. Being BIOS independent would mean some enhancements to LILO. Being IDE independent would mean being able to mount paritions by logical internal ID numbers rather than by physical disk settings.
PPS: IDE racks are truly a great way to manage personal computer storage; it's much cheaper, faster, and bigger storage than anything like ZIP or JAZ or FOO, and it scales identically with hard disk technology. So you can have 16GB to 35GB of removable storage, and more as harddisks get better, without having to purchase a new reader. The rack itself is under $15. You also get cheap random-access backup of your data; actually, the backup process takes 0 second, if, like me, you just get a new disk when the old one is full, and keep the old one as "backup". Racks also allow you to easily exchange disks with friends, service disks on new computers; upgrade your computer and keep the same disk, etc.
PPPS: I know such things are not "recommended". But they work, and make life easier, so why not use them?
P^4S: hotplug/hotunplug support could be a great addition to the Linux software RAID drivers... "Using Linux, transform inexpensive vanilla hardware into reliable RAID arrays that you can service without rebooting". THAT would be a great slogan!
[ "Faré" | VN: Уng-Vû Bân | Join the TUNES project! http://www.tunes.org/ ] [ FR: François-René Rideau | TUNES is a Useful, Nevertheless Expedient System ] [ Reflection&Cybernethics | Project for a Free Reflective Computing System ] No matter what language you use, a Cunning Compiler(TM) will be able to find an efficient implementation for whatever apparently difficult problem you specify. However, a Cunning Compiler(TM) is itself an AI-complete problem.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |