ZFS Recover Metadata
Machine: VirtualBox 64bit Ubuntu Server 13.04 with ZFS on Linux from
ppa:zfs-native/stable
ZFS Device: Single 1TB External USB HDD attached to the host, exposed to
VirtualBox as a raw disk to avoid VBox USB overhead.
I realize this is not the best environment to use ZFS (may in fact be one
of the worst), but it works remarkably well. Except for today...
# zpool import bckbeta
cannot import 'bckbeta': one or more devices is currently unavailableWell,
that doesn't sound good - let's see the state...
# zpool import
pool: bckbeta
id: 10048683893201809261
state: FAULTED
status: The pool metadata is corrupted.
action: The pool cannot be imported due to damaged devices or data.
see: http://zfsonlinux.org/msg/ZFS-8000-72
config:
bckbeta FAULTED corrupted data
sdd1 ONLINEOuch, but ok, zdb says what...
# zdb -e bckbeta
Configuration for import:
vdev_children: 1
version: 5000
pool_guid: 10048683893201809261
name: 'bckbeta'
txg: 1845841
state: 1
vdev_tree:
type: 'root'
id: 0
guid: 10048683893201809261
children[0]:
type: 'disk'
id: 0
guid: 16471220313516150401
whole_disk: 0
metaslab_array: 33
metaslab_shift: 33
ashift: 9
asize: 1000198897664
is_log: 0
DTL: 132
create_txg: 4
path: '/dev/sdd1'
zdb: can't open 'bckbeta': No such device or address
What? zdb gives info, then says no such device?
# zdb -l /dev/sdd1
--------------------------------------------
LABEL 0
--------------------------------------------
version: 5000
name: 'bckbeta'
state: 1
txg: 1845841
pool_guid: 10048683893201809261
hostname: 'backup'
top_guid: 16471220313516150401
guid: 16471220313516150401
vdev_children: 1
vdev_tree:
type: 'disk'
id: 0
guid: 16471220313516150401
path: '/dev/sdd1'
whole_disk: 0
metaslab_array: 33
metaslab_shift: 33
ashift: 9
asize: 1000198897664
is_log: 0
DTL: 132
create_txg: 4
features_for_read:
--------------------------------------------
...snip identical for LABEL 1, 2, 3...It's clearly there.
So, if zdb can read it, what's actually corrupted? And is there any way to
recover from that error? import -f / -F / -fF simply gives the same
unavailable result.
It's just a backup set, so worst case all it takes is time to rerun the
backups, but I would much prefer to recover if possible. Considering
trying the ZFS forensics scrollback script, but that might be destructive.
No comments:
Post a Comment