ZFS pool data recovery
jonni at egarden.fi
Wed Feb 20 15:06:33 UTC 2013
On 18.02.2013 16:06, Jonni Nakari wrote:
> I started "zpool import -nfFX vault" but it seems to take quite long.
> Some more information about my system:
> zpool vault consists of 5 block devices:
> whole disks: ada1, ada2, ada3
> cache: ada0s1e
> log: ada0s1d
> The system boots from a UFS filesystem ada0s1a.
root@:/root # zpool import -nfFX vault
returned after few hours:
Would be able to return vault to its state as of Sun Feb 17 03:07:36 2013.
Would discard approximately 20 minutes of transactions.
So I ran
root@:/root # zpool import -fFX vault
and few hours later returned:
Pool vault returned to its state as of Sun Feb 17 03:07:36 2013.
Discarded approximately 20 minutes of transactions.
After that I could import the pool in the memstick environment. I
unmounted all ZFS file systems and exported the zpool and rebooted.
However when the system boots from the UFS root it fails to mount root
Trying to mount root from zfs:vault/root ...
Mounting from zfs:vault/root failed with error 2.
To get the system booting from ZFS root I tried several things including:
- recreating the /boot/zfs/zpool.cache,
- cloning the vault/root file system to vault/new_root,
- setting the mountpoint of the root file system to / and legacy,
- removed the cache and log devices from the zpool.
I finally gave up and copied the contents of the vault/root file system
to a UFS file system at ada0s1d and changed the system to mount root
from there. /tmp, /usr and /var are mounted fine from the ZFS.
I really would like to back using the ZFS root file system. I documented
the commands I used in the memstick environment and dmesgs of the
failing ZFS boots and made them available here:
Maybe someone can figure out what I'm doing wrong? Before the suspend to
RAM incident the system booted up just fine.
I used the following trick to get the dmesgs: when the system booted up
and failed to mount the ZFS root I entered ufs:da0 to the mountroot>
prompt to get in to the memstick environment.
jonni at egarden.fi
+358 50 4411 784
More information about the freebsd-questions