Snapshots not booting because of fstab mounts

After several hours, I located the problem for not booting into snapshots so I can rollback . I have several mounts from other disks (i.e documents, video… directories mounting from subvolumes from another disk, not from my main disk). If I edit fstab before zypper instal something, so no external mounts are present, then the pre-post snapshots that creating are bootable and rollback is as expected. If, when i run zypper and autocreate a snapshot, without edit before the fstab, the snapshots are not bootable (drop to tty) and cannot use rolback. So I want to find a way to exclude fstab from snapshots, or a way to boot a snapshot from tty after edit fstab (is that possible?, the snapshot is read-only!). Otherwise I have to edit fstab and disable the external mounts, every time a make dup or simple update, otherwise, the snapshots that snapper create automatically are not bootable. Please help…
P.S. Sorry for my poor english…

By tty, I mean emergency mode and command prompt

Hi! Welcome to the forum.

It’s not clear to me what you are describing. You said that you add mounting points in fstab and that if these mount points are present in fstab the system is unable to boot a snapshot, is it correct?

What is the content of fstab and what messages are on screen and log when the boot fails?

Yes, it is correct!
Because the snapshot include the fstab with the external mounts. If I edit fstab disabling these mounts and then run zypper dup, the snapshot which created include an fstab without the mounts, is bootable and can roll back. Maybe is better to show my fstab because my english is not well.
When fstab is like this the snaphots which included not booting:

UUID=3934f62b-6741-41a8-ae98-ee62cbeeb998 / btrfs defaults 0 0
UUID=3934f62b-6741-41a8-ae98-ee62cbeeb998 /var btrfs subvol=/@/var 0 0
UUID=3934f62b-6741-41a8-ae98-ee62cbeeb998 /usr/local btrfs subvol=/@/usr/local 0 0
UUID=3934f62b-6741-41a8-ae98-ee62cbeeb998 /srv btrfs subvol=/@/srv 0 0
UUID=3934f62b-6741-41a8-ae98-ee62cbeeb998 /root btrfs subvol=/@/root 0 0
UUID=3934f62b-6741-41a8-ae98-ee62cbeeb998 /opt btrfs subvol=/@/opt 0 0
UUID=3934f62b-6741-41a8-ae98-ee62cbeeb998 /home btrfs subvol=/@/home 0 0
UUID=3934f62b-6741-41a8-ae98-ee62cbeeb998 /boot/grub2/x86_64-efi btrfs subvol=/@/boot/grub2/x86_64-efi 0 0
UUID=3934f62b-6741-41a8-ae98-ee62cbeeb998 /boot/grub2/i386-pc btrfs subvol=/@/boot/grub2/i386-pc 0 0
UUID=c8cc2355-92bb-43d7-853c-5102cfe690b3 swap swap defaults 0 0
UUID=3934f62b-6741-41a8-ae98-ee62cbeeb998 /.snapshots btrfs subvol=/@/.snapshots 0 0
UUID=2A5A-B352 /boot/efi vfat utf8 0 2
#raid mounts
UUID=b4c13f75-b7a3-4ec0-9c44-4633662221b3 /home/mitsos/Data btrfs defaults,subvol=@Data 0 2
UUID=b4c13f75-b7a3-4ec0-9c44-4633662221b3 /home/mitsos/Documents btrfs subvol=@Documents 0 2
UUID=b4c13f75-b7a3-4ec0-9c44-4633662221b3 /home/mitsos/Downloads btrfs subvol=@Downloads 0 2
UUID=b4c13f75-b7a3-4ec0-9c44-4633662221b3 /home/mitsos/KeepassDB btrfs subvol=@KeepassDB 0 2
UUID=b4c13f75-b7a3-4ec0-9c44-4633662221b3 /home/mitsos/Music btrfs subvol=@Music 0 2
UUID=b4c13f75-b7a3-4ec0-9c44-4633662221b3 /home/mitsos/Pictures btrfs subvol=@Pictures 0 2
UUID=b4c13f75-b7a3-4ec0-9c44-4633662221b3 /home/mitsos/Software btrfs subvol=@Software 0 2
UUID=b4c13f75-b7a3-4ec0-9c44-4633662221b3 /home/mitsos/Videos btrfs subvol=@Videos 0 2
UUID=b4c13f75-b7a3-4ec0-9c44-4633662221b3 /home/mitsos/snap/thunderbird/common/.thunderbird btrfs subvol=@thunderbird 0 2
UUID=6f6a96d1-6f0f-486c-a609-cba620e5f4ef /home/mitsos/Ext ext4 defaults 0 1

When fstab is like this and then run zypper dup, the snapshots are bootable and rollback is doable:

