Moin,
Ich habe Probleme, weil ich mir die Partitionstabelle eines Members des zfspools zerschossen habe, und diese nicht einwandfrei rekonstruiert bekomme. Testdisk unterstützt ja kein zfs, wohl auch kein btrfs (die zweite Partition auf der Festplatte und Member eines btrfs mirrors, der nun auch degraded sein sollte.
console1 floogy@ubuntu-SSD1:~$ sudo zpool import -f pool: rpool id: 997847599946661349 state: ONLINE status: Some supported features are not enabled on the pool. action: The pool can be imported using its name or numeric identifier, though some features will not be available without an explicit 'zpool upgrade'. config: rpool ONLINE sda7 ONLINE pool: zfspool id: 1855499895493095054 state: ONLINE status: One or more devices contains corrupted data. action: The pool can be imported using its name or numeric identifier. see: http://zfsonlinux.org/msg/ZFS-8000-4J config: zfspool ONLINE usb-SAMSUNG_HD400LD-0:0-part2 UNAVAIL corrupted data ata-ST31500341AS_9VS0BAGK-part3 ONLINE floogy@ubuntu-SSD1:~$ zpool list no pools available floogy@ubuntu-SSD1:~$ sudo zpool import -f zfspool (hängt) console2 floogy@ubuntu-SSD1:~$ dmesg |tail [ 187.966971] sd 10:0:0:0: [sdh] Adjusting the sector count from its reported value: 781422769 [ 188.004870] sdh: sdh1 sdh2 [ 188.006603] sd 10:0:0:0: [sdh] Adjusting the sector count from its reported value: 781422769 [ 188.008833] sd 10:0:0:0: [sdh] Attached SCSI disk [ 188.417727] BTRFS: device fsid 898c8973-ae88-454d-b76b-c540660909d1 devid 1 transid 9454 /dev/sdh1 [ 188.592479] BTRFS info (device sdh1): disk space caching is enabled [ 188.741565] BTRFS info (device sdh1): bdev /dev/sdh1 errs: wr 57, rd 0, flush 0, corrupt 4, gen 0 [ 188.741569] BTRFS info (device sdh1): bdev /dev/sdd1 errs: wr 0, rd 7, flush 0, corrupt 1, gen 0 [ 276.604318] WARNING: Pool 'zfspool' has encountered an uncorrectable I/O failure and has been suspended. floogy@ubuntu-SSD1:~$ zpool status (hängt)
https://paste.ubuntu.com/p/SVWZJxZ9Nw/
Leider hängt zpool/zfs. Möglicherweise, weil der noch verfügbare member (online) ein paar beschädigte blöcke hat? Jedenfalls war der reallocation sector count immer etwa 3 (etwa 10 Jahre) nun aber 41.
Code [...] SMART overall-health self-assessment test result: PASSED [...] 5 Reallocated_Sector_Ct 0x0033 099 099 036 Pre-fail Always - 41 184 End-to-End_Error 0x0032 100 100 099 Old_age Always - 0 187 Reported_Uncorrect 0x0032 001 001 000 Old_age Always - 118 [...] 197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0 198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 0 199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0
Frage mich, weshalb die zfs cmds hängen.
Unter FreeBSD oder Solaris ist mir so etwas nicht passiert. Da gab es dann aussagekräftige Fehlermeldungen.
Ich denke, normalerweise sollte es möglich sein die intakte Festplatte mit der zerschossenen Partitionstabelle neu zu partitionieren und den "UNAVAIL corrupted data" member mit der neuen Partition auszutauschen und den pool resilvern zu lassen.
Da die cmds zfs list und zpool list hängen, funktionieren auch apt upgrade und apt autoremove nicht, so fern es sich um kernel handelt, da dann os-prober hinsichtlich zfs hängt (habe auch noch einen rpool mit openindiana, der das wohl triggert). Ich muss dann den prozess mit ps axuf
suchen und killen
Code root 37362 0.0 0.0 2740 1888 pts/7 S+ 09:41 0:00 | | \_ /bin/sh /etc/grub.d/10_linux_zfs root 37368 0.0 0.0 2740 288 pts/7 S+ 09:41 0:00 | | \_ /bin/sh /etc/grub.d/10_linux_zfs root 37369 0.0 0.0 2740 288 pts/7 S+ 09:41 0:00 | | \_ /bin/sh /etc/grub.d/10_linux_zfs root 37370 0.0 0.0 14672 4616 pts/7 D+ 09:41 0:00 | | \_ zpool list root 37371 0.0 0.0 14156 3204 pts/7 S+ 09:41 0:00 | | \_ awk {if (NR>1) print $1}
Also sudo kill -9 37368
weil grub dann auf den Prozess _zpool lsit hängt. 10:03:34
Meiner Meinung nach muss da irgendwo ein bug sein in den zfs Programmen, dann zu hängen. Die sollten wenigstens mit return code 1 oder anderem Fehlercode abschließen und beenden. 1
So könnten dann auch die grub scripte durchlaufen und apt würde nicht mit hängen.
engheneiro in folgendem Thread hat mich darauf gebracht, dass es wohl durch den rpool der openindiana partition getriggert wird. https://forum.ubuntuusers.de/topic/zfs-thema-welches-unterforum-programme-oder-sy/
Bezüglich BTRFS, das ebenfalls von einem Member auf der Festplatte mit der falschen Partitionstabelle betroffen ist, scheint der BTRFS Pool gemountet zu sein:
floogy@ubuntu-SSD1:~$ mount | grep sdh /dev/sdh1 on /media/floogy/898c8973-ae88-454d-b76b-c540660909d1 type btrfs (rw,nosuid,nodev,relatime,space_cache,subvolid=5,subvol=/,uhelper=udisks2) /dev/sdh1 on /media/floogy/898c8973-ae88-454d-b76b-c540660909d11 type btrfs (rw,nosuid,nodev,relatime,space_cache,subvolid=5,subvol=/)
Offensichtlich ist mir aber die genaue Rekonstruktion der Partitionstabelle hinsichtlich dem BTRFS System wohl gelungen.
floogy@ubuntu-SSD1:~$ btrfs device scan --all-devices Scanning for Btrfs filesystems ERROR: cannot open /dev/sdd1: Permission denied ERROR: cannot open /dev/sdh1: Permission denied floogy@ubuntu-SSD1:~$ sudo btrfs device scan --all-devices Scanning for Btrfs filesystems floogy@ubuntu-SSD1:~$ floogy@ubuntu-SSD1:~$ sudo btrfs device usage /media/floogy/898c8973-ae88-454d-b76b-c540660909d1 /dev/sdh1, ID: 1 Device size: 186.31GiB Device slack: 5.17MiB Data,RAID0: 184.37GiB Metadata,RAID1: 1.90GiB System,single: 4.00MiB System,RAID1: 32.00MiB Unallocated: 32.00KiB /dev/sdd1, ID: 2 Device size: 186.30GiB Device slack: 512.00B Data,RAID0: 184.37GiB Metadata,RAID1: 1.90GiB System,RAID1: 32.00MiB Unallocated: 4.03MiB floogy@ubuntu-SSD1:~$ sudo btrfs device usage /media/floogy/898c8973-ae88-454d-b76b-c540660909d11 /dev/sdh1, ID: 1 Device size: 186.31GiB Device slack: 5.17MiB Data,RAID0: 184.37GiB Metadata,RAID1: 1.90GiB System,single: 4.00MiB System,RAID1: 32.00MiB Unallocated: 32.00KiB /dev/sdd1, ID: 2 Device size: 186.30GiB Device slack: 512.00B Data,RAID0: 184.37GiB Metadata,RAID1: 1.90GiB System,RAID1: 32.00MiB Unallocated: 4.03MiB floogy@ubuntu-SSD1:~$ sudo btrfs device ready /dev/sdd1 floogy@ubuntu-SSD1:~$ sudo btrfs device ready /dev/sdh1 floogy@ubuntu-SSD1:~$ btrfs filesystem df /media/floogy/898c8973-ae88-454d-b76b-c540660909d1 Data, RAID0: total=368.73GiB, used=363.62GiB System, RAID1: total=32.00MiB, used=40.00KiB System, single: total=4.00MiB, used=0.00B Metadata, RAID1: total=1.90GiB, used=790.06MiB GlobalReserve, single: total=512.00MiB, used=0.00B floogy@ubuntu-SSD1:~$ sudo btrfs filesystem show /media/floogy/898c8973-ae88-454d-b76b-c540660909d1 Label: none uuid: 898c8973-ae88-454d-b76b-c540660909d1 Total devices 2 FS bytes used 364.40GiB devid 1 size 186.30GiB used 186.30GiB path /dev/sdh1 devid 2 size 186.30GiB used 186.30GiB path /dev/sdd1 floogy@ubuntu-SSD1:~$ sudo btrfs filesystem show /media/floogy/898c8973-ae88-454d-b76b-c540660909d11 Label: none uuid: 898c8973-ae88-454d-b76b-c540660909d1 Total devices 2 FS bytes used 364.40GiB devid 1 size 186.30GiB used 186.30GiB path /dev/sdh1 devid 2 size 186.30GiB used 186.30GiB path /dev/sdd1
Was aber soll UUID *-c540660909d1 versus *-c540660909d11 ?