problem moving gmirror between two machines.

George Hartzell hartzell at alerce.com
Mon Nov 17 09:44:56 PST 2008


CmdLnKid writes:
 > On Sun, 16 Nov 2008 21:29 -0000, hartzell wrote:
 > 
 > > George Hartzell writes:
 > > >
 > > > I have an HP DL360 with a pair of 1TB seagate disks that's been
 > > > running -STABLE with a ZFS root partition set up using the tools
 > > > available here:
 > > >
 > > >   http://yds.coolrat.org/zfsboot.shtml
 > > >
 > > > It's been working great.  As part of trying to understand what's going
 > > > on, I csup'ed to -RELENG earlier today and rebuilt/installed the
 > > > kernel and world whilst running on the DL360, so everything should be
 > > > current.
 > > >
 > > > I tried to move the disks into an HP DL320 G4 and it fails to boot
 > > > because it can't find /dev/mirror/boot (which it wants to mount onto
 > > > /strap and then parts get nullfs'ed onto /boot and /rescue).  It gives
 > > > me the opportunity to start a shell, and from that shell I can do a
 > > > zfs mount -a and get all of the zfs filesystems mounted, but there's
 > > > nothing in /dev/mirror.  No gmirror status and list are silent.
 > > >
 > > > I can move the disks back into the older machine and they work fine.
 > > >
 > > > I've run fdisk -s ad4 and bsdlabel -A /dev/ad4s1a and diffed the
 > > > output from the two machines and they're identical.
 > > >
 > > > I've booted with kern.geom.mirror.debug=2 and the DL320G4 tastes
 > > > /dev/ad4s1a (along with everything else) but doesn't do anything with
 > > > it.
 > > >
 > > > Any ideas?
 > > >
 > >
 > > [for the archives]
 > >
 > > Solved.  gmirror had been set up with -h specifying the device, and
 > > although the newer server used the same device names for its disks
 > > (ad[46]) it assigned them to different hot swap bays.  Once I switched
 > > the disks everything came up fine.
 > >
 > > g.
 > 
 > Wouldn't it be more feasible in this situation to just glabel the disks
 > and mount them from /dev/<fstype>/<label> instead. Might make your life 
 > easier in the future for swapping disks.
 > 
 > Example:
 > /dev/ufs/tmp on /tmp (ufs, asynchronous, local, gjournal)
 > /dev/ufs/usr on /usr (ufs, local, soft-updates)
 > /dev/ufs/var on /var (ufs, local, soft-updates)

Yep, something like that would definitely be an improvement, but the
situation's a bit different.  The failure was caused by trying to
mount /dev/mirror/boot on /strap (Yarema's naming choice), since
gmirror couldn't assemble /dev/ad[46]s1a into the mirror there *was*
no /dev/mirror/boot.  I think one could build a mirror using -h and
glabeled devices, alternately I'm almost certain that just not using
-h would have results in gmirror finding the slices regardless of the
device number they got.

I set this system up as an experiment to play with zfs on a root
filesystem, and in it's most recent configuration used a set of
scripts by Yarema, found here:

   http://yds.coolrat.org/zfsboot.shtml

When I asked Pawel about the gmirror funny business (at meetBSD over
the weekend) he asked me if the mirror had been set up with -h and I
had to sheepishly confess that I didn't know, since I'd just run
Yarema's stuff.

None of my dual-disk boot from gmirror'ed disks systems (based on
Ralf's approach, http://people.freebsd.org/~rse/mirror/) use -h and
I'd completely forgotten about it.

Having posted the question as a "mystery", I just thought it'd be
worth posting the outcome.

g.


More information about the freebsd-stable mailing list