[ltp] Mounting new Ultrabay drive

Richard Neill linux-thinkpad@linux-thinkpad.org
Wed, 17 Dec 2008 01:39:53 +0000


John Jason Jordan wrote:
> My new adapter and 500 GB Samsung drive have arriven! I Installed the
> drive into the adapter, plugged it into my T61, and used gparted on
> my Intrepid x86_64 operating system to make one partition out of it
> and format it ext3 (465 GB). So far so good. I made a folder
> /media/disk2 and mounted it there.
> 
> Now I want it mounted there automatically on boot, so I need to add
> it to fstab. But what if the CD/DVD drive is in the bay when I boot?
> Here is my current fstab:
> 
> # /etc/fstab: static file system information. # <file system> <mount
> point>   <type>  <options>       <dump>  <pass> proc            /proc
> proc    defaults        0       0 # /dev/sda2 
> UUID=afba6df9-befb-4643-a209-841c2476a989 /               ext3
> defaults,errors=remount-ro,relatime 0       1 # /dev/sda1 
> UUID=b9dcb4d9-cb1e-42be-8869-ae0624b08f31 none            swap    sw
> 0       0 /dev/scd0       /media/cdrom0   udf,iso9660
> user,noauto,exec 0       0
> 
> Using tune2fs the UUID for the new drive is
> ead5354d-a2a8-4858-904c-753be3b65cf1. Can someone tell me how to edit
> the above fstab so whatever is in the Ultrabay will be automatically
> mounted at boot, yet not give me error messages about the other
> device being missing or hang the boot process? 

I think you should just be able to go ahead and put it in fstab. Whether 
it gets mounted or not at boot depends on the "noauto" keyword - see man 
fstab. If the drive isn't physically present, (but is "expected" in 
fstab) nothing bad will happen to the boot process, provided that you 
haven't got anything important (eg /home) mounted there.


 > Also, can the optical
 > and hard drive be hot swapped? If so, how?

As for hotswap, the important thing is that you can unmount the device. 
Once that's done, it should be easy - I *think* it's just a matter of 
using "eject", and unplugging it (provided both devices are SATA).
You should check this though.

Richard


P.S. Note that you can't unmount a device which is busy. So make sure no 
programs are accessing it, or have their current directory on it.

P.P.S. /media is usually reserved for "removable" media. It's a matter 
of taste, but you may prefer to use /mnt, or even something dedicated 
such as  /backup .