Academic exercise: trying to recover a corrupted pool

Borja Marcos borjam at sarenet.es
Mon Jan 8 14:31:44 UTC 2018


Hi,

ONLY AS AN ACADEMIC EXERCISE, WARNING :)

I have a broken ZFS pool and I’m wondering wether it should be readable. The pool was made with four
apparently troublesome OCZ SSD drives pulled from other systems. They are connected to a LSI2008 adapter.

The pool was created as a raidz2, so it’s supposed to survive the loss of two drives. It has lost two of them
and I am unable to import it.

I have lost no useful data, I was using it just for testing. Now it has become an interesting study subject though :)

Any ideas? I have tried to recover even doing the “radical thing” (zdb -Z -AAA -e -p /dev poolname). No success.

Again, I am just curious.


Thanks!




Borja.
 

Now, the data

If I try to recover it using zdb -e -X I get this:

# zdb -e -X  cashopul

Configuration for import:
        vdev_children: 1
        version: 5000
        pool_guid: 585029935900186516
        name: 'cashopul'
        state: 0
        hostid: 605799378
        hostname: ''
        vdev_tree:
            type: 'root'
            id: 0
            guid: 585029935900186516
            children[0]:
                type: 'raidz'
                id: 0
                guid: 17478362601057626606
                nparity: 2
                metaslab_array: 40
                metaslab_shift: 34
                ashift: 12
                asize: 2048421527552
                is_log: 0
                create_txg: 4
                children[0]:
                    type: 'disk'
                    id: 0
                    guid: 5865132871942380009
                    path: '/dev/da2'
                    whole_disk: 1
                    not_present: 1
                    DTL: 10392
                    create_txg: 4
                children[1]:
                    type: 'disk'
                    id: 1
                    guid: 17151294206067279763
                    path: '/dev/da2'
                    whole_disk: 1
                    DTL: 10391
                    create_txg: 4
                children[2]:
                    type: 'disk'
                    id: 2
                    guid: 4780356075228908448
                    whole_disk: 1
                    DTL: 10390
                    create_txg: 4
                    path: '/dev/da2'
                children[3]:
                    type: 'disk'
                    id: 3
                    guid: 4182482849823292334
                    whole_disk: 1
                    DTL: 10389
                    create_txg: 4
                    path: '/dev/da3'
zdb: can't open 'cashopul': Device not configured

ZFS_DBGMSG(zdb):




Reading the individual labels of the surviving drives,

# zdb -l /dev/da2
------------------------------------
LABEL 0
------------------------------------
    version: 5000
    name: 'cashopul'
    state: 0
    txg: 26855087
    pool_guid: 585029935900186516
    hostid: 605799378
    hostname: ''
    top_guid: 17478362601057626606
    guid: 4780356075228908448
    vdev_children: 1
    vdev_tree:
        type: 'raidz'
        id: 0
        guid: 17478362601057626606
        nparity: 2
        metaslab_array: 40
        metaslab_shift: 34
        ashift: 12
        asize: 2048421527552
        is_log: 0
        create_txg: 4
        children[0]:
            type: 'disk'
            id: 0
            guid: 5865132871942380009
            path: '/dev/da2'
            whole_disk: 1
            not_present: 1
            DTL: 10392
            create_txg: 4
        children[1]:
            type: 'disk'
            id: 1
            guid: 17151294206067279763
            path: '/dev/da2'
            whole_disk: 1
            DTL: 10391
            create_txg: 4
        children[2]:
            type: 'disk'
            id: 2
            guid: 4780356075228908448
            path: '/dev/da3'
            whole_disk: 1
            DTL: 10390
            create_txg: 4
        children[3]:
            type: 'disk'
            id: 3
            guid: 4182482849823292334
            path: '/dev/da4'
            whole_disk: 1
            DTL: 10389
            create_txg: 4
    features_for_read:
        com.delphix:hole_birth
        com.delphix:embedded_data
------------------------------------
LABEL 1
------------------------------------
    version: 5000
    name: 'cashopul'
    state: 0
    txg: 26855087
    pool_guid: 585029935900186516
    hostid: 605799378
    hostname: ''
    top_guid: 17478362601057626606
    guid: 4780356075228908448
    vdev_children: 1
    vdev_tree:
        type: 'raidz'
        id: 0
        guid: 17478362601057626606
        nparity: 2
        metaslab_array: 40
        metaslab_shift: 34
        ashift: 12
        asize: 2048421527552
        is_log: 0
        create_txg: 4
        children[0]:
            type: 'disk'
            id: 0
            guid: 5865132871942380009
            path: '/dev/da2'
            whole_disk: 1
            not_present: 1
            DTL: 10392
            create_txg: 4
        children[1]:
            type: 'disk'
            id: 1
            guid: 17151294206067279763
            path: '/dev/da2'
            whole_disk: 1
            DTL: 10391
            create_txg: 4
        children[2]:
            type: 'disk'
            id: 2
            guid: 4780356075228908448
            path: '/dev/da3'
            whole_disk: 1
            DTL: 10390
            create_txg: 4
        children[3]:
            type: 'disk'
            id: 3
            guid: 4182482849823292334
            path: '/dev/da4'
            whole_disk: 1
            DTL: 10389
            create_txg: 4
    features_for_read:
        com.delphix:hole_birth
        com.delphix:embedded_data
