I have configured a server with Centos 5.2, and am now working out a backup strategy. I plan on using Amanda as the backup application. Additionally, I am leaning towards using some USB hard drives for backup storage. I will be swapping out one of the Hard Drives each week for an offsite back-up. Does anyone know whether it is possible to make sure a particular USB hard drive is mounted to a specific mount point (maybe based on volume label or ID?). Alternatively, any advice on a strategy to use USB drives with Amanda using an off-site rotation would be appreciated. Thanks in advance!
views:
1975answers:
2Udev is going to be your friend. You are able to setup rules so that each particular drive is assigned to your specified name for it. Then your mounting scripts can handle putting each named drive into the right spot.
A good tutorial on how to do this: rename a usb drive
Edit: The link work on the preview but not the live site. The link is: http://www.linuxconfig.org/Override_/_rename_your_usb_hard_drive'sdevicenamewithudev_rules
Edit #2: Edit the post to see the url properly.
I think what you want is mounting in fstab by UUID. I swiped this info (and example text) from here.
First, find out your device's UUID:
$ ls -l /dev/disk/by-uuid
lrwxrwxrwx 1 root root 10 2007-05-27 23:42 348ea9e6-7879-4332-8d7a-915507574a80 -> ../../hda4
lrwxrwxrwx 1 root root 10 2007-05-27 23:42 610aaaeb-a65e-4269-9714-b26a1388a106 -> ../../hda2
lrwxrwxrwx 1 root root 10 2007-05-27 23:42 857c5e63-c9be-4080-b4c2-72d606435051 -> ../../hda5
The UUID of each device is the big string of hex numbers and dashes. Once you have that, just put "UUID=857c5e63-c9be-4080-b4c2-72d606435051" into your fstab in place of the device name. Now your USB drive will always be mounted in the same place, even if you plug it into a different USB hub or have other USB devices.