Want to mount different USB's as /dev/sda1
I consider myself fairly proficient at Slackware Linux, but for the life of me I cannot find out how to mount different USB drives as /dev/sda1.
The problem is that I have a script that makes a backup of Windows boxes, and dumps the files from the windows boxes in a mounted USB HD. The drives are rotated daily. Once the first drive is unmounted, and the second one plugged in, it is recognized as /dev/sdb. How in the heck can I get the second drive to be recognized as /dev/sda without rebooting the server???
My script looks like this:
#! /bin/bash
mount -t smbfs //<servername>/<servershare> /server1 -o username=administrator,password=*****
mount -t smbfs //<servername2>/<servershare> /server2 -o username=administrator,password=*****
mount /dev/sda1 /mnt/usb
cp /server1 /mnt/usb -R
cp /server2 /mnt/usb -R
umount /mnt/usb
umount /server1
umount /server2
I guess I could execute mounts of both /dev/sda1 and /dev/sdb1 on the same directory, let the non-existant device fail, and the valid device mount, but that seems cheezy.
Any help is appreciated...
Bob
Last edited by bobmac010; 01-22-2008 at 10:56 AM.
|