Fedora Core 2 on a Dell Inspiron 8600
Hotswap Modular Drive Bay Outline.
Latest Updates 18/8/05
Tim Stadelmann's website has changed and is know located here.
Also of note Jean-Eric Cuendet has done a gnome applet to interface to the main program also available at Tim's site. Installing the applet was a little problematic in that I don't install applets very often. It was looking to load the gnomeapplet module which wasn't available. I needed to install the gnome-applets package from yum.
To satisfy the dependency I tried installing a gnome applet with yum extender to get the dependencies. This got the applet running. Restart the GUI once installed then right click the panel, select add to panel and scroll to the Hotswap applet.
Once running, simply right click and select remove or rescan as is appropriate. I am currently running Fedora Core 4. With this version the hotswaprc and cdrom.sh files aren't needed. FC4 soon notices the cd-rom is there.
The Dell has a drive swap bay. When I bought the Dell I also purchased a spare battery to go in the bay. Most of the time I use both batteries but occasionally need to use the DVD+RW combo drive. I have read a couple of Linux laptop pages that have reported success using the idectl script that comes with the hdparm source. This does seem to register the device and saves using hdparm directly. This doesn't help with then mounting the drive once registered with the kernel which is a consideration for me.
Looking further I came across Tim Stadelmann's Hotswap page. He has created a program called hotswap to do the job of the idectl scrip as well as included kde and motif frontends. He has also created a facility to run scripts before and after registering and unregistering devices.
While people have reported success with these sorts of methods there is obviously some degree of risk involved. Use this sort of information at your own risk and as a reference only. Be particularly careful if swapping a second hard drive as you may corrupt the data.
You can download the source from Tim's site or try the packages from the DAG repository. To compile the source do a ./configure, make and make install. As I don't have kde I needed to do ./configure --disable-kde-frontend. The program can then be run at the command line by calling "hotswap" by itself which will offer to configure a new device. Options can be passed to the command instead if preferred. See the man pages for more detail.
# man hotswap
To run the gui frontend call xhotswap to run the motif frontend or khotswap if you installed the kde frontend.
As I mentioned previously there is there is the option to run scripts when particular devices are registered and unregistered. This is done via an xml file called /etc/hotswaprc. I have created one that calls a script I wrote and placed in /usr/local/bin to create the mount point, fstab entry and device that FC2 will remove if the device is not present when booted. It is then simply a matter of clicking on the CD-ROM icon in the computer folder on your desktop. It haven't tested very extensively yet so probably best to create you own and test as you go. This works for my limited needs but look at the man page for more detail.
# man hotswaprc
It would also be a good idea to get suspend working at this point. This would allow you to put the system into suspend just before physically swaping the disc's and reduce any risk involved.