From owner-freebsd-stable@FreeBSD.ORG Mon Oct 13 22:24:35 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 97A8F16A4B3 for ; Mon, 13 Oct 2003 22:24:35 -0700 (PDT) Received: from hermes.pressenter.com (hermes.pressenter.com [69.58.128.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id C2D6743FE0 for ; Mon, 13 Oct 2003 22:24:34 -0700 (PDT) (envelope-from nospam@hiltonbsd.com) Received: from [69.58.128.161] (helo=daggar.sbgnet.local) by hermes.pressenter.com with smtp (Exim 3.35 #1) id 1A9Hd3-000813-00; Tue, 14 Oct 2003 00:21:55 -0500 Date: Tue, 14 Oct 2003 00:21:17 -0500 From: Stephen Hilton To: Stephen Hilton Message-Id: <20031014002117.564b548f.nospam@hiltonbsd.com> In-Reply-To: <20031013023401.7eb10b1a.nospam@hiltonbsd.com> References: <20031011181109.J15184@vette.gigo.com> <20031013023401.7eb10b1a.nospam@hiltonbsd.com> X-Mailer: Sylpheed version 0.9.4 (GTK+ 1.2.10; i386-portbld-freebsd4.9) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: simokawa@sat.t.u-tokyo.ac.jp cc: freebsd-stable@freebsd.org cc: plasmaball@pchome.com.tw Subject: Re: Firewire on STABLE: Sane for drive-based backups? (SOLVED operator error) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Oct 2003 05:24:35 -0000 On Mon, 13 Oct 2003 02:34:01 -0500 Stephen Hilton wrote: > On Sat, 11 Oct 2003 18:11:54 -0700 (PDT) > Jason Fesler wrote: > > > > > I did not have much luck on digging through the archives. Does anyone have > > any sucess stories on using external firewire drives on the stable branch > > of freebsd? Does hot swap work? Can I mount, dd or ufsdump or > > newfs/rsync, then umount and unplug it cleanly? > > > > I'm considering my options for doing once-a-month backups, and tape just > > totally blows the budget. I'm currently using a second drive to produce > > snapshots, but that doens't leave me with any off-site backups without > > taking the system down to swap drives. > > > I have been using a Buslink 1394 Firewire HD model #FW80 72E on 2 > 4-STABLE systems for backup. The Firewire ports are onbord on an > ASUS P4PE and an ASUS P3B-1394 motherboard. > > Mounting and unmounting works fine, I do have troubles with hot swapping > though. > > > On the ASUS P3B-1394 system > > FreeBSD 4.9-RC cvsup'd and built/installed today > > Snips from my dmesg.boot > ----------------------------------------------------------------------- > fwohci0: mem 0xcb000000-0xcb003fff,0xcb800000-0xcb8007ff irq 11 at device 6.0 on pci0 > fwohci0: OHCI version 1.0 (ROM=1) > fwohci0: No. of Isochronous channel is 4. > fwohci0: EUI64 00:e0:18:00:00:00:16:bd > fwohci0: Phy 1394a available S400, 3 ports. > fwohci0: Link S400, max_rec 2048 bytes. > firewire0: on fwohci0 > sbp0: on firewire0 > fwohci0: Initiate bus reset > fwohci0: BUS reset > fwohci0: node_id=0xc800ffc1, gen=1, CYCLEMASTER mode > firewire0: 2 nodes, maxhop <= 1, cable IRM = 1 (me) > firewire0: bus manager 1 (me) > > sym0: <895> port 0xb000-0xb0ff mem 0xc9800000-0xc9800fff,0xca000000-0xca0000ff > irq 11 at device 10.0 on pci0 > sym0: Tekram NVRAM, ID 7, Fast-40, LVD, parity checking > firewire0: New S400 device ID:0030e001e000177c > Mounting root from ufs:/dev/da0s2a > da2 at sbp0 bus 0 target 0 lun 0 > da2: Fixed Simplified Direct Access SCSI-4 device > da2: 50.000MB/s transfers, Tagged Queueing Enabled > da2: 76319MB (156301488 512 byte sectors: 255H 63S/T 9729C) > da0 at sym0 bus 0 target 0 lun 0 > da0: Fixed Direct Access SCSI-3 device > da0: 80.000MB/s transfers (40.000MHz, offset 31, 16bit), Tagged Queueing Enabled > da0: 17501MB (35843670 512 byte sectors: 255H 63S/T 2231C) > da1 at sym0 bus 0 target 1 lun 0 > da1: Fixed Direct Access SCSI-2 device > da1: 80.000MB/s transfers (40.000MHz, offset 15, 16bit), Tagged Queueing Enabled > da1: 8683MB (17783240 512 byte sectors: 255H 63S/T 1106C) > ----------------------------------------------------------------------- > > > SCSI stuff from my kernel config file > ----------------------------------------------------------------------- > # using SCSI-IDE atapicam emulation for DVD/CDRW access. > device atapicam # emulate ATAPI devices as SCSI ditto via CAM > # needs CAM to be present (scbus & pass) > > # SCSI Controllers > device sym0 # NCR/Symbios Logic (newer chipsets) > device scbus0 at sym0 > device da0 at scbus0 target 0 > device da1 at scbus0 target 1 > options SYM_SETUP_SCSI_DIFF #-HVD support for 825a, 875, 885 > options SCSI_DELAY=3000 #Delay (in ms) before probing SCSI > # disabled:0 (default), enabled:1 > # SCSI peripherals > device scbus # SCSI bus (required) > device da # Direct Access (disks) > device sa # Sequential Access (tape etc) > device cd # CD > device pass # Passthrough device (direct SCSI access) > > # Firewire support > device firewire # Firewire bus code > device sbp # SCSI over Firewire (Requires scbus and da) > # device fwe # Ethernet over Firewire (non-standard!) > ----------------------------------------------------------------------- > > On bootup with my firewire drive plugged in everything is fine. > > Unplugging the firewire cable gives this in my console: > fwohci0: BUS reset > fwohci0: node_id=0xc800ffc0, gen=2, CYCLEMASTER mode > firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me) > firewire0: bus manager 0 (me) > > plugging the firewire cable back in gives this: > fwohci0: BUS reset > fwohci0: node_id=0xc800ffc1, gen=3, CYCLEMASTER mode > fwohci0: SID Error > > At this point I cannot mount the firewire drive anymore. > > I have tried using 'fwcontrol -r' but no luck. > > Any help or pointers appreciated. This was my operator error, the correct sequence for hot swapping this firewire hard drive on my motherboard is this: (this is with firewire and sbp devices compiled into my kernel) ... plug the firewire drive cable in run 'fwcontrol -r' mount the firewire drive do backups unmount the firewire drive unplug the firewire drive cable ... My PC and firewire drive would work fine on the first time plugin of the hard drive, but unplugging the drive and coming back later to plug in again needed the 'fwcontrol -r' to work properly. YMMV Another person also passed this tip on to me, he had been having trouble getting a different firewire device to hotswap and had better results using the firewire and sbp devices as kld's. With a kernel without firewire or sbp devices compiled in: kldload /modules/firewire.ko kldload /modules/sbp.ko mount the firewire drive do stuff unmount the firewire drive kldunload /modules/sbp.ko kldunload /modules/firewire.ko Thanks to all who helped. Regards, Stephen Hilton nospam@hiltonbsd.com