Before installing the system, to have the suggested filesystem for snapper, that is required for snapper-rollback to function, we separate @snapshots from @ editing the mount.conf file as showed above.
When you boot, there will be a @snapshots mounted, it’s already in fstab because calamares inserted it there during the install.
So, we need to umount it, delete the directory so we can run snapper config again.
Snapper create-config automatically creates a subvolume .snapshots with the root subvolume @ as its parent, that is not needed for the suggested filesystem layout, and can be deleted.
After deleting the subvolume, recreate the directory /.snapshots, and this directory will be used to store the root snapshots and will no longer be parent of @
All this process will make all snapshots that snapper creates be stored outside of the @ subvolume, so that @ can easily be replaced anytime without losing the snapper snapshots.
And for snapper-rollback to be able to run, is all it needs
So the default install that Calamares does isn’t creating a /.snapshots directory. So are you saying his tool will work with the standard Calamares install of btrfs?
The default install doesn’t create snapshots folder or subvolumes, that is created when you configure snapper.
Snapper create-config automatically creates a subvolume .snapshots with the root subvolume @ as its parent.
What we did was to just change this behavior to use the @snapshots we asked calamares to create.
Regarding Dalto’s app, according to him, we need to remove snapshots from fstab e put snapshots nested again, but it’s better to speak with him as he knows better of course.
This is complicated when just trying to think about it. What does calamares create then. It doesn’t create any subvolumes? I gotta look at this again just to understand what it’s doing.
The reason for that is because my application doesn’t require any special naming conventions like almost all other tools do. I don’t care if your root is called @ or root or monkey7. You can name it whatever you want.
However, when I restore a snapshot, I have to know where to restore it to. Since I don’t force you to name root @, how can I figure that out? The only I could answer I could find is to simply look at whatever .snapshots is inside of. This works fine unless you don’t nest .snapshots.
I know your explaining this but I’m having difficulty understanding what you are saying because i don’t think like you. You are explaining it as you think about it. But because i don’t really understand it exactly it’s difficult to comprehend. It’s like a foreign language and i’m only understanding pieces. As an example the Calamares install gives me this without changing anything.
[ricklinux@rick-virtualbox ~]$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 18G 0 disk
├─sda1 8:1 0 300M 0 part /boot/efi
├─sda2 8:2 0 9.3G 0 part /home
│ /var/cache
│ /var/log
│ /
└─sda3 8:3 0 8.4G 0 part [SWAP]
sr0 11:0 1 1.9G 0 rom
[ricklinux@rick-virtualbox ~]$
So these are in / (nested) but are not subvolumes? Correct?
Really nice, no need to move snapshots folder from @old to @…
As far as I understood, it works similar to snapper-rollback, but it’s easier to use, more granular and complete, with a GUI and all…