Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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. Is it possible to make sure a particular USB hard drive is mounted to a specific mount point (maybe based on volume label or ID)?

Alternatively, what is a good strategy to use USB drives with Amanda using an off-site rotation?

share|improve this question

migrated from stackoverflow.com Jan 14 '12 at 19:43

This question came from our site for professional and enthusiast programmers.

2 Answers 2

up vote 2 down vote accepted

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.

share|improve this answer

Udev 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.

share|improve this answer
    
this is a broken link –  amin Dec 25 '11 at 16:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.