Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Dec 2010 03:28:27 +1100
From:      Geoff Roberts <geoff@apro.com.au>
To:        freebsd-questions@freebsd.org
Subject:   Re: zpool won't mount as dataset stuck
Message-ID:  <201012080328.27769.geoff@apro.com.au>
In-Reply-To: <20101128163048.21211cl7o3xpi8lc@aprosrv2.apro.com.au>
References:  <20101128163048.21211cl7o3xpi8lc@aprosrv2.apro.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

On Sun, 28 Nov 2010 04:30:48 pm Geoff Roberts wrote:
> Long and short is I can see the "tank" zpool without a problem, but
> whenever I try to import it the disk light flashes every second and
> the datasets won't mount.
> 
> I can run a history command on "tank" and that shows the following
> repeated every second (tgx keeps incrementing by one):
> 
> 2010-11-28.15:08:33 [internal rollback txg:9645688] dataset = 222
> [user root on systemname.com]
> 2010-11-28.15:08:34 [internal rollback txg:9645689] dataset = 222
> [user root on systemname.com]

Just for reference, I was able to use the steps below to recover the data of 
the zpool that was "stuck". The steps below were done using virtual machines. 
The zpool history command was a great help as well.

a) Created a FreeBSD 9.0 system and applied a ZFS v28 patch for a few features 
that looked useful for my problem.

i) Ability to mount zpool in readonly

ii) Ability to mount zpool with -N (do not mount datasets)

iii) Ability to mount zpool with -T to specify a particular transaction set. 
In the end I didn't need this feature.

b) Took an image of one of the mirror partitions housing the zpool using dd 
and transferred that to a file on a stand UFS2 file system. This was so I could 
work on a copy and transfer the data on an external hard disk to the FreeBSD 
9.0 virtual machine.

c) Used mdconfig to mount the file image on the FreeBSD 9.0 system.

d) I was able to use zpool import -o readonly=on -N poolname

The readonly option in particular seemed to stop the last transaction 
continually attempting to run in an endless loop.

e) I could then see the datasets. From here I was able to mount them and 
recover all the data.

Geoff




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