October 2Oct 2 Three times now I have reformatted a single drive that's in its own pool (as encrypted zfs) because it has randomly come up as Unmountable: wrong or no file system. And it just did it again. It's a new drive, there are no SMART errors. How can I force it to mount correctly? How do I prevent this from happening? This most recent occurrence appears to have happened after a hard shutdown of (loss of power to) the server.I also noticed that after this hard shutdown the root user's authorized SSH keys were wiped, when before I had no issues with it retaining the keys.metaverse-diagnostics-20261002-1002.zip Edited October 2Oct 2 by gusgus
October 2Oct 2 Do not format the drive again. Your diagnostics show these errors before the filesystem mount attempt:No key available with this passphrase.hdd: Wrong encryption keyThe HDD remains locked, so ZFS cannot read the filesystem inside it. This explains the later “wrong or no file system” message.The same supplied key successfully unlocks your NVMe pool. Was the HDD formatted with the same passphrase or key file? Do you enter it manually after startup, or does a script or plugin supply it automatically? Unraid expects one shared key for all encrypted drives. Please describe how you supply the key, but do not post the passphrase or key file. If you are certain the original credential is unchanged, we can investigate why the HDD rejects it. The diagnostics do not yet establish that power loss damaged the filesystem.If you use the exact same passphrase or key file and it sometimes works but sometimes fails, an intermittent hardware problem, such as faulty RAM, is another possibility. I have seen that cause this behavior before. In that situation, a memory test would be a useful next step.
October 2Oct 2 Author The odd part is I have two pools, both formatted as encrypted zfs. They both have the same encryption passphrase. The other pool that I'm not having this problem with is unlocking just fine at bootup as expected. Why would one pool unlock perfectly fine using the keyfile and another pool repeatedly but only occasionally fail to unlock using that same keyfile? Is this still possibly a memory corruption issue? Unless I'm missing something, I would think it's time to file a bug report. Edited October 2Oct 2 by gusgus
October 2Oct 2 9 minutes ago, gusgus said:Is this still possibly a memory corruption issue?Most definitely, or another hardware issue.If it were an unload issue not giving the correct key, both pools would fail to unlock.
October 15Oct 15 Author Ok finally I'm back. Here are the two scenarios that result in the HDD pool in not mounting and one scenario where it does mount.As a reminder, I have two ZFS encrypted pools with the same passphrase. Scenario 1: When I do the following, the HDD pool fails to unlock:Boot up with the keyfile in place.NVME pool succeeds to unlockHDD pool does not unlock and instead says "Unmountable: wrong or no file system"Scenario 2: When I do the following, the HDD pool fails to unlock:Delete the keyfileStop the arrayStart the arrayEnter the correct passphraseNVME pool succeeds to unlockHDD pool does not unlock and instead says "Unmountable: wrong or no file system"Note: The exact order of the steps I'm not sure of because right now it refuses to delete the keyfile (delete button > restart array > keyfile is still there).Scenario 3: This causes the HDD pool to successfully mountStart with the drive set to encrypted zfs filesystemFormat (Yes I want to do this)The HDD pool is now unlocked and mountedThe next time I reboot UnRAID and forever after it will refuse to mount without being reformatted as a workaround. Edited October 15Oct 15 by gusgus
October 16Oct 16 Solution Thanks for the detailed scenarios. You're right that this doesn't look like a RAM problem: it fails the same way every time, and bad RAM wouldn't do that. Looking at your diagnostics again, I think the cause may be the Encrypted Drive Manager plugin. Its auto-unlock is enabled. At every array start the syslog shows:Auto-start is enabled. Proceeding with keyfile generation.Attempting to generate hardware-tied key...Keyfile generated successfully at /root/keyfileShortly after the array starts, it logs Keyfile at /root/keyfile has been securely cleared.So the key Unraid uses at boot is not your passphrase. It is a key the plugin makes from your hardware. Your NVMe pool was most likely set up with the plugin, so it accepts that key. When you format the HDD later, it gets encrypted with whatever is in /root/keyfile at that moment. That is either your typed passphrase or the file the plugin already cleared, and either way it is not the plugin's hardware key. The drive works until the next reboot. Then the plugin supplies its own key again, and the HDD rejects it. The plugin also explains why the typed passphrase doesn't seem to be used and why the keyfile "comes back."The easiest test is to remove the plugin. First, with the array started, confirm that your NVMe still accepts the passphrase, so you don't lock yourself out of it:cryptsetup open --test-passphrase /dev/nvme0n1p1Type the passphrase when asked. If it prints nothing, the passphrase is correct. If it prints No key available with this passphrase, it is wrong. In that case, don't remove the plugin; post the result here.If the passphrase is accepted:1. Remove the Encrypted Drive Manager plugin.2. Reboot.3. Start the array, typing your passphrase when asked.If the HDD now mounts, the plugin was the cause. If the NVMe mounts but the HDD still doesn't, the HDD was probably encrypted with the cleared keyfile when you last formatted it, and its current contents can't be unlocked. In that case, format it one more time now that the plugin is gone, and it should keep working after reboots. If it fails again after that, post new diagnostics before you format anything.
October 16Oct 16 Author That was exactly it! I had totally forgot about Encrypted Drive Manager. I created the device-derived key on the drives and rebooted and HDD pool is now successfully automounted at bootup. Thank you!
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.