zpool won't mount as dataset stuck
Geoff Roberts
geoff at apro.com.au
Tue Dec 7 16:28:45 UTC 2010
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
More information about the freebsd-questions
mailing list