Description
The entire episode was completely unrelated to the device of my other ticket, #541 .
Some time ago I wanted to change partitioning of my hard drives. This included that I had to change the sizes of my BtrFS partition, the LUKS container and some LVM too. Anyhow, I got the sizes wrong and made the LVM a tiny bit smaller than the BtrFS partition. Think of 512Gi vs 512G. Please note that the BtrFS was not full. It had plenty of unused space.
Due to the size mismatch, I was unable to mount the BtrFS, because it detected that its partition was smaller than the FS size itself. Because I was unable to mount, I was unable to shrink the filesystem. Because I was unable to shrink it, I was unable to mount it. etc.
In the end I had to shrink the neighbouring LVM partition and increase the LVM of the BtrFS. If there had not been a second LVM, I could have lost my entire partition.
I think that btrfs filesystem resize
should be able to resize unmounted filesystems to avoid the problems described above.