[CentOS] forcing device to USB HDD

Sat Oct 27 18:16:29 UTC 2007
Michael D. Kralka <michael.kralka at kvs.com>

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 and 

You 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