[Scale] USB hard drive fail => recover data to SATA directly

Hi there,

I had a USB hard drive mounted in a pool (mono-drive). This morning the USB controller failed thus I connected the drive directly through SATA on the mobo. How can I re-import the pool without loosing any data? I tried a few things but I’m no ZFS expert…

# zpool import
  pool: SEAGATE4To
    id: 3256087210984663797
 state: UNAVAIL
status: One or more devices contains corrupted data.
action: The pool cannot be imported due to damaged devices or data.
   see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-5E
config:

        SEAGATE4To  UNAVAIL  insufficient replicas
          sda       UNAVAIL  invalid label

and

# zdb -l /dev/sda
failed to unpack label 0
failed to unpack label 1
------------------------------------
LABEL 2 (Bad label cksum)
------------------------------------
    version: 5000
    name: 'SEAGATE4To'
    state: 0
    txg: 15985425
    pool_guid: 3256087210984663797
    errata: 0
    hostid: 166578417
    hostname: 'truenas'
    top_guid: 17560909768970636071
    guid: 17560909768970636071
    vdev_children: 1
    vdev_tree:
        type: 'disk'
        id: 0
        guid: 17560909768970636071
        path: '/dev/disk/by-partuuid/3c0a7082-30ff-4912-8364-ae306b5bd769'
        whole_disk: 0
        metaslab_array: 256
        metaslab_shift: 34
        ashift: 12
        asize: 3998634213376
        is_log: 0
        DTL: 5820
        create_txg: 4
    features_for_read:
        com.delphix:hole_birth
        com.delphix:embedded_data
        com.klarasystems:vdev_zaps_v2
    labels = 2 3

The simple answer is that you can’t. Looks like the failing USB port took out the label. We reccomend against using USB for a reason.

Do you have a backup?

1 Like

I’ve just tried again with the usb controller and it worked!

I’m backing up all my data on another computer.

What is the best way to get rid of this usb controller and to connect all through SATA? (Now that I learned my lesson and that I opened the external hard drive!)

Thanks!

1 Like

Yep the old usb gotcha bit me awhile back too. lost a lot of data to it…I purchased a PCIE HBA adapter that drives 8 Sata drives and took all the USB stuff and put them directly on the HBA card. Then mirrored the drives in the pools. No problmes since.

1 Like

I had the same problem, look at this thread: