Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Firewire on STABLE: Sane for drive-based backups?

0 views
Skip to first unread message

Jason Fesler

unread,
Oct 11, 2003, 9:13:14 PM10/11/03
to

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.

--
Jason Fesler, <jfe...@gigo.com> http://gigo.com/resume.html
"Give a man fire, and he'll be warm for a day;
set a man on fire, and he'll be warm for the rest of his life."
_______________________________________________
freebsd...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stabl...@freebsd.org"

Daniel O'Connor

unread,
Oct 12, 2003, 1:41:16 AM10/12/03
to
On Sunday 12 October 2003 10:41, 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?

Yes, yes, yes, and yes.

> 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.

Firewire enclosures + hard disks are quite cost effective in my experience.

I have used a Maxtor "external hard disk" and a "Mapower" one -
http://www.mapower.com.tw/ - (both have the same chip in them), if I was
going to swap harddisks over a lot I would probably stump up for a "Drive
dock" though -> http://www.wiebetech.com/products/firewiredrivedock.html

They end up looking like SCSI disks, they perform very well (eg 20-30Mb/sec at
fairly low CPU usage).

--
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
-- Andrew Tanenbaum
GPG Fingerprint - 9A8C 569F 685A D928 5140 AE4B 319B 41F4 5D17 FDD5

Stephen Hilton

unread,
Oct 13, 2003, 3:35:43 AM10/13/03
to
On Sat, 11 Oct 2003 18:11:54 -0700 (PDT)
Jason Fesler <jfe...@gigo.com> 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: <Texas Instruments TSB12LV22> 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: <IEEE1394(FireWire) bus> on fwohci0
sbp0: <SBP2/SCSI over firewire> 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: <Oxford S OXFORD IDE Devic 0132> 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: <IBM DDYS-T18350N S96H> 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: <SEAGATE ST39173LW 6246> 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.


Regards,


Stephen Hilton
nos...@hiltonbsd.com

Daniel O'Connor

unread,
Oct 13, 2003, 10:12:20 AM10/13/03
to
<Hidetoshi Shimokawa CC'd>

I left the original message in tact to help with debugging.

I haven't see SID Error. The chipset I normally use is the
Agere/Lucent one
fwohci0: <Lucent FW322/323> mem 0xdc042000-0xdc042fff irq 11 at device 9.0 on pci0

but I do have a
fwohci0: <Texas Instruments TSB12LV26> mem 0xe9020000-0xe9023fff,0xe9026000-0xe90267ff irq 5 at device 10.0 on pci0

Both work with the Mapower enclosure, the guts of which is a
Sep 2 07:35:53 current kernel: da0: <Wise Adv Wise Advanced ID 0129> Fixed Simplified Direct Access SCSI-4 device

And a USB2/Firewire enclosure which looks like
Apr 26 12:56:05 alwinrc /kernel: da0: <Oxford 911D 0037> Fixed Simplified Direct Access SCSI-4 device

Although I have not verified that the latter enclosure works with the Ti
PCI card.
I have tried the Ti card in current but not stable, however the code is
pretty similar between the two I believe.

> I have tried using 'fwcontrol -r' but no luck.
>
> Any help or pointers appreciated.

Have you tried a different port?

--
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
-- Andrew Tanenbaum
GPG Fingerprint - 9A8C 569F 685A D928 5140 AE4B 319B 41F4 5D17 FDD5

_______________________________________________

Hidetoshi Shimokawa

unread,
Oct 13, 2003, 10:26:21 AM10/13/03
to
At Mon, 13 Oct 2003 23:40:52 +0930,

Daniel O'Connor wrote:
>
> <Hidetoshi Shimokawa CC'd>
> I left the original message in tact to help with debugging.

Thanks for sending me a copy.

> >
> > 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.

SID Error usually means hardware error.
What happens if you do 'fwcontrol -r' after that?

/\ Hidetoshi Shimokawa
\/ simo...@sat.t.u-tokyo.ac.jp
PGP public key: http://www.sat.t.u-tokyo.ac.jp/~simokawa/pgp.html

Stephen Hilton

unread,
Oct 13, 2003, 7:03:26 PM10/13/03
to
On Mon, 13 Oct 2003 23:23:09 +0900
Hidetoshi Shimokawa <simo...@sat.t.u-tokyo.ac.jp> wrote:

> At Mon, 13 Oct 2003 23:40:52 +0930,
> Daniel O'Connor wrote:
> >
> > <Hidetoshi Shimokawa CC'd>
> > I left the original message in tact to help with debugging.
>
> Thanks for sending me a copy.
>
> > >
> > > 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.
>
> SID Error usually means hardware error.
> What happens if you do 'fwcontrol -r' after that?
>
> /\ Hidetoshi Shimokawa
> \/ simo...@sat.t.u-tokyo.ac.jp
> PGP public key: http://www.sat.t.u-tokyo.ac.jp/~simokawa/pgp.html
>

OK after clean reboot:

daggar># mount /dev/da2s1c /mnt/firewire
daggar># ls -la /mnt/firewire
total 6060294
drwxr-xr-x 3 root wheel 512 May 27 07:34 .
drwxr-xr-x 10 root wheel 512 Jun 30 15:00 ..
drwxr-xr-x 6 root wheel 512 May 27 07:47 daggar
-rw-r--r-- 1 root wheel 6204180970 May 27 01:26 daggar_full_backup.tgz

