Missing zfs pools

Kevin Rauwolf sweetpea-freebsd at tentacle.net
Fri Mar 28 00:39:45 UTC 2014


I am running into a problem recovering data from an old backup.

I had a pool containing a mirror of two disks. I now have access to just
one of those disks, and I am trying to import the pool so that I can
copy files out. When I try to import, there seems to be no sign that the
pool exists.

# zpool import
# zpool import -D
# zpool list
no pools available
# zpool import -f zroot
cannot import 'zroot': no such pool available
# gpart list ada0
...
2. Name: ada0p2
   Mediasize: 1983218974720 (1.8T)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 1048576
   Mode: r0w0e0
   rawuuid: 7ada140b-4194-11e3-9da4-f46d04227f12
   rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
   label: freebsd-zfs
   length: 1983218974720
   offset: 1048576
   type: freebsd-zfs
   index: 2
   end: 3873476607
   start: 2048
...
# zdb -l /dev/gptid/7ada140b-4194-11e3-9da4-f46d04227f12
--------------------------------------------
LABEL 0
--------------------------------------------
    version: 5000
    name: 'zroot'
    state: 0
    txg: 0
    pool_guid: 3559240713814701742
    hostid: 740296715
    hostname: '######'
    top_guid: 5658684753042695532
    guid: 6772479201275930554
    vdev_children: 1
    vdev_tree:
        type: 'mirror'
        id: 0
        guid: 5658684753042695532
        metaslab_array: 33
        metaslab_shift: 34
        ashift: 12
        asize: 1983214256128
        is_log: 0
        create_txg: 4
        children[0]:
            type: 'disk'
            id: 0
            guid: 1772932453788439366
            path: '/dev/gptid/7a375bd1-4194-11e3-9da4-f46d04227f12'
            phys_path: '/dev/gptid/7a375bd1-4194-11e3-9da4-f46d04227f12'
            whole_disk: 1
            create_txg: 4
        children[1]:
            type: 'disk'
            id: 1
            guid: 6772479201275930554
            path: '/dev/gptid/7ada140b-4194-11e3-9da4-f46d04227f12'
            phys_path: '/dev/gptid/7ada140b-4194-11e3-9da4-f46d04227f12'
            whole_disk: 1
    features_for_read:
    create_txg: 0
Uberblock[0]
	magic = 0000000000bab10c
	version = 5000
	txg = 2436407
	guid_sum = 17763337121921767194
	timestamp = 1395437212 UTC = Fri Mar 21 14:26:52 2014
...

I have tried running Jeff Bonwick's "labelfix" tool, patched with recent
ZFS API changes, but it fails on the pwrite64 call that writes the
checksum. (That's why my txg is 4536407 in Uberblock 0; it's 0 in all of
the others.)

Any suggestions as to why import seems unable to find the existing pool?

-k


More information about the freebsd-fs mailing list