------------------------------------
LABEL 2
------------------------------------
    version: 5000
    name: 'cashopul'
    state: 0
    txg: 26855087
    pool_guid: 585029935900186516
    hostid: 605799378
    hostname: ''
    top_guid: 17478362601057626606
    guid: 4780356075228908448
    vdev_children: 1
    vdev_tree:
        type: 'raidz'
        id: 0
        guid: 17478362601057626606
        nparity: 2
        metaslab_array: 40
        metaslab_shift: 34
        ashift: 12
        asize: 2048421527552
        is_log: 0
        create_txg: 4
        children[0]:
            type: 'disk'
            id: 0
            guid: 5865132871942380009
            path: '/dev/da2'
            whole_disk: 1
            not_present: 1
            DTL: 10392
            create_txg: 4
        children[1]:
            type: 'disk'
            id: 1
            guid: 17151294206067279763
            path: '/dev/da2'
            whole_disk: 1
            DTL: 10391
            create_txg: 4
        children[2]:
            type: 'disk'
            id: 2
            guid: 4780356075228908448
            path: '/dev/da3'
            whole_disk: 1
            DTL: 10390
            create_txg: 4
        children[3]:
            type: 'disk'
            id: 3
            guid: 4182482849823292334
            path: '/dev/da4'
            whole_disk: 1
            DTL: 10389
            create_txg: 4
    features_for_read:
        com.delphix:hole_birth
        com.delphix:embedded_data
------------------------------------
LABEL 3
------------------------------------
    version: 5000
    name: 'cashopul'
    state: 0
    txg: 26855087
    pool_guid: 585029935900186516
    hostid: 605799378
    hostname: ''
    top_guid: 17478362601057626606
    guid: 4780356075228908448
    vdev_children: 1
    vdev_tree:
        type: 'raidz'
        id: 0
        guid: 17478362601057626606
        nparity: 2
        metaslab_array: 40
        metaslab_shift: 34
        ashift: 12
        asize: 2048421527552
        is_log: 0
        create_txg: 4
        children[0]:
            type: 'disk'
            id: 0
            guid: 5865132871942380009
            path: '/dev/da2'
            whole_disk: 1
            not_present: 1
            DTL: 10392
            create_txg: 4
        children[1]:
            type: 'disk'
            id: 1
            guid: 17151294206067279763
            path: '/dev/da2'
            whole_disk: 1
            DTL: 10391
            create_txg: 4
        children[2]:
            type: 'disk'
            id: 2
            guid: 4780356075228908448
            path: '/dev/da3'
            whole_disk: 1
            DTL: 10390
            create_txg: 4
        children[3]:
            type: 'disk'
            id: 3
            guid: 4182482849823292334
            path: '/dev/da4'
            whole_disk: 1
            DTL: 10389
            create_txg: 4
    features_for_read:
        com.delphix:hole_birth
        com.delphix:embedded_data





# zdb -l /dev/da3
------------------------------------
LABEL 0
------------------------------------
    version: 5000
    name: 'cashopul'
    state: 0
    txg: 26855087
    pool_guid: 585029935900186516
    hostid: 605799378
    hostname: ''
    top_guid: 17478362601057626606
    guid: 4182482849823292334
    vdev_children: 1
    vdev_tree:
        type: 'raidz'
        id: 0
        guid: 17478362601057626606
        nparity: 2
        metaslab_array: 40
        metaslab_shift: 34
        ashift: 12
        asize: 2048421527552
        is_log: 0
        create_txg: 4
        children[0]:
            type: 'disk'
            id: 0
            guid: 5865132871942380009
            path: '/dev/da2'
            whole_disk: 1
            not_present: 1
            DTL: 10392
            create_txg: 4
        children[1]:
            type: 'disk'
            id: 1
            guid: 17151294206067279763
            path: '/dev/da2'
            whole_disk: 1
            DTL: 10391
            create_txg: 4
        children[2]:
            type: 'disk'
            id: 2
            guid: 4780356075228908448
            path: '/dev/da3'
            whole_disk: 1
            DTL: 10390
            create_txg: 4
        children[3]:
            type: 'disk'
            id: 3
            guid: 4182482849823292334
            path: '/dev/da4'
            whole_disk: 1
            DTL: 10389
            create_txg: 4
    features_for_read:
        com.delphix:hole_birth
        com.delphix:embedded_data
