GEOM_FOX?
Eric Anderson
anderson at centtech.com
Fri Sep 9 05:30:30 PDT 2005
What's the status on GEOM_FOX? This is very interesting to me, as I
have a lot of fiber channel/SAN backend now, and would like to utilize
multiple paths with FreeBSD.
Eric
Here's a note I found from phk@:
---------------------------------------------------------------------
I have just committed the GEOM_FOX class, see commit message below.
GEOM_FOX is named after the common red fox, which amongst other
traits have a liking for having multiple exits from its den.
GEOM_FOX will recognize a magic label on the device, and all devices
which come up with the same label will be assumed to be independent
paths to the same underlying physical device.
The first device found will name the created redundant device (I
need to work on that aspect because it makes the name a bit
unpredicatable right now).
If the currently used path to the device fails, GEOM_FOX will switch
to another path and retry the operation.
For anyone who wants to play with this, the following shell script
could be a beginning. It exploits the fact that the same file can
be used to back several MD(4) devices, so you need no special
hardware.
This will probably be most interesting for people with FibreChannel/SAN
hardware, but since the isp driver has very aggresive retrie policies
as it is now, the actual usability is still somewhat below par.
I'm sure both mjacob an I would appreciate any help we can get in
fixing this.
#!/bin/sh
set -ex
# cleanup
mdconfig -d -u 10 > /dev/null 2>&1 || true
mdconfig -d -u 20 > /dev/null 2>&1 || true
kldunload geom_fox > /dev/null 2>&1 || true
# Create a 4M disk image
dd if=/dev/zero of=fox.img bs=1k count=4096
# create a "disk" on it.
mdconfig -a -t vnode -f fox.img -u 10
# Put the GEOM::FOX label on it
echo "GEOM::FOX test-fox" | dd of=/dev/md10 conv=sync
# load the geom_fox module
kldload geom_fox
# add another path
mdconfig -a -t vnode -f fox.img -u 20
# remove it again
mdconfig -d -u 20
# add it again
mdconfig -a -t vnode -f fox.img -u 20
# remove the original path
mdconfig -d -u 10
# add it again
mdconfig -a -t vnode -f fox.img -u 10
# newfs the "fox"
newfs /dev/md10.fox
# fsck it
fsck_ffs /dev/md10.fox
# remove the currently primary path
mdconfig -d -u 20
# fsck it again
fsck_ffs /dev/md10.fox
# add a new secondary path
mdconfig -a -t vnode -f fox.img -u 30
# remove the primary
mdconfig -d -u 10
# fsck it again
fsck_ffs /dev/md10.fox
# Remove the primary and only path
mdconfig -d -u 30
# See what's left (hopefully nothing)
ls -l /dev/md*
--
------------------------------------------------------------------------
Eric Anderson Sr. Systems Administrator Centaur Technology
Anything that works is better than anything that doesn't.
------------------------------------------------------------------------
More information about the freebsd-geom
mailing list