2

My raid-z zpool was in degraded mode, I have added a new disk in the zpool with the command:

zpool add -f  uhuru-test da3

The problem is that da3 have been accidentaly erased and now uhuru-test pool is not anymore seen by the system.

I have seen in another post that it is possible to get around this problem by simply creating a fake link to the missing device in order to restor the pool.-> zpool import with missing cache device

I would like to know if there's a way to restor my zpool without knowing the seconde missing vdev_children (The disk has been erased accidentaly).

But in my case here, I don't know the path. Is it possible to find that path in order to apply the same workaround ?

[root@freenas] ~# zdb -e uhuru-test   
Configuration for import:
        vdev_children: 2
        version: 5000
        pool_guid: 3890727615681066594
        name: 'uhuru-test'
        state: 0
        hostid: 1059643445
        hostname: ''
        vdev_tree:
            type: 'root'
            id: 0
            guid: 3890727615681066594
            children[0]:
                type: 'raidz'
                id: 0
                guid: 5640622817809203054
                nparity: 1
                metaslab_array: 35
                metaslab_shift: 26
                ashift: 12
                asize: 9648734208
                is_log: 0
                create_txg: 4
                children[0]:
                    type: 'disk'
                    id: 0
                    guid: 9465627518634333776
                    whole_disk: 1
                    create_txg: 4
                    path: '/dev/gptid/ff8706ce-ba30-11e5-9a01-000c296d1599'
                children[1]:
                    type: 'disk'
                    id: 1
                    guid: 10965176705017686540
                    whole_disk: 1
                    create_txg: 4
                    path: '/dev/gptid/ffaf2ac9-ba30-11e5-9a01-000c296d1599'
                children[2]:
                    type: 'disk'
                    id: 2
                    guid: 15466704642663781070
                    path: '/dev/gptid/ffd59e29-ba30-11e5-9a01-000c296d1599'
                    whole_disk: 1
                    not_present: 1
                    DTL: 202
                    create_txg: 4
            children[1]:
                type: 'missing'
                id: 1
                guid: 0
zdb: can't open 'uhuru-test': File exists


[root@freenas] ~# zpool import

   pool: uhuru-test
     id: 3890727615681066594
  state: UNAVAIL
 status: One or more devices are missing from the system.
 action: The pool cannot be imported. Attach the missing
    devices and try again.
   see: http://illumos.org/msg/ZFS-8000-6X
 config:

    uhuru-test                                      UNAVAIL  missing device
      raidz1-0                                      DEGRADED
        gptid/ff8706ce-ba30-11e5-9a01-000c296d1599  ONLINE
        gptid/ffaf2ac9-ba30-11e5-9a01-000c296d1599  ONLINE
        15466704642663781070                        UNAVAIL  cannot open

    Additional devices are known to be part of this pool, though their
    exact configuration cannot be determined.

I have tried to force to import the pool but without success.

cannot import 'uhuru-test': one or more devices is currently unavailable
[root@freenas] ~# zpool import -Ff uhuru-test
cannot import 'uhuru-test': one or more devices is currently unavailable
[root@freenas] ~# zpool import -FfN uhuru-test
cannot import 'uhuru-test': one or more devices is currently unavailable
[root@freenas] ~# zpool import -fN uhuru-test

Thanks for you help, Nadj

2
  • What happens if you try a forced export of uhuru-test followed by an import? Jan 16, 2016 at 13:52
  • @Andrew I tried this : zpool export -f uhuru-test I get this: cannot open 'uhuru-test': no such pool Do you know if I can get the information of the missing vdev_children? So maybe I can create a fake link to kind of make the system believe that is there to mount the zpool.*
    – Boina-n
    Jan 16, 2016 at 19:23

0

You must log in to answer this question.

Browse other questions tagged .