June 25, 20233 yr I've been using the ZFS plugin for Unraid for a couple of years with no issue. Today, I figured I should upgrade to 6.12 to get that native ZFS support. I upgraded, then followed the https://docs.unraid.net/unraid-os/release-notes/6.12.0/#zfs-pools part to import my pool. Nothing happened on my first try: the pool was exported but not imported and not mounted, and the disks said "filesystem wrong or not present". I thought - ok, maybe I need to select the devices in a different order in the UI? So I stopped the pool and changed the mapping in the UI. The UI said "wrong" for 3 our of 4 disks, but, seeing how the current mapping did nothing anyway I figured this should be ok. I went on to starting the array with the disks remapped. The visual result was the same: UI saying "filesystem wrong or not present". Ok. Then I SSH'd into the server and ran `zpool import`, and got this: root@home:~# zpool import pool: icybox id: 2906712194322086713 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: icybox UNAVAIL insufficient replicas mirror-0 DEGRADED sdd2 UNAVAIL sdc2 ONLINE mirror-1 UNAVAIL insufficient replicas sde2 UNAVAIL sdb2 UNAVAIL and since then I was unable to access any data in the pool. Import says: root@home:~# zpool import icybox cannot import 'icybox': no such pool or dataset Destroy and re-create the pool from a backup source. which isn't very helpful as I did not back up 14TB of data somewhere else. So, yeah. Not great. Wondering if someone has any ideas on whether or not this is salvageable.
June 25, 20233 yr Community Expert 1 hour ago, diversario said: sdd2 Zfs is using partition #2, suggesting the pool was created with TrueNAS, pools with zfs on partition #2 cannot be imported for now, they should be importable in the near future. 1 hour ago, diversario said: The UI said "wrong" for 3 our of 4 disks Starting the array like that would wipe all the devices that showed wrong, hence the current issue, only the partition table would have been destroyed, I once recovered from a similar issue doing the below, it *should* also work for you, assuming all disks had the same partition layout, and they should have if disks from both mirrors have the same capcaity, if possible clone one of the disks first to a spare, so you have the original in case it doesn't work and you want to try something else. If you can clone use one of the devices from mirror-1 (sde or sdb2) since just one of those would make your pool importable, if you cannot clone I would try first on the other mirror-0 (sdd) member since you already have a good member. Going to post instructions for the latter option, adjust the commands as needed, this also assumes disk identifiers are the same, a reboot can change them: sfdisk -d /dev/sdc > part_table sfdisk /dev/sdd < part_table After this run zpool import again and see if sdd is now online, if yes it *should* be safe to do the same for the other two disks and make the pool importable again.
June 25, 20233 yr Author Solution root@home:~# zpool import pool: icybox id: 2906712194322086713 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: icybox UNAVAIL insufficient replicas mirror-0 ONLINE sdd2 ONLINE sdc2 ONLINE mirror-1 UNAVAIL insufficient replicas sde2 UNAVAIL sdb2 UNAVAIL root@home:~# So I got this... but I'm not sure what "safe to do the same for the other two disks" means here.
June 25, 20233 yr Community Expert If the disks from mirror-1 are the same capacity as the ones for mirror-0 type: sfdisk /dev/sde < part_table Re-check zpool import, if sde comes back online do the same for the other one sfdisk /dev/sdb < part_table Pool should now be restore.
June 25, 20233 yr Author I can't believe that it's all back. @JorgeB how can I express my gratitude? I would love to reward you somehow for rescuing my data, even as you do not have to. I do not understand the commands you posted do, but they sure have worked. Could you please explain what exactly happened here?
June 26, 20233 yr Community Expert 14 hours ago, diversario said: Could you please explain what exactly happened here? When you re-arranged the devices and re-started the array, all 3 devices that were "wrong" were wiped by Unraid with wipefs, but since only the MBR was destroyed, and the remaining disk should have an identical MBR we copied that MBR and restored it to the other disks. 14 hours ago, diversario said: how can I express my gratitude? If you want you can buy me a beer here: paypal.me/blackjohnnie
June 26, 20233 yr Author Oh, ok, I think I get it, thanks! Regarding the 6.12 upgrade - I followed (initially) the instructions saying Quote Pools created with the steini84 plugin can be imported as follows: First create a new pool with the number of slots corresponding to the number of devices in the pool to be imported. Next assign all the devices to the new pool. Upon array Start the pool should be recognized, though certain zpool topologies may not be recognized (please report). because this pool was indeed created using that plugin. But upon start the pool remained unimported and it was not present in the UI; before I wrecked it the import command showed the pool still ok and available for import after I added a pool in the UI. Should I've imported the pool manually at that point?
June 26, 20233 yr Community Expert 1 hour ago, diversario said: because this pool was indeed created using that plugin. The plugin by default puts zfs on partition #1, do you remember if you specified partition #2 when creating the pool? 1 hour ago, diversario said: Should I've imported the pool manually at that point? Basically the problem was re-arranging the assigned pool devices and starting the array again, with some devices showing as wrong, it wouldn't be a problem if you had reset the pool and tried again with the devices in new positions, but the pool would still fail to import, though it would not have been damaged. Thanks for the bear money!
June 26, 20233 yr Author 1 hour ago, JorgeB said: The plugin by default puts zfs on partition #1, do you remember if you specified partition #2 when creating the pool? Oh, hrm... I do not remember - I created it just using the zpool CLI, but I don't recall giving it any overrides. I think I was first using the drives with the Unraid's standard configuration, but then decided to use zfs and created a pool. Maybe. Is this a problem for the plugin that zfs is on partition #2?
June 26, 20233 yr Community Expert That I know of only TrueNAS uses by default partition #2, but in any case the pool won't be importable with the Unraid GUI, you'd need to backup and re-crate the pool or wait for next Unraid release, v6.13 when available should support importing those pools.
June 26, 20233 yr Author 24 minutes ago, JorgeB said: That I know of only TrueNAS uses by default partition #2, but in any case the pool won't be importable with the Unraid GUI, you'd need to backup and re-crate the pool or wait for next Unraid release, v6.13 when available should support importing those pools. Oh, I see. Would upgrading to 6.12 without doing anything with the pool still be ok? I recall that post-upgrade the pool was exported (and I didn't import it manually). Do you know if upgrade + manual import would work or should I just wait for 6.13?
June 26, 20233 yr Community Expert 32 minutes ago, diversario said: Would upgrading to 6.12 without doing anything with the pool still be ok? Yes, you'd just need to import the pool manually with zpool import.
June 26, 20233 yr Author Hmm I upgraded and `zpool import`ed the pool, but after a reboot the pool's exported again. I added `zpool import` to `/boot/config/go` and that seemed to do the trick 🤷♂️
June 26, 20233 yr Community Expert 2 minutes ago, diversario said: but after a reboot the pool's exported again Correct, you will need to re-import after every boot.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.