Force usb drive to /dev/sdb1 ?

Robin Laing Robin.Laing at drdc-rddc.gc.ca
Fri Jan 19 19:52:21 UTC 2007


Mikkel L. Ellertson wrote:
> Gene Smith wrote:
>> I have a permanently connected usb hard drive for backups and it is
>> typically at /dev/sdb1. However, if I have other usb devices, such as a
>> SD card reader connected at boot, the backup drive moves to /dev/sdb2. I
>> do the backup by having cron run a script which mounts /dev/sdb1 and it
>> fails when the backup devices is at /dev/sdb2 (or it might mount the
>> card reader instead).
>>
>> Is there a way to ensure that the backup usb drive is *always* /dev/sdb1
>> even when other usb devices are attached during boot?
>>
>> Thanks,
>> -gene
>>
> It would probably be easer to use udev to create a persistent symlink
> for the drive. Then use the symlink when you want to access the drive.
> 
> Mikkel

I think labeling will be better and then access the /media/XYZ name.  I 
do this with my USB and SD cards.  It makes life much easier.  Then it 
doesn't matter what port they are plugged into or for that matter, what 
computer as they are always the same at work or home.

-- 
Robin Laing




More information about the users mailing list