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 and
I would imagine by manually mounting it
On Sat, 2007-10-27 at 12:27 -0400, Bobby wrote:
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 and
I would imagine by manually mounting it
Ummm no, that is the problem I imagine, the device changes so it can't be mounted in his script.
I can't think of a solution right off hand.
Paul
Paul wrote:
On Sat, 2007-10-27 at 12:27 -0400, Bobby wrote:
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 and
I would imagine by manually mounting it
Ummm no, that is the problem I imagine, the device changes so it can't be mounted in his script.
I can't think of a solution right off hand.
I suppose you could put a label on the drive (with tune2fs), then mount it by LABEL=xxxx... I dunno what else to suggest.
linux's crappy way of handling disk device names is one of my bigger gripes about it. its really messy in a SAN environment where there's several storage controllers. /dev/sdf could be almost -anything-. I prefer the c1t1d1 notation of traditional Unix systems like Solaris, although there still can be issues identifying the channel #s
On Sat, 2007-10-27 at 10:28 -0700, John R Pierce wrote:
Paul wrote:
I suppose you could put a label on the drive (with tune2fs), then mount it by LABEL=xxxx... I dunno what else to suggest.
linux's crappy way of handling disk device names is one of my bigger gripes about it. its really messy in a SAN environment where there's several storage controllers. /dev/sdf could be almost -anything-. I prefer the c1t1d1 notation of traditional Unix systems like Solaris, although there still can be issues identifying the channel #s
udev takes care to provide unique names to disk devices. By label, or by uuid. Take a look at /dev/disk/by-label or /dev/disk/by-uuid, and use those entries as device names.
ciao andrea
John R Pierce wrote:
Paul wrote:
On Sat, 2007-10-27 at 12:27 -0400, Bobby wrote:
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 and
I would imagine by manually mounting it
Ummm no, that is the problem I imagine, the device changes so it can't be mounted in his script.
I can't think of a solution right off hand.
I suppose you could put a label on the drive (with tune2fs), then mount it by LABEL=xxxx... I dunno what else to suggest.
Another option could be to create a custom UDEV rule for the device
linux's crappy way of handling disk device names is one of my bigger gripes about it. its really messy in a SAN environment where there's several storage controllers. /dev/sdf could be almost -anything-. I prefer the c1t1d1 notation of traditional Unix systems like Solaris, although there still can be issues identifying the channel #s _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
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
--On Saturday, October 27, 2007 2:16 PM -0400 "Michael D. Kralka" michael.kralka@kvs.com wrote:
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:
Here's a howto for using labeled USB drives as "tape drives" with the Bacula backup system:
http://sourceforge.net/docman/display_doc.php?docid=47704&group_id=50727
Kenneth Porter wrote:
--On Saturday, October 27, 2007 2:16 PM -0400 "Michael D. Kralka" michael.kralka@kvs.com wrote:
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:
What if you have more than one identical device and might want to plug more than one in at once?
Les Mikesell wrote:
Kenneth Porter wrote:
--On Saturday, October 27, 2007 2:16 PM -0400 "Michael D. Kralka" michael.kralka@kvs.com wrote:
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:
What if you have more than one identical device and might want to plug more than one in at once?
I would suspect including the serial number (along with vendor and model) to the udev rules would suffice. The probability that two devices will have a matching vendor, model, and serial number is infinitesimal, if not zero.
Cheers, 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