First, you'll need to disable USB boot / mass-storage device support in the BIOS, so that it doesn't try to boot from USB.
Then, you can lock in the SCSI device names so that no matter which order you plug in the devices, they will always be numbered the same. That way, the 3Ware array will always be da0 and the USB backup drive will always be da1.
You do this via /boot/loader.conf.
Get the device name, SCSI bus name, and target number via
camcontrol devlist:
Code:
# camcontrol devlist
<Kingston DataTraveler 2.0 1.00> at scbus0 target 0 lun 0 (da0,pass0)
<AMCC 9650SE-12M DISK 3.08> at scbus1 target 0 lun 0 (da1,pass1)
Here you see a USB drive and a 3Ware RAID controller, along with the scbus, and target info.
Check the output of
dmesg or
pciconf -vl to get the device names:
Code:
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <Kingston DataTraveler 2.0 1.00> Removable Direct Access SCSI-2 device
da0: 40.000MB/s transfers
da0: 1906MB (3905407 512 byte sectors: 255H 63S/T 243C)
da1 at twa0 bus 0 target 0 lun 0
da1: <AMCC 9650SE-12M DISK 3.08> Fixed Direct Access SCSI-5 device
da1: 100.000MB/s transfers
da1: 476827MB (976541696 512 byte sectors: 255H 63S/T 60786C)
Now you add the needed info into /boot/loader.conf, re-arranging the order so that the 3Ware card is always da0:
Code:
hint.scbus.0.at="da0"
hint.scbus.0.bus="0"
hint.da.0.at="scbus0"
hint.da.0.target="0"
hint.da.0.unit="0"
hint.scbus.1.bus="umass-sim0"
hint.da.1.at="scbus1"
hint.da.1.target="0"
hint.da.1.unit="0"
Now, if you reboot, you should get the devices in the right order, and be able to boot correctly with the USB drive plugged in and turned on.