Hello,
I've installed a PBS server as a virtual machine on PVE. Attached a external hard drive as ZFS pool. It was working fine but we suffered a power outage.
On reboot the ZFS pool was not there.
Here is what I tried :
I tried smartctl to see if there was any physical problem but as the disk is attached with a ASMedia USB bridge I can't see smart infos.
If anybody has an idea on how to get back my data that would ne wonderfull. If it's impossible I think I will destroy the partitions on the disk using fdisk and redo it from scratch, but that means redoing all my backups.
Thanks for your help
Regards
V.
I've installed a PBS server as a virtual machine on PVE. Attached a external hard drive as ZFS pool. It was working fine but we suffered a power outage.
On reboot the ZFS pool was not there.
Here is what I tried :
Code:
root@pbs:~# dmesg |grep sdb
[ 1.372620] sd 2:0:0:2: [sdb] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB)
[ 1.372656] sd 2:0:0:2: [sdb] Write Protect is off
[ 1.372658] sd 2:0:0:2: [sdb] Mode Sense: 63 00 00 08
[ 1.372769] sd 2:0:0:2: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 1.375823] sdb: sdb1 sdb9
[ 1.376512] sd 2:0:0:2: [sdb] Attached SCSI disk
root@pbs:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 32G 0 disk
├─sda1 8:1 0 1007K 0 part
├─sda2 8:2 0 512M 0 part
└─sda3 8:3 0 31.5G 0 part
├─pbs-swap 253:0 0 3.9G 0 lvm [SWAP]
└─pbs-root 253:1 0 23.8G 0 lvm /
sdb 8:16 0 931.5G 0 disk
├─sdb1 8:17 0 931.5G 0 part
└─sdb9 8:25 0 8M 0 part
sr0 11:0 1 1024M 0 rom
root@pbs:~# ls -la /dev/disk/by-id/
total 0
drwxr-xr-x 2 root root 300 Sep 15 14:20 .
drwxr-xr-x 8 root root 160 Sep 15 14:20 ..
lrwxrwxrwx 1 root root 9 Sep 15 14:20 ata-QEMU_DVD-ROM_QM00003 -> ../../sr0
lrwxrwxrwx 1 root root 10 Sep 15 14:20 dm-name-pbs-root -> ../../dm-1
lrwxrwxrwx 1 root root 10 Sep 15 14:20 dm-name-pbs-swap -> ../../dm-0
lrwxrwxrwx 1 root root 10 Sep 15 14:20 dm-uuid-LVM-I7Md2lgFHPqfbQfb9CcdRPHsDPAvotSx2uYkVxK3ghF7qzpVisRmUR5C4W6x0akA -> ../../dm-1
lrwxrwxrwx 1 root root 10 Sep 15 14:20 dm-uuid-LVM-I7Md2lgFHPqfbQfb9CcdRPHsDPAvotSxJsDAm2chlroWXaV8QBY1fgTMdf7wJdH4 -> ../../dm-0
lrwxrwxrwx 1 root root 10 Sep 15 14:20 lvm-pv-uuid-qB4eVV-RZ7S-QT7w-WK8p-G81T-Gh9t-23KUwY -> ../../sda3
lrwxrwxrwx 1 root root 9 Sep 15 14:20 scsi-0QEMU_QEMU_HARDDISK_drive-scsi0 -> ../../sda
lrwxrwxrwx 1 root root 10 Sep 15 14:20 scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Sep 15 14:20 scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Sep 15 14:20 scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-part3 -> ../../sda3
lrwxrwxrwx 1 root root 9 Sep 15 14:20 scsi-0QEMU_QEMU_HARDDISK_drive-scsi2 -> ../../sdb
lrwxrwxrwx 1 root root 10 Sep 15 14:20 scsi-0QEMU_QEMU_HARDDISK_drive-scsi2-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Sep 15 14:20 scsi-0QEMU_QEMU_HARDDISK_drive-scsi2-part9 -> ../../sdb9
root@pbs:~# zpool import -a -d /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi2-part1
cannot import 'BckDsk1T': I/O error
Destroy and re-create the pool from
a backup source.
root@pbs:~# zpool status -x
no pools available
root@pbs:~# zpool status -P
no pools available
root@pbs:~# zpool import -F
pool: BckDsk1T
id: 6864508705939350378
state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:
BckDsk1T ONLINE
sdb ONLINE
root@pbs:~# zpool list
no pools available
root@pbs:~# zpool import BckDsk1T
cannot import 'BckDsk1T': I/O error
Destroy and re-create the pool from
a backup source.
root@pbs:~# zpool status -x
no pools available
root@pbs:~# zpool upgrade -a
This system supports ZFS pool feature flags.
All pools are already formatted using feature flags.
Every feature flags pool already has all supported features enabled.
root@pbs:~# zpool import -F BckDsk1T
cannot import 'BckDsk1T': I/O error
Destroy and re-create the pool from
a backup source.
root@pbs:~# ls -la /mnt/datastore/
total 12
drwxr-xr-x 3 root root 4096 May 13 12:07 .
drwxr-xr-x 4 root root 4096 May 13 12:07 ..
drwxr-xr-x 2 root root 4096 May 13 12:07 BckDsk1T
root@pbs:~# ls -la /mnt/datastore/BckDsk1T/
total 8
drwxr-xr-x 2 root root 4096 May 13 12:07 .
drwxr-xr-x 3 root root 4096 May 13 12:07 ..
root@pbs:~# zpool import -nfFX -R /mnt/datastore/BckDsk1T/
pool: BckDsk1T
id: 6864508705939350378
state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:
BckDsk1T ONLINE
sdb ONLINE
root@pbs:~# zpool import -a -d /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi2-part1
cannot import 'BckDsk1T': I/O error
Destroy and re-create the pool from
a backup source.
root@pbs:~# zpool import -fFX
pool: BckDsk1T
id: 6864508705939350378
state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:
BckDsk1T ONLINE
sdb ONLINE
root@pbs:~# zdb -l /dev/sdb[1-9]
------------------------------------
LABEL 0
------------------------------------
version: 5000
name: 'BckDsk1T'
state: 0
txg: 4085812
pool_guid: 6864508705939350378
errata: 0
hostid: 3121281629
hostname: 'pbs'
top_guid: 10634939957079973197
guid: 10634939957079973197
vdev_children: 1
vdev_tree:
type: 'disk'
id: 0
guid: 10634939957079973197
path: '/dev/sdb1'
devid: 'scsi-0QEMU_QEMU_HARDDISK_drive-scsi2-part1'
phys_path: 'pci-0000:00:05.0-scsi-0:0:0:2'
whole_disk: 1
metaslab_array: 131
metaslab_shift: 33
ashift: 12
asize: 1000189984768
is_log: 0
DTL: 14642
create_txg: 4
degraded: 1
aux_state: 'err_exceeded'
features_for_read:
com.delphix:hole_birth
com.delphix:embedded_data
labels = 0 1 2 3
root@pbs:~# zpool import -fFX BckDsk1T
cannot import 'BckDsk1T': one or more devices is currently unavailable
root@pbs:~# iostat -m /dev/sd?
Linux 5.4.106-1-pve (pbs) 09/16/2021 _x86_64_ (4 CPU)
avg-cpu: %user %nice %system %iowait %steal %idle
0.05 0.00 0.03 0.07 0.02 99.83
Device tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 1.28 0.02 0.01 883 537
sdb 0.47 0.01 0.00 598 2
root@pbs:~# zpool import -F -d /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi2-part1 BckDsk1T
cannot import 'BckDsk1T': I/O error
Destroy and re-create the pool from
a backup source.
root@pbs:~# zpool import -F -d /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi2-part1 BckDsk1Tb
cannot import 'BckDsk1Tb': no such pool available
root@pbs:~# systemctl status zfs-import-cache.service
● zfs-import-cache.service - Import ZFS pools by cache file
Loaded: loaded (/lib/systemd/system/zfs-import-cache.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2021-09-15 14:20:49 CDT; 15h ago
Docs: man:zpool(8)
Main PID: 475 (code=exited, status=1/FAILURE)
Sep 15 14:20:48 pbs systemd[1]: Starting Import ZFS pools by cache file...
Sep 15 14:20:49 pbs zpool[475]: cannot import 'BckDsk1T': I/O error
Sep 15 14:20:49 pbs zpool[475]: Destroy and re-create the pool from
Sep 15 14:20:49 pbs zpool[475]: a backup source.
Sep 15 14:20:49 pbs systemd[1]: zfs-import-cache.service: Main process exited, code=exited, status=1/FAILURE
Sep 15 14:20:49 pbs systemd[1]: zfs-import-cache.service: Failed with result 'exit-code'.
Sep 15 14:20:49 pbs systemd[1]: Failed to start Import ZFS pools by cache file.
I tried smartctl to see if there was any physical problem but as the disk is attached with a ASMedia USB bridge I can't see smart infos.
If anybody has an idea on how to get back my data that would ne wonderfull. If it's impossible I think I will destroy the partitions on the disk using fdisk and redo it from scratch, but that means redoing all my backups.
Thanks for your help
Regards
V.