Accidentally changed pool slots, now can't mount cache device anymore


Recommended Posts

I accidentally changed the pool size of my xfs-encrypted cache to 2, didn't realize the mistake and started the array. After realizing what I'd done, I stopped the array and tried to undo the change, but the pool size couldn't be changed anymore.

 

I tried to create a new cache pool and assigned the device there, but now it says "Unmountable: Volume not encrypted". It seems like the LUKS headers got messed up somehow when I started the array with the increased pool size. Can I recover from this in any way? I'm already dumping the current cache disk contents to a backup file so I can mess around with it.

 

Edited by Strayer
Link to comment

Phew. I managed to fix it. I noticed wipefs in the disk logs in the UI:

 

Apr 21 08:45:58 noatun root: /dev/nvme0n1p1: 6 bytes were erased at offset 0x00000000 (crypto_LUKS): 4c 55 4b 53 ba be
Apr 21 08:45:58 noatun root: /dev/nvme0n1p1: 6 bytes were erased at offset 0x00004000 (crypto_LUKS): 53 4b 55 4c ba be

 

Those are the LUKS headers. After writing those bytes back at the place, I was able to open the cache device again.

 

For reference, if anyone else runs into this:
 

echo -en '\x4c\x55\x4b\x53\xba\xbe' | dd of=/dev/nvme0n1p1 bs=1 conv=notrunc seek=$((0x00000000))
echo -en '\x53\x4b\x55\x4c\xba\xbe' | dd of=/dev/nvme0n1p1 bs=1 conv=notrunc seek=$((0x00004000))

 

Link to comment
29 minutes ago, Strayer said:

I managed to fix it. I noticed wipefs in the disk logs in the UI:

There would have been a "all data on this device will be delete at array start" waring after the device, you just needed to stop/start array, or worst case reboot to be able to change the cache slots again.

Link to comment

Yeah, I'm really curious how I managed to break it this far. I also assume Unraid showed me a warning and I just didn't notice it? Really weird. Anyhow, I was lucky and could restore the drive. Thats what you get for carelessly clicking things without thinking. 🤦‍♂️

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.