From owner-freebsd-questions@FreeBSD.ORG Fri Jan 2 12:45:54 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 525A716A4CE for ; Fri, 2 Jan 2004 12:45:54 -0800 (PST) Received: from lv.raad.tartu.ee (lv.raad.tartu.ee [194.126.106.110]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D60343D3F for ; Fri, 2 Jan 2004 12:45:52 -0800 (PST) (envelope-from toomas.aas@raad.tartu.ee) Received: Message by Barricade lv.raad.tartu.ee with ESMTP id i02KjnrM023470 for ; Fri, 2 Jan 2004 22:45:50 +0200 Message-Id: <200401022045.i02KjnrM023470@lv.raad.tartu.ee> Received: from INFO/SpoolDir by raad.tartu.ee (Mercury 1.48); 2 Jan 04 22:45:50 +0200 Received: from SpoolDir by INFO (Mercury 1.48); 2 Jan 04 22:45:44 +0200 From: "Toomas Aas" Organization: Tartu City Government To: questions@freebsd.org Date: Fri, 2 Jan 2004 22:45:38 +0200 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Priority: normal Subject: swapping external hard drives X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2004 20:45:54 -0000 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