Due to an interrupted btrfs balance on my root partition I can’t boot my Tumbleweed installation. I have a luks container with an LVM inside: 1 volume group system, then 3 logical volumes root, swap and home. root is a BTRFS and home is a XFS.
During the boot the mounting of / timeouts (exceeds the 1m30s), it can only be mounted to. So I get the rescue console: LUKS container is already open and I see all the volumes with lvs. Tough I can’t mount / when doing it manually (it takes forever).
For btrfs balance I need a rw mounted filesystem (to resume or cancel the balance), for btrfs check and btrfs recover I need it unmounted. Ok, that won’t work so easily.
On another machine with Leap 42.2 I created two copies of the full disk with dd. I can open the LUKS container with cryptsetup luksOpen just fine. But then I am stuck: I can’t find out how to read the LVM volumes. pv/vg/lvscan and pvs/vgs/lvs all showed nothing:
> sudo cryptsetup luksOpen /dev/loop0p2 mnt
Enter passphrase for /dev/loop0p2:
> ls -la /dev/mapper/
total 0
drwxr-xr-x 2 root root 80 Jun 4 12:12 .
drwxr-xr-x 19 root root 4700 Jun 4 12:12 ..
crw------- 1 root root 10, 236 Jun 4 11:00 control
lrwxrwxrwx 1 root root 7 Jun 4 12:12 mnt -> ../dm-0
huabo@faulty:~> sudo pvscan
No matching physical volumes found
> sudo pvs
>
How can I access the volumes?
On my TW rescue console I can see that there should be 2 files more in /dev/mapper (two additional links to /dev/dm-1 and /dev/dm-2), so probably I opened the LUKS wrong?
I’d prefer to recover the broken btrfs over making a new installation.
Any help appreciated.
Showing partial or edited output just makes it harder for everyone to help you. I just briefly tested moving LVM-on-LUKS from TW to Leap and it worked (although the difference was not loop device, but I reconnected disk to another VM). Actually as soon as I started LUKS container system automatically setup VG and LV. So there is something in your environment that prevents it; but as you deleted information about other devices, it is hard to make any guess.
After some time and some more scans (vgscan and vgchange -a) I got all the volume groups and logical volumes and could mount the volumes. I’m not sure what caused that but it seems to work now. I’m now making copies of these partitions themselves (so I have the data easily accessible) and afterwards I try to repair the btrfs filesystem on the SSD itself.
btrfs will resume interrupted balance and in some cases it may take quite a lot of time. Try mounting with “skip_balance” option, it should hopefully allow you to proceed further.
Will this be done during the mount-process? Because the mount did take very long and thus it got interrupted, so it was mountable read-only. As balance needs it rw, that couldn’t continue.
In the meantime I used btrfsck --repair, and btrfs check to fix the filesystem (and waited for the automatically started balance) and it boots now!