Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Jan 2008 12:09:18 +0100
From:      "Daniel Eriksson" <daniel_k_eriksson@telia.com>
To:        <freebsd-stable@freebsd.org>
Cc:        pjd@FreeBSD.org
Subject:   RE: Multiple ZFS pools = panic on shutdown?
Message-ID:  <4F9C9299A10AE74E89EA580D14AA10A61A189A@royal64.emp.zapto.org>
In-Reply-To: <4F9C9299A10AE74E89EA580D14AA10A61A1899@royal64.emp.zapto.org>
References:  <4F9C9299A10AE74E89EA580D14AA10A61A1899@royal64.emp.zapto.org>

next in thread | previous in thread | raw e-mail | index | archive | help
I wrote:
> Has anyone heard of or experienced any panics ("vput:=20
> negative ref cnt" or "vrele: negative ref cnt") when
> shutting down a box with more than one zpool?

After doing some testing I've come up with the following simple steps to
recreate the panic:

1. Create the pools and then export them
2. Reboot the computer
3. Import the pools, touch some files on them and then export them again
4. Reboot again -> BOOM!


Create the pools
----------------
dd if=3D/dev/zero of=3D/usr/_disk1 bs=3D1m count=3D128
dd if=3D/dev/zero of=3D/usr/_disk2 bs=3D1m count=3D128
dd if=3D/dev/zero of=3D/usr/_disk3 bs=3D1m count=3D128
dd if=3D/dev/zero of=3D/usr/_disk4 bs=3D1m count=3D128
mdconfig -f /usr/_disk1 -u 1
mdconfig -f /usr/_disk2 -u 2
mdconfig -f /usr/_disk3 -u 3
mdconfig -f /usr/_disk4 -u 4
/etc/rc.d/zfs forcestart
zpool create tank1 mirror md1 md2
zpool create tank2 mirror md3 md4
touch /tank1/testfile
touch /tank2/testfile
zpool export tank1
zpool export tank2
/etc/rc.d/zfs forcestop
mdconfig -d -u 1
mdconfig -d -u 2
mdconfig -d -u 3
mdconfig -d -u 4

Import the pools
----------------
mdconfig -f /usr/_disk1 -u 1
mdconfig -f /usr/_disk2 -u 2
mdconfig -f /usr/_disk3 -u 3
mdconfig -f /usr/_disk4 -u 4
/etc/rc.d/zfs forcestart
zpool import tank1
zpool import tank2
touch /tank1/testfile
touch /tank2/testfile
zpool export tank1
zpool export tank2
/etc/rc.d/zfs forcestop
mdconfig -d -u 1
mdconfig -d -u 2
mdconfig -d -u 3
mdconfig -d -u 4


/Daniel Eriksson



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F9C9299A10AE74E89EA580D14AA10A61A189A>