UUID=3934f62b-6741-41a8-ae98-ee62cbeeb998 / btrfs defaults 0 0
UUID=3934f62b-6741-41a8-ae98-ee62cbeeb998 /var btrfs subvol=/@/var 0 0
UUID=3934f62b-6741-41a8-ae98-ee62cbeeb998 /usr/local btrfs subvol=/@/usr/local 0 0
UUID=3934f62b-6741-41a8-ae98-ee62cbeeb998 /srv btrfs subvol=/@/srv 0 0
UUID=3934f62b-6741-41a8-ae98-ee62cbeeb998 /root btrfs subvol=/@/root 0 0
UUID=3934f62b-6741-41a8-ae98-ee62cbeeb998 /opt btrfs subvol=/@/opt 0 0
UUID=3934f62b-6741-41a8-ae98-ee62cbeeb998 /home btrfs subvol=/@/home 0 0
UUID=3934f62b-6741-41a8-ae98-ee62cbeeb998 /boot/grub2/x86_64-efi btrfs subvol=/@/boot/grub2/x86_64-efi 0 0
UUID=3934f62b-6741-41a8-ae98-ee62cbeeb998 /boot/grub2/i386-pc btrfs subvol=/@/boot/grub2/i386-pc 0 0
UUID=c8cc2355-92bb-43d7-853c-5102cfe690b3 swap swap defaults 0 0
UUID=3934f62b-6741-41a8-ae98-ee62cbeeb998 /.snapshots btrfs subvol=/@/.snapshots 0 0
UUID=2A5A-B352 /boot/efi vfat utf8 0 2
#raid mounts
#UUID=b4c13f75-b7a3-4ec0-9c44-4633662221b3 /home/mitsos/Data btrfs defaults,subvol=@Data 0 2
#UUID=b4c13f75-b7a3-4ec0-9c44-4633662221b3 /home/mitsos/Documents btrfs subvol=@Documents 0 2
#UUID=b4c13f75-b7a3-4ec0-9c44-4633662221b3 /home/mitsos/Downloads btrfs subvol=@Downloads 0 2
#UUID=b4c13f75-b7a3-4ec0-9c44-4633662221b3 /home/mitsos/KeepassDB btrfs subvol=@KeepassDB 0 2
#UUID=b4c13f75-b7a3-4ec0-9c44-4633662221b3 /home/mitsos/Music btrfs subvol=@Music 0 2
#UUID=b4c13f75-b7a3-4ec0-9c44-4633662221b3 /home/mitsos/Pictures btrfs subvol=@Pictures 0 2
#UUID=b4c13f75-b7a3-4ec0-9c44-4633662221b3 /home/mitsos/Software btrfs subvol=@Software 0 2
#UUID=b4c13f75-b7a3-4ec0-9c44-4633662221b3 /home/mitsos/Videos btrfs subvol=@Videos 0 2
#UUID=b4c13f75-b7a3-4ec0-9c44-4633662221b3 /home/mitsos/snap/thunderbird/common/.thunderbird btrfs subvol=@thunderbird 0 2
#UUID=6f6a96d1-6f0f-486c-a609-cba620e5f4ef /home/mitsos/Ext ext4 defaults 0 1

When I run journalctl -xb it gives me this

The problem is with raid mounts. As I figure out the mount of an ext4 disk don’t affect the boot of the snapshot
The raid mounts are in an mdadm raid 5 (3 disks) formatted in btrfs with subvolumes

@dimig33 ,
Please, to make your posts better consumable by technical oriented people:

1 Like

Run

journalctl -b --full --no-pager

and upload output to the https://paste.opensuse.org/. Also provide the same output after booting normally for comparison.

journalctl -b --full --no-pager

https://paste.opensuse.org/pastes/649beed7384a

and normalboot
https://paste.opensuse.org/pastes/92e5cadb5f62

My problem is thart madm raid dont start during snapshot boot, even if all drives are ok
blkid
https://paste.opensuse.org/pastes/d85f7e429884
mdadm --detail
https://paste.opensuse.org/pastes/a65ac4729660

my normal boot mdadm --detail
https://paste.opensuse.org/pastes/97f55205df71

What happens if you manually create a snapshot with sudo snapper create --type single (or YaST) and try to boot from the created snapshot?

sudo snapper create --type single

I try it…
Unfortunately, same thing, the raid array sees two disks instead of three and array status is inactive…
I wonder what if I had an array of two disks (raid1 instead of raid5) what happens… But i have to build a virtual machine to check this, maybe later…

Does the problem persist after the rollback and a new boot in the current snapshot?

The problem is that snapshots are not bootable in full mode, drop to emergency mode (see photos). I am afraid to try rollback with emergency mode…

I solve the problem!!!
I leave my expirience in case someone has same problem. I made a virtual machine with tumbleweed and create the same configuration (mdadm raid 5 formated as btrfs, mounts on subvolumes on btrfs raid 5 etc.) as i have, this time with yast partitioner (mine raid array had been created when i had debian). I made a zypper dup and try to boot the pre-spanshot and works! The only difference I noticed was that yast partitioner has created a simple mdadm.conf file (under /etc) that names the array md0). So, I manually created an /etc/mdadm.conf file, with my raid 5 uuid and name it md0 instead of md127 who automaticaly named. I run zypper dup, I reboot and try to boot the pre-snapshot, and voila!!! Success! The read-only pre snapshot is bootable and can run snapper rollback if I want.
I love the rollback feature of opensuse tumbleweed, so it was annoying to me my problem, but opensuse did’t disappointed me. Thanks all for your concern and your help!!!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.