------------------------------------
LABEL 1
------------------------------------
    version: 5000
    name: 'cashopul'
    state: 0
    txg: 26855087
    pool_guid: 585029935900186516
    hostid: 605799378
    hostname: ''
    top_guid: 17478362601057626606
    guid: 4182482849823292334
    vdev_children: 1
    vdev_tree:
        type: 'raidz'
        id: 0
        guid: 17478362601057626606
        nparity: 2
        metaslab_array: 40
        metaslab_shift: 34
        ashift: 12
        asize: 2048421527552
        is_log: 0
        create_txg: 4
        children[0]:
            type: 'disk'
            id: 0
            guid: 5865132871942380009
            path: '/dev/da2'
            whole_disk: 1
            not_present: 1
            DTL: 10392
            create_txg: 4
        children[1]:
            type: 'disk'
            id: 1
            guid: 17151294206067279763
            path: '/dev/da2'
            whole_disk: 1
            DTL: 10391
            create_txg: 4
        children[2]:
            type: 'disk'
            id: 2
            guid: 4780356075228908448
            path: '/dev/da3'
            whole_disk: 1
            DTL: 10390
            create_txg: 4
        children[3]:
            type: 'disk'
            id: 3
            guid: 4182482849823292334
            path: '/dev/da4'
            whole_disk: 1
            DTL: 10389
            create_txg: 4
    features_for_read:
        com.delphix:hole_birth
        com.delphix:embedded_data
------------------------------------
LABEL 2
------------------------------------
    version: 5000
    name: 'cashopul'
    state: 0
    txg: 26855087
    pool_guid: 585029935900186516
    hostid: 605799378
    hostname: ''
    top_guid: 17478362601057626606
    guid: 4182482849823292334
    vdev_children: 1
    vdev_tree:
        type: 'raidz'
        id: 0
        guid: 17478362601057626606
        nparity: 2
        metaslab_array: 40
        metaslab_shift: 34
        ashift: 12
        asize: 2048421527552
        is_log: 0
        create_txg: 4
        children[0]:
            type: 'disk'
            id: 0
            guid: 5865132871942380009
            path: '/dev/da2'
            whole_disk: 1
            not_present: 1
            DTL: 10392
            create_txg: 4
        children[1]:
            type: 'disk'
            id: 1
            guid: 17151294206067279763
            path: '/dev/da2'
            whole_disk: 1
            DTL: 10391
            create_txg: 4
        children[2]:
            type: 'disk'
            id: 2
            guid: 4780356075228908448
            path: '/dev/da3'
            whole_disk: 1
            DTL: 10390
            create_txg: 4
        children[3]:
            type: 'disk'
            id: 3
            guid: 4182482849823292334
            path: '/dev/da4'
            whole_disk: 1
            DTL: 10389
            create_txg: 4
    features_for_read:
        com.delphix:hole_birth
        com.delphix:embedded_data
------------------------------------
LABEL 3
------------------------------------
    version: 5000
    name: 'cashopul'
    state: 0
    txg: 26855087
    pool_guid: 585029935900186516
    hostid: 605799378
    hostname: ''
    top_guid: 17478362601057626606
    guid: 4182482849823292334
    vdev_children: 1
    vdev_tree:
        type: 'raidz'
        id: 0
        guid: 17478362601057626606
        nparity: 2
        metaslab_array: 40
        metaslab_shift: 34
        ashift: 12
        asize: 2048421527552
        is_log: 0
        create_txg: 4
        children[0]:
            type: 'disk'
            id: 0
            guid: 5865132871942380009
            path: '/dev/da2'
            whole_disk: 1
            not_present: 1
            DTL: 10392
            create_txg: 4
        children[1]:
            type: 'disk'
            id: 1
            guid: 17151294206067279763
            path: '/dev/da2'
            whole_disk: 1
            DTL: 10391
            create_txg: 4
        children[2]:
            type: 'disk'
            id: 2
            guid: 4780356075228908448
            path: '/dev/da3'
            whole_disk: 1
            DTL: 10390
            create_txg: 4
        children[3]:
            type: 'disk'
            id: 3
            guid: 4182482849823292334
            path: '/dev/da4'
            whole_disk: 1
            DTL: 10389
            create_txg: 4
    features_for_read:
        com.delphix:hole_birth
        com.delphix:embedded_data







More information about the freebsd-fs mailing list