I passed through two devices to a VM running on proxmox and corrupted it.
If anyone else wants to virtualise TrueNAS using proxmox use these commands on the proxmox hypervisor first to prevent concurrent access on the device you are passing through:
systemctl disable --now zfs-import-scan.service
systemctl disable --now zfs-import-cache.service
reboot
Can anyone help recover the pool?
This is the error I get:
# zpool import datatank
cannot import 'datatank': one or more devices is currently unavailable
Here are the devices that were in the pool (in reality I used the by-id path, not sdX, but this is shorter to show):
# lsblk -o name,size,fstype,label,model,serial,mountpoint|grep 12.7
sdc 12.7T WDC WD140EFFX-68VBXN0 Z2KL9X12
└─sdc2 12.7T zfs_member datatank
sdd 12.7T WDC WD140EFFX-68VBXN0 Z2KNLX12
└─sdd2 12.7T zfs_member datatank
Here are the headers:
# zdb -l /dev/sdc2
------------------------------------
LABEL 0
------------------------------------
version: 5000
name: 'datatank'
state: 0
txg: 15493413
pool_guid: 16911827047402167892
errata: 0
hostid: 383395800
hostname: 'datatank'
top_guid: 11077806832579153414
guid: 13180809383598811762
vdev_children: 3
vdev_tree:
type: 'mirror'
id: 0
guid: 11077806832579153414
whole_disk: 0
metaslab_array: 65
metaslab_shift: 34
ashift: 12
asize: 13998367178752
is_log: 0
create_txg: 4
children[0]:
type: 'disk'
id: 0
guid: 8569546290774946668
path: '/dev/sdb'
devid: 'scsi-0QEMU_QEMU_HARDDISK_drive-scsi2'
phys_path: 'pci-0000:01:03.0-scsi-0:0:0:2'
whole_disk: 1
DTL: 21406
create_txg: 4
children[1]:
type: 'disk'
id: 1
guid: 13180809383598811762
path: '/dev/sda'
devid: 'scsi-0QEMU_QEMU_HARDDISK_drive-scsi1'
phys_path: 'pci-0000:01:02.0-scsi-0:0:0:1'
vdev_enc_sysfs_path: '/sys/class/enclosure/6:0:0:0/Slot 05'
whole_disk: 1
DTL: 9036
create_txg: 4
features_for_read:
com.delphix:hole_birth
com.delphix:embedded_data
com.delphix:device_removal
com.klarasystems:vdev_zaps_v2
labels = 0 1 2 3
# zdb -l /dev/sdd2
------------------------------------
LABEL 0
------------------------------------
version: 5000
name: 'datatank'
state: 0
txg: 15493413
pool_guid: 16911827047402167892
errata: 0
hostid: 383395800
hostname: 'datatank'
top_guid: 11077806832579153414
guid: 8569546290774946668
vdev_children: 3
vdev_tree:
type: 'mirror'
id: 0
guid: 11077806832579153414
whole_disk: 0
metaslab_array: 65
metaslab_shift: 34
ashift: 12
asize: 13998367178752
is_log: 0
create_txg: 4
children[0]:
type: 'disk'
id: 0
guid: 8569546290774946668
path: '/dev/sdb'
devid: 'scsi-0QEMU_QEMU_HARDDISK_drive-scsi2'
phys_path: 'pci-0000:01:03.0-scsi-0:0:0:2'
whole_disk: 1
DTL: 21406
create_txg: 4
children[1]:
type: 'disk'
id: 1
guid: 13180809383598811762
path: '/dev/sda'
devid: 'scsi-0QEMU_QEMU_HARDDISK_drive-scsi1'
phys_path: 'pci-0000:01:02.0-scsi-0:0:0:1'
vdev_enc_sysfs_path: '/sys/class/enclosure/6:0:0:0/Slot 05'
whole_disk: 1
DTL: 9036
create_txg: 4
features_for_read:
com.delphix:hole_birth
com.delphix:embedded_data
com.delphix:device_removal
com.klarasystems:vdev_zaps_v2
labels = 0 1 2 3