Now unplug firewire cable for 1st time:

daggar># fwohci0: BUS reset
fwohci0: node_id=0x0800ffc0, gen=2, Bus reset failure
fwohci0: phy int
fwohci0: phy int
fwohci0: node_id=0x0800ffc0, gen=4, Bus reset failure
fwohci0: phy int
fwohci0: phy int
fwohci0: node_id=0x0800ffc0, gen=6, Bus reset failure
fwohci0: phy int
fwohci0: phy int
fwohci0: node_id=0x0800ffc0, gen=8, Bus reset failure
fwohci0: phy int
fwohci0: phy int
fwohci0: node_id=0x0800ffc0, gen=10, Bus reset failure
fwohci0: phy int
fwohci0: node_id=0xc800ffc0, gen=12, CYCLEMASTER mode


firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me)
firewire0: bus manager 0 (me)

daggar># fwcontrol -r

Plug cable back in:

WARNING: driver fw should register devices with make_dev() (dev_t = "#fw/0")


fwohci0: Initiate bus reset
fwohci0: BUS reset

fwohci0: node_id=0xc800ffc0, gen=13, CYCLEMASTER mode


firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me)
firewire0: bus manager 0 (me)

daggar># fwohci0: BUS reset
fwohci0: node_id=0xc800ffc1, gen=14, CYCLEMASTER mode
fwohci0: SID Error
daggar>#

unplug again

daggar>#
daggar># fwohci0: node_id=0x0800ffc0, gen=16, Bus reset failure
fwohci0: phy int
fwohci0: phy int
fwohci0: node_id=0x0800ffc0, gen=18, Bus reset failure
fwohci0: phy int
fwohci0: phy int
fwohci0: node_id=0x0800ffc0, gen=20, Bus reset failure
fwohci0: phy int
fwohci0: phy int
fwohci0: phy int
fwohci0: node_id=0x0800ffc0, gen=22, Bus reset failure
fwohci0: node_id=0xc800ffc0, gen=24, CYCLEMASTER mode


firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me)
firewire0: bus manager 0 (me)

daggar># fwcontrol -r


fwohci0: Initiate bus reset
fwohci0: BUS reset

fwohci0: node_id=0xc800ffc0, gen=25, CYCLEMASTER mode


firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me)
firewire0: bus manager 0 (me)

daggar># fwcontrol -r


fwohci0: Initiate bus reset
fwohci0: BUS reset

fwohci0: node_id=0xc800ffc0, gen=26, CYCLEMASTER mode


firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me)
firewire0: bus manager 0 (me)

daggar># fwcontrol -r


fwohci0: Initiate bus reset
fwohci0: BUS reset

fwohci0: node_id=0xc800ffc0, gen=27, CYCLEMASTER mode


firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me)
firewire0: bus manager 0 (me)

daggar># (da2:sbp0:0:0:0): lost device
daggar># fwcontrol -r


fwohci0: Initiate bus reset
fwohci0: BUS reset

fwohci0: node_id=0xc800ffc0, gen=28, CYCLEMASTER mode


firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me)
firewire0: bus manager 0 (me)

daggar>#

Plug cable back in:

daggar># fwohci0: BUS reset
fwohci0: node_id=0xc800ffc1, gen=29, CYCLEMASTER mode
fwohci0: SID Error


Hope this helps,


Stephen Hilton
nos...@hiltonbsd.com

plasma

unread,
Oct 13, 2003, 8:52:14 PM10/13/03
to
On Mon, Oct 13, 2003 at 06:02:09PM -0500, Stephen Hilton wrote:
> Plug cable back in:
>
> daggar># fwohci0: BUS reset
> fwohci0: node_id=0xc800ffc1, gen=29, CYCLEMASTER mode
> fwohci0: SID Error
>

I don't compile firewire into kernel now. I used to have this kind of
problem before, and nothing I could do about it. Now I just kldload
firewire when I need it, and kldunload it when I don't need it. If
this kind of problem occurs, just unload and reload the firwire
module. Remember, unload other dependent kernel modules.

Typically I'll use

> kldload /modules/firewire.ko
> kldload /modules/sbp.ko

If want to unload them:

> kldunload sbp.ko
> kldunload firewire.ko

Hope this helps.


plasma


==========================================================
DV,相機,手機等你拿!
http://edm-prg.epaper.com.tw/click.php?ad_code=25847
==========================================================
PChome線上購物週年慶:抽汽車、DV天天送
http://shopping.pchome.com.tw/
==========================================================

Hidetoshi Shimokawa

unread,
Oct 13, 2003, 11:06:02 PM10/13/03
to
At Mon, 13 Oct 2003 18:02:09 -0500,

Stephen Hilton wrote:
> daggar># fwohci0: BUS reset
> fwohci0: node_id=0xc800ffc1, gen=29, CYCLEMASTER mode
> fwohci0: SID Error

I'd like to know what happens if you run 'fwcontrol -r' after SID
Error with cable plugged.

Thanks,

_______________________________________________

Stephen Hilton

unread,
Oct 14, 2003, 11:07:58 AM10/14/03
to

> fwohci0: BUS reset

> 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.

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
nos...@hiltonbsd.com

0 new messages