Hi, I bought an USB external hdd (500GB) to make my backups using dump... but, sometimes my sever recognize the hdd device /dev/sdb or /dev/sdc... my question is: How can I assign a fixed device for example /dev/sdc to my hdd? remember I use some scripts to do my backup and I am getting errors because the device changes from sdb to sdc and thanks in advance Israel __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
On Saturday 27 October 2007 12:20:31 Israel Garcia wrote:> Hi, I bought an USB external hdd (500GB) to make my > backups using dump... but, sometimes my sever > recognize the hdd device /dev/sdb or /dev/sdc... my > question is: How can I assign a fixed device for > example /dev/sdc to my hdd? remember I use some > scripts to do my backup and I am getting errors > because the device changes from sdb to sdc andI would imagine by manually mounting it -- Bobby
Israel Garcia wrote:> Hi, I bought an USB external hdd (500GB) to make my > backups using dump... but, sometimes my sever > recognize the hdd device /dev/sdb or /dev/sdc... my > question is: How can I assign a fixed device for > example /dev/sdc to my hdd? remember I use some > scripts to do my backup and I am getting errors > because the device changes from sdb to sdc andYou can always set up a udev rule that will give the drive a known alias (e.g. "backup_drive") based on some fixed information that is stored in sysfs (such as vendor or model). Your scripts can then use the alias instead of the real drive name. This article is a little out of date, but might be useful: http://www.redhat.com/magazine/002dec04/features/udev/ Michael
Israel Garcia ha scritto:> Hi, I bought an USB external hdd (500GB) to make my > backups using dump... but, sometimes my sever > recognize the hdd device /dev/sdb or /dev/sdc... my > question is: How can I assign a fixed device for > example /dev/sdc to my hdd? remember I use some > scripts to do my backup and I am getting errors > because the device changes from sdb to sdc and > > thanks in advance > Israel > > >Another quick and dirty way: put a file (maybe an hiden file) on your device, and on top of your script search for that file on the various disks... Cheers Lorenzo Quatrini