3

I have a zpool with four disks:

  • /dev/disk/by-id/ata-SAMSUNG_HD103SJ_S246J9AZB03256
  • /dev/disk/by-id/ata-SAMSUNG_HD103SJ_S2NWJ50BB01630
  • /dev/disk/by-id/ata-SAMSUNG_HD103UJ_S13PJ90S328545
  • /dev/disk/by-id/ata-ST1000DM003-1CH162_Z1D8NBZ6

I tried and get:

sudo zpool list
no pools available
sudo zpool -DFa
no pools available to import

For each disk I tried using zdb like below and get similar result:

sudo zdb -el /dev/disk/by-id/ata-ST1000DM003-1CH162_Z1D8NBZ6-part1
------------------------------------
LABEL 0
------------------------------------
    version: 5000
    name: 'zfs-array-0'
    state: 0
    txg: 6025683
    pool_guid: 4080097585802041059
    errata: 0
    hostid: 118944001
    hostname: 'pve'
    top_guid: 12288797594631669026
    guid: 9380316338933775449
    vdev_children: 1
    vdev_tree:
        type: 'raidz'
        id: 0
        guid: 12288797594631669026
        nparity: 1
        metaslab_array: 134
        metaslab_shift: 34
        ashift: 12
        asize: 4000759939072
        is_log: 0
        create_txg: 4
        children[0]:
            type: 'disk'
            id: 0
            guid: 16244120337588681089
            path: '/dev/disk/by-id/ata-SAMSUNG_HD103SJ_S246J9AZB03256-part1'
            devid: 'ata-SAMSUNG_HD103SJ_S246J9AZB03256-part1'
            phys_path: 'pci-0000:01:00.1-ata-2'
            whole_disk: 1
            DTL: 956
            create_txg: 4
        children[1]:
            type: 'disk'
            id: 1
            guid: 11474276196065725623
            path: '/dev/disk/by-id/ata-SAMSUNG_HD103SJ_S2NWJ50BB01630-part1'
            devid: 'ata-SAMSUNG_HD103SJ_S2NWJ50BB01630-part1'
            phys_path: 'pci-0000:01:00.1-ata-6'
            whole_disk: 1
            DTL: 954
            create_txg: 4
        children[2]:
            type: 'disk'
            id: 2
            guid: 10378482137532375862
            path: '/dev/disk/by-id/ata-SAMSUNG_HD103UJ_S13PJ90S328545-part1'
            devid: 'ata-SAMSUNG_HD103UJ_S13PJ90S328545-part1'
            phys_path: 'pci-0000:01:00.1-ata-1'
            whole_disk: 1
            DTL: 953
            create_txg: 4
        children[3]:
            type: 'disk'
            id: 3
            guid: 9380316338933775449
            path: '/dev/disk/by-id/ata-ST1000DM003-1CH162_Z1D8NBZ6-part1'
            devid: 'ata-ST1000DM003-1CH162_Z1D8NBZ6-part1'
            phys_path: 'pci-0000:08:00.2-ata-4'
            whole_disk: 1
            DTL: 952
            create_txg: 4
    features_for_read:
        com.delphix:hole_birth
        com.delphix:embedded_data
    labels = 0 1 2 3

And then using the suggetions in zfs-import-unable-to-find-any-pools I tried and got

sudo zpool import -D -f zfs-array-0
cannot import 'zfs-array-0': no such pool available

I tried and got too

sudo zpool import -ad /dev/disk/by-id/ata-SAMSUNG_HD103SJ_S246J9AZB03256-part1 -ad /dev/disk/by-id/ata-SAMSUNG_HD103SJ_S2NWJ50BB01630-part1 -ad /dev/disk/by-id/ata-SAMSUNG_HD103UJ_S13PJ90S328545-part1 -ad /dev/disk/by-id/ata-ST1000DM003-1CH162_Z1D8NBZ6-part1
no pools available to import

The zpool was originally create in proxmox, I tried the same commands in there and in the manjaro, and get alls the same result. I'm using zfs-0.8.5-1 in manjaro. And zfs-0.8.4 in proxmox.

Finally, I'd like to know if someone has any idea how can I import the zpool or how to access the data in the zpool? And why this happened?

peregrinus
  • 31
  • 2

2 Answers2

2

I could import the pool by using the first partition of each disk. Something like this:

# zpool import -d /dev/disk/by-id/ata-disk1-part1 \
    -d /dev/disk/by-id/ata-disk2-part1 \
    -d /dev/disk/by-id/ata-disk3-part1 \
    pool_name
Ismael
  • 123
  • 6
0

My system got broken after I migrated from Ubuntu LTS 20.04 to 22.04.

I've created an USB Stick and booted into live mode.

There I could do "sudo zpool import -d /dev/disk/by-id/" (sudo was mandatory).

By doing so I've seen that in my case it was *-part4. Here you'll also see the pool name, in case you've forgot it.

In the last step I've monted as mentioned in Ismael's post:

zpool import -d /dev/disk/by-id/ata-disk1-part1 -d /dev/disk/by-id/ata-disk2-part1 -d /dev/disk/by-id/ata-disk3-part1 pool_name

Once the pool is mounted and if the data is imporatant, the first thing you should do is a backup to an usb drive or something similar.

nali
  • 101
  • 1