Date: Fri, 2 Jan 2004 22:45:38 +0200 From: "Toomas Aas" <toomas.aas@raad.tartu.ee> To: questions@freebsd.org Subject: swapping external hard drives Message-ID: <200401022045.i02KjnrM023470@lv.raad.tartu.ee>
next in thread | raw e-mail | index | archive | help
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@raad.tartu.ee | http://www.raad.tartu.ee/~toomas/ * MCSE - Minesweeper Consultant and Solitaire Expert
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200401022045.i02KjnrM023470>