0

I have got a 3TB WD HDD which I used zfs to create a pool using proxmox.

I was copying data to the drive before a power failure occurred. Now i am unable to remount or import the drive at all on my new server.

It shows up in the storage section but i am unable to use zpool import -f MV-Storage-3TB without receiving an error

$zpool import -f MV-Storage-3TB
cannot import 'MV-Storage-3TB': one or more devices is currently unavailable

Listing Drives

/dev/sdb & /dev/sdc are in a pool while /dev/sde is a single zfs drive

$zpool import & zpool import -f zpool import results

$zfs list

zfs list output

$zpool status -x zpool status

Now if you notice that the drive /dev/sdb has a type of "Hard Disk" as well as the one bellow it They are a separate working zpool drives. If you notice within the red block the the drive /dev/sde has a type of "Unknown".

What I. have tried is:

  1. zpool import MV-Storage-3TB (ERROR: hostID does not match)
  2. zpool import -f MV-Storage-3TB (ERROR: one or more devices is currently unavailable)

Now with this command it returns nothing zpool import -nfF MV-Storage-3TB

I have done a scan with smartctl (completed with no error) and still after it has completed i am unable to mount/import the drive.

The issues with this drive is I need the data from it and the first thing i am going to do is create a backup off all it's contents.

Anyone have a similar issue that is able to assist me ? Please

3
  • You seem to have three 3TB disks, but you have not described the layout of your ZFS pool. If you have a redundant layout, you would probably need to reinitialize the failed drive to be resilvered into the pool. If your pool is not redundant and the disk cannot be recovered, the ZFS pool is no more. Instead of pictures of the output of some GUI tool, please paste the output of zfs list and zfs status -x into your question so others can clearly see the state of your pool and provide better troubleshooting. Oct 13, 2023 at 17:35
  • @GracefulRestart totally forgot to mention that /dev/sdb & /dev/sdc are in a pool. While /dev/sde is a single drive. will update the post shortly. Oct 13, 2023 at 19:01
  • @GracefulRestart post has been updated :) Oct 13, 2023 at 19:13

1 Answer 1

0

The solution is extremely simple.

This is how you find out if you can get access to the drive again.

zdb -e YourPoolName

For me, it took 10 hours to run, as my drive is 3 TB.

Once that has completed, the last output would look something like this:

ZFS_DBGMSG(zdb) START:
spa.c:6110:spa_import(): spa_import: importing MV-Storage-3TB
spa_misc.c:418:spa_load_note(): spa_load(MV-Storage-3TB, config trusted): LOADING
vdev.c:160:vdev_dbgmsg(): disk vdev '/dev/disk/by-id/ata-WDC_WD30EZRX-00MMMB0_WD-WCAWZ2611164-part1': best uberblock found for spa MV-Storage-3TB. txg 2756441
spa_misc.c:418:spa_load_note(): spa_load(MV-Storage-3TB, config untrusted): using uberblock with txg=2756441
spa.c:8392:spa_async_request(): spa=MV-Storage-3TB async request task=2048
spa_misc.c:418:spa_load_note(): spa_load(MV-Storage-3TB, config trusted): LOADED
spa.c:8392:spa_async_request(): spa=MV-Storage-3TB async request task=32
spa.c:8392:spa_async_request(): spa=MV-Storage-3TB async request task=4
spa.c:8392:spa_async_request(): spa=MV-Storage-3TB async request task=4
ZFS_DBGMSG(zdb) END

Now if you notice that we have a viable uberblock to use txg 2756441

Now we can do the following:

zpool import -f -T 2756441 readonly=on -F MV-Storage-3TB

That would take another maybe 10 hours for a 3 TB drive.

Once that ran, the drive was mounted and I could read from the drive.  Now the issue here is, if you reboot, this would not remount itself.  To remount/import it normally, all you have to do is:

zpool import -f -T 2756441 -F MV-Storage-3TB

Let that run and then reboot.  Once rebooted, you would be able to simply import the pool as normal.

zpool import -f MV-Storage-3TB

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .