swapping external hard drives
Toomas Aas
toomas.aas at raad.tartu.ee
Fri Jan 2 12:45:54 PST 2004
Hello!
OS version: 4.9-RELEASE-p1.
'device firewire' and 'device sbp' compiled into kernel.
I've bought two external FireWire drives (Maxtor 5000DV) as a cheap
backup media. The idea is to use Amanda, define 5 "virtual tapes" on
each disk, and swap the disk at the end of every week, keeping one of
them off-site.
So I fdisked, disklabelled and newfsed the drives and added the
following to /etc/fstab:
/dev/da0s1e /backup ufs rw,noauto 0 0
Now I could mount the partition by just typing 'mount /backup', and
copy files to it. Nice.
However, when I umount /backup and remove the drive, the da0 device
somehow remains active (can be seen with 'camcontrol devlist'). When I
then plug in the second drive, it becomes da1, which spoils all my
beautiful backup plans. I would prefer that when I remove one drive and
plug in the other, it becomes da0 again. So I need to get the 'old' da0
entry to go away when unplugging the drive. How can I do that?
I tried 'camcontrol rescan 0:0:0' after disconnecting the drive, but it
just hangs until I plug the drive back in. I tried 'camcontrol reset
0', but this returned error 0x6 (IIRC).
The other way I can think of would be to create a script which first
tries to 'mount /dev/da0s1e /backup' and then 'mount /dev/da1s1e
/backup' if the former fails. But I hope there is an easier way.
--
Toomas Aas | toomas.aas at raad.tartu.ee | http://www.raad.tartu.ee/~toomas/
* MCSE - Minesweeper Consultant and Solitaire Expert
More information about the freebsd-questions
mailing list