I have Tumbleweed installed on a computer at home. I was planning on updating it. I do not want to take a chance with the /usr merge change, so I want to have a snapshot just in case. The strange thing is: snapper seems not to be configured. It is a full btrfs install with everything as the install defaults to. There is ample free space (> 100 GB). When I run snapper ls, I get: The config 'root' does not exist. Likely snapper is not configured. There is no /.snapshots dir, and there is nothing in /etc/snapper/configs. No idea why it is this way. How can I config snapper? I just want whatever the openSUSE install would have done. I googled a bit and the discussions are about where it seems snapper is set up (the files that I said do not exist do exist in the questions I have seen), but this complaint is made. I do not think that is my issue. As an aside, that's the 'drawback' of systems like SUSE where so much is done automatically. One no longer really knows the commands involved. It's not at all a complaint. Just an observation of how things have evolved. I used to know a lot more about what was happening under the hood. Now I just sit and enjoy the blinking lights! -- Roger Oberholtzer
On Fri, Jun 25, 2021 at 12:29 PM Roger Oberholtzer <roger.oberholtzer@gmail.com> wrote:
I have Tumbleweed installed on a computer at home. I was planning on updating it. I do not want to take a chance with the /usr merge change, so I want to have a snapshot just in case.
The strange thing is: snapper seems not to be configured.
It is a full btrfs install with everything as the install defaults to. There is ample free space (> 100 GB).
When I run snapper ls, I get:
The config 'root' does not exist. Likely snapper is not configured.
There is no /.snapshots dir, and there is nothing in /etc/snapper/configs.
No idea why it is this way.
How can I config snapper?
If you only want snapshots to access previous files - just configure snapper as documented. If you want to use snapshots for rollback and possibility to boot into previous snapshots - this requires different subvolume layout. This blog post should be still be valid. https://rootco.de/2018-01-19-opensuse-btrfs-subvolumes/ You will need to move your root content into proper subvolume. There is no single tool to do it, necessary steps are performed by different tools at different times during installation.
I just want whatever the openSUSE install would have done. I googled a bit and the discussions are about where it seems snapper is set up (the files that I said do not exist do exist in the questions I have seen), but this complaint is made. I do not think that is my issue.
As an aside, that's the 'drawback' of systems like SUSE where so much is done automatically. One no longer really knows the commands involved. It's not at all a complaint. Just an observation of how things have evolved. I used to know a lot more about what was happening under the hood. Now I just sit and enjoy the blinking lights!
-- Roger Oberholtzer
On Fri, Jun 25, 2021 at 11:51 AM Andrei Borzenkov <arvidjaar@gmail.com> wrote:
On Fri, Jun 25, 2021 at 12:29 PM Roger Oberholtzer <roger.oberholtzer@gmail.com> wrote:
I have Tumbleweed installed on a computer at home. I was planning on updating it. I do not want to take a chance with the /usr merge change, so I want to have a snapshot just in case.
The strange thing is: snapper seems not to be configured.
It is a full btrfs install with everything as the install defaults to. There is ample free space (> 100 GB).
When I run snapper ls, I get:
The config 'root' does not exist. Likely snapper is not configured.
There is no /.snapshots dir, and there is nothing in /etc/snapper/configs.
No idea why it is this way.
How can I config snapper?
If you only want snapshots to access previous files - just configure snapper as documented.
If you want to use snapshots for rollback and possibility to boot into previous snapshots - this requires different subvolume layout. This blog post should be still be valid.
https://rootco.de/2018-01-19-opensuse-btrfs-subvolumes/
You will need to move your root content into proper subvolume.
I think all the volumes are as they should be: /dev/sda3 on / type btrfs (rw,relatime,space_cache,subvolid=257,subvol=/@) /dev/sda3 on /boot/grub2/i386-pc type btrfs (rw,relatime,space_cache,subvolid=258,subvol=/@/boot/grub2/i386-pc) /dev/sda3 on /boot/grub2/x86_64-efi type btrfs (rw,relatime,space_cache,subvolid=259,subvol=/@/boot/grub2/x86_64-efi) /dev/sda3 on /home type btrfs (rw,relatime,space_cache,subvolid=260,subvol=/@/home) /dev/sda3 on /usr/local type btrfs (rw,relatime,space_cache,subvolid=264,subvol=/@/usr/local) /dev/sda3 on /opt type btrfs (rw,relatime,space_cache,subvolid=261,subvol=/@/opt) /dev/sda3 on /var/cache type btrfs (rw,relatime,space_cache,subvolid=265,subvol=/@/var/cache) /dev/sda3 on /tmp type btrfs (rw,relatime,space_cache,subvolid=263,subvol=/@/tmp) /dev/sda3 on /srv type btrfs (rw,relatime,space_cache,subvolid=262,subvol=/@/srv) /dev/sda3 on /var/crash type btrfs (rw,relatime,space_cache,subvolid=266,subvol=/@/var/crash) /dev/sda3 on /var/lib/libvirt/images type btrfs (rw,relatime,space_cache,subvolid=267,subvol=/@/var/lib/libvirt/images) /dev/sda3 on /var/lib/machines type btrfs (rw,relatime,space_cache,subvolid=268,subvol=/@/var/lib/machines) /dev/sda3 on /var/lib/mysql type btrfs (rw,relatime,space_cache,subvolid=271,subvol=/@/var/lib/mysql) /dev/sda3 on /var/lib/named type btrfs (rw,relatime,space_cache,subvolid=272,subvol=/@/var/lib/named) /dev/sda3 on /var/lib/mariadb type btrfs (rw,relatime,space_cache,subvolid=270,subvol=/@/var/lib/mariadb) /dev/sda3 on /var/lib/pgsql type btrfs (rw,relatime,space_cache,subvolid=273,subvol=/@/var/lib/pgsql) /dev/sda3 on /var/lib/mailman type btrfs (rw,relatime,space_cache,subvolid=269,subvol=/@/var/lib/mailman) /dev/sda3 on /var/log type btrfs (rw,relatime,space_cache,subvolid=274,subvol=/@/var/log) /dev/sda3 on /var/opt type btrfs (rw,relatime,space_cache,subvolid=275,subvol=/@/var/opt) /dev/sda3 on /var/spool type btrfs (rw,relatime,space_cache,subvolid=276,subvol=/@/var/spool) /dev/sda3 on /var/tmp type btrfs (rw,relatime,space_cache,subvolid=277,subvol=/@/var/tmp)
There is no single tool to do it, necessary steps are performed by different tools at different times during installation.
Is it more than the snapper command to set up snapshots? The thing about just following the docs does not really say how openSUSE ran the command(s) to set things up. I want to do exactly what the install should have done so that I am not missing something other tools (like zypper) might expect/use. It just seems that a step did not happen during installation. It was installed a while ago. I never really checked that snapshots were happening on this system. -- Roger Oberholtzer
On 26/06/2021 11.33, Roger Oberholtzer wrote:
On Fri, Jun 25, 2021 at 11:51 AM Andrei Borzenkov <> wrote:
On Fri, Jun 25, 2021 at 12:29 PM Roger Oberholtzer <> wrote:
...
There is no single tool to do it, necessary steps are performed by different tools at different times during installation.
Is it more than the snapper command to set up snapshots?
The thing about just following the docs does not really say how openSUSE ran the command(s) to set things up. I want to do exactly what the install should have done so that I am not missing something other tools (like zypper) might expect/use.
It just seems that a step did not happen during installation. It was installed a while ago. I never really checked that snapshots were happening on this system.
Install again :-( -- Cheers / Saludos, Carlos E. R. (from 15.2 x86_64 at Telcontar)
On 26.06.2021 12:33, Roger Oberholtzer wrote:
On Fri, Jun 25, 2021 at 11:51 AM Andrei Borzenkov <arvidjaar@gmail.com> wrote:
On Fri, Jun 25, 2021 at 12:29 PM Roger Oberholtzer <roger.oberholtzer@gmail.com> wrote:
I have Tumbleweed installed on a computer at home. I was planning on updating it. I do not want to take a chance with the /usr merge change, so I want to have a snapshot just in case.
The strange thing is: snapper seems not to be configured.
It is a full btrfs install with everything as the install defaults to. There is ample free space (> 100 GB).
When I run snapper ls, I get:
The config 'root' does not exist. Likely snapper is not configured.
There is no /.snapshots dir, and there is nothing in /etc/snapper/configs.
No idea why it is this way.
How can I config snapper?
If you only want snapshots to access previous files - just configure snapper as documented.
If you want to use snapshots for rollback and possibility to boot into previous snapshots - this requires different subvolume layout. This blog post should be still be valid.
https://rootco.de/2018-01-19-opensuse-btrfs-subvolumes/
You will need to move your root content into proper subvolume.
I think all the volumes are as they should be:
/dev/sda3 on / type btrfs (rw,relatime,space_cache,subvolid=257,subvol=/@)
This means you installed this system with disabled snapshots.
/dev/sda3 on /boot/grub2/i386-pc type btrfs (rw,relatime,space_cache,subvolid=258,subvol=/@/boot/grub2/i386-pc) /dev/sda3 on /boot/grub2/x86_64-efi type btrfs (rw,relatime,space_cache,subvolid=259,subvol=/@/boot/grub2/x86_64-efi) /dev/sda3 on /home type btrfs (rw,relatime,space_cache,subvolid=260,subvol=/@/home) /dev/sda3 on /usr/local type btrfs (rw,relatime,space_cache,subvolid=264,subvol=/@/usr/local) /dev/sda3 on /opt type btrfs (rw,relatime,space_cache,subvolid=261,subvol=/@/opt) /dev/sda3 on /var/cache type btrfs (rw,relatime,space_cache,subvolid=265,subvol=/@/var/cache) /dev/sda3 on /tmp type btrfs (rw,relatime,space_cache,subvolid=263,subvol=/@/tmp) /dev/sda3 on /srv type btrfs (rw,relatime,space_cache,subvolid=262,subvol=/@/srv) /dev/sda3 on /var/crash type btrfs (rw,relatime,space_cache,subvolid=266,subvol=/@/var/crash) /dev/sda3 on /var/lib/libvirt/images type btrfs (rw,relatime,space_cache,subvolid=267,subvol=/@/var/lib/libvirt/images) /dev/sda3 on /var/lib/machines type btrfs (rw,relatime,space_cache,subvolid=268,subvol=/@/var/lib/machines) /dev/sda3 on /var/lib/mysql type btrfs (rw,relatime,space_cache,subvolid=271,subvol=/@/var/lib/mysql) /dev/sda3 on /var/lib/named type btrfs (rw,relatime,space_cache,subvolid=272,subvol=/@/var/lib/named) /dev/sda3 on /var/lib/mariadb type btrfs (rw,relatime,space_cache,subvolid=270,subvol=/@/var/lib/mariadb) /dev/sda3 on /var/lib/pgsql type btrfs (rw,relatime,space_cache,subvolid=273,subvol=/@/var/lib/pgsql) /dev/sda3 on /var/lib/mailman type btrfs (rw,relatime,space_cache,subvolid=269,subvol=/@/var/lib/mailman) /dev/sda3 on /var/log type btrfs (rw,relatime,space_cache,subvolid=274,subvol=/@/var/log) /dev/sda3 on /var/opt type btrfs (rw,relatime,space_cache,subvolid=275,subvol=/@/var/opt) /dev/sda3 on /var/spool type btrfs (rw,relatime,space_cache,subvolid=276,subvol=/@/var/spool) /dev/sda3 on /var/tmp type btrfs (rw,relatime,space_cache,subvolid=277,subvol=/@/var/tmp)
There is no single tool to do it, necessary steps are performed by different tools at different times during installation.
Is it more than the snapper command to set up snapshots?
It is more than snapper command to setup subvolume layout and of course other tools (like grub) need to expect the snapshots as well.
The thing about just following the docs does not really say how openSUSE ran the command(s) to set things up. I want to do exactly what the install should have done so that I am not missing something other tools (like zypper) might expect/use.
That is mostly what blog post was about. These are the steps that installer does.
It just seems that a step did not happen during installation. It was installed a while ago. I never really checked that snapshots were happening on this system.
On Sat, Jun 26, 2021 at 11:40 AM Andrei Borzenkov <arvidjaar@gmail.com> wrote:
On 26.06.2021 12:33, Roger Oberholtzer wrote:
On Fri, Jun 25, 2021 at 11:51 AM Andrei Borzenkov <arvidjaar@gmail.com> wrote:
On Fri, Jun 25, 2021 at 12:29 PM Roger Oberholtzer <roger.oberholtzer@gmail.com> wrote:
I have Tumbleweed installed on a computer at home. I was planning on updating it. I do not want to take a chance with the /usr merge change, so I want to have a snapshot just in case.
The strange thing is: snapper seems not to be configured.
It is a full btrfs install with everything as the install defaults to. There is ample free space (> 100 GB).
When I run snapper ls, I get:
The config 'root' does not exist. Likely snapper is not configured.
There is no /.snapshots dir, and there is nothing in /etc/snapper/configs.
No idea why it is this way.
How can I config snapper?
If you only want snapshots to access previous files - just configure snapper as documented.
If you want to use snapshots for rollback and possibility to boot into previous snapshots - this requires different subvolume layout. This blog post should be still be valid.
https://rootco.de/2018-01-19-opensuse-btrfs-subvolumes/
You will need to move your root content into proper subvolume.
I think all the volumes are as they should be:
/dev/sda3 on / type btrfs (rw,relatime,space_cache,subvolid=257,subvol=/@)
This means you installed this system with disabled snapshots.
/dev/sda3 on /boot/grub2/i386-pc type btrfs (rw,relatime,space_cache,subvolid=258,subvol=/@/boot/grub2/i386-pc) /dev/sda3 on /boot/grub2/x86_64-efi type btrfs (rw,relatime,space_cache,subvolid=259,subvol=/@/boot/grub2/x86_64-efi) /dev/sda3 on /home type btrfs (rw,relatime,space_cache,subvolid=260,subvol=/@/home) /dev/sda3 on /usr/local type btrfs (rw,relatime,space_cache,subvolid=264,subvol=/@/usr/local) /dev/sda3 on /opt type btrfs (rw,relatime,space_cache,subvolid=261,subvol=/@/opt) /dev/sda3 on /var/cache type btrfs (rw,relatime,space_cache,subvolid=265,subvol=/@/var/cache) /dev/sda3 on /tmp type btrfs (rw,relatime,space_cache,subvolid=263,subvol=/@/tmp) /dev/sda3 on /srv type btrfs (rw,relatime,space_cache,subvolid=262,subvol=/@/srv) /dev/sda3 on /var/crash type btrfs (rw,relatime,space_cache,subvolid=266,subvol=/@/var/crash) /dev/sda3 on /var/lib/libvirt/images type btrfs (rw,relatime,space_cache,subvolid=267,subvol=/@/var/lib/libvirt/images) /dev/sda3 on /var/lib/machines type btrfs (rw,relatime,space_cache,subvolid=268,subvol=/@/var/lib/machines) /dev/sda3 on /var/lib/mysql type btrfs (rw,relatime,space_cache,subvolid=271,subvol=/@/var/lib/mysql) /dev/sda3 on /var/lib/named type btrfs (rw,relatime,space_cache,subvolid=272,subvol=/@/var/lib/named) /dev/sda3 on /var/lib/mariadb type btrfs (rw,relatime,space_cache,subvolid=270,subvol=/@/var/lib/mariadb) /dev/sda3 on /var/lib/pgsql type btrfs (rw,relatime,space_cache,subvolid=273,subvol=/@/var/lib/pgsql) /dev/sda3 on /var/lib/mailman type btrfs (rw,relatime,space_cache,subvolid=269,subvol=/@/var/lib/mailman) /dev/sda3 on /var/log type btrfs (rw,relatime,space_cache,subvolid=274,subvol=/@/var/log) /dev/sda3 on /var/opt type btrfs (rw,relatime,space_cache,subvolid=275,subvol=/@/var/opt) /dev/sda3 on /var/spool type btrfs (rw,relatime,space_cache,subvolid=276,subvol=/@/var/spool) /dev/sda3 on /var/tmp type btrfs (rw,relatime,space_cache,subvolid=277,subvol=/@/var/tmp)
There is no single tool to do it, necessary steps are performed by different tools at different times during installation.
Is it more than the snapper command to set up snapshots?
It is more than snapper command to setup subvolume layout and of course other tools (like grub) need to expect the snapshots as well.
The thing about just following the docs does not really say how openSUSE ran the command(s) to set things up. I want to do exactly what the install should have done so that I am not missing something other tools (like zypper) might expect/use.
That is mostly what blog post was about. These are the steps that installer does.
I did look at that. Perhaps these commands are the bits related to snapper: btrfs subvolume create /@/.snapshots mkdir /@/.snapshots/1 btrfs subvolume create /@/.snapshots/1/snapshot btrfs subvolume set-default $(btrfs subvolume list / | grep "@/.snapshots/1/snapshot" | grep -oP '(?<=ID )[0-9]+') / Then make the info.xml file in /.snapshots/1/ <?xml version="1.0"?> <snapshot> <type>single</type> <num>1</num> <date>$DATE</date> <description>first root filesystem</description> </snapshot> Then: btrfs subvolume set-default $(btrfs subvolume list / | grep "@/.snapshots/1/snapshot" | grep -oP '(?<=ID )[0-9]+') / I was expecting a snapper command somewhere. But the blog post did not do that. Which makes me think something is still missing. My systems with working shńapshots have grub files in the snapshot directories. I think I want to set up having those created and used as well. It's also unclear if these commands can be done on a mounted file system. -- Roger Oberholtzer
On 26.06.2021 13:11, Roger Oberholtzer wrote:
On Sat, Jun 26, 2021 at 11:40 AM Andrei Borzenkov <arvidjaar@gmail.com> wrote:
On 26.06.2021 12:33, Roger Oberholtzer wrote:
On Fri, Jun 25, 2021 at 11:51 AM Andrei Borzenkov <arvidjaar@gmail.com> wrote:
On Fri, Jun 25, 2021 at 12:29 PM Roger Oberholtzer <roger.oberholtzer@gmail.com> wrote:
I have Tumbleweed installed on a computer at home. I was planning on updating it. I do not want to take a chance with the /usr merge change, so I want to have a snapshot just in case.
The strange thing is: snapper seems not to be configured.
It is a full btrfs install with everything as the install defaults to. There is ample free space (> 100 GB).
When I run snapper ls, I get:
The config 'root' does not exist. Likely snapper is not configured.
There is no /.snapshots dir, and there is nothing in /etc/snapper/configs.
No idea why it is this way.
How can I config snapper?
If you only want snapshots to access previous files - just configure snapper as documented.
If you want to use snapshots for rollback and possibility to boot into previous snapshots - this requires different subvolume layout. This blog post should be still be valid.
https://rootco.de/2018-01-19-opensuse-btrfs-subvolumes/
You will need to move your root content into proper subvolume.
I think all the volumes are as they should be:
/dev/sda3 on / type btrfs (rw,relatime,space_cache,subvolid=257,subvol=/@)
This means you installed this system with disabled snapshots.
/dev/sda3 on /boot/grub2/i386-pc type btrfs (rw,relatime,space_cache,subvolid=258,subvol=/@/boot/grub2/i386-pc) /dev/sda3 on /boot/grub2/x86_64-efi type btrfs (rw,relatime,space_cache,subvolid=259,subvol=/@/boot/grub2/x86_64-efi) /dev/sda3 on /home type btrfs (rw,relatime,space_cache,subvolid=260,subvol=/@/home) /dev/sda3 on /usr/local type btrfs (rw,relatime,space_cache,subvolid=264,subvol=/@/usr/local) /dev/sda3 on /opt type btrfs (rw,relatime,space_cache,subvolid=261,subvol=/@/opt) /dev/sda3 on /var/cache type btrfs (rw,relatime,space_cache,subvolid=265,subvol=/@/var/cache) /dev/sda3 on /tmp type btrfs (rw,relatime,space_cache,subvolid=263,subvol=/@/tmp) /dev/sda3 on /srv type btrfs (rw,relatime,space_cache,subvolid=262,subvol=/@/srv) /dev/sda3 on /var/crash type btrfs (rw,relatime,space_cache,subvolid=266,subvol=/@/var/crash) /dev/sda3 on /var/lib/libvirt/images type btrfs (rw,relatime,space_cache,subvolid=267,subvol=/@/var/lib/libvirt/images) /dev/sda3 on /var/lib/machines type btrfs (rw,relatime,space_cache,subvolid=268,subvol=/@/var/lib/machines) /dev/sda3 on /var/lib/mysql type btrfs (rw,relatime,space_cache,subvolid=271,subvol=/@/var/lib/mysql) /dev/sda3 on /var/lib/named type btrfs (rw,relatime,space_cache,subvolid=272,subvol=/@/var/lib/named) /dev/sda3 on /var/lib/mariadb type btrfs (rw,relatime,space_cache,subvolid=270,subvol=/@/var/lib/mariadb) /dev/sda3 on /var/lib/pgsql type btrfs (rw,relatime,space_cache,subvolid=273,subvol=/@/var/lib/pgsql) /dev/sda3 on /var/lib/mailman type btrfs (rw,relatime,space_cache,subvolid=269,subvol=/@/var/lib/mailman) /dev/sda3 on /var/log type btrfs (rw,relatime,space_cache,subvolid=274,subvol=/@/var/log) /dev/sda3 on /var/opt type btrfs (rw,relatime,space_cache,subvolid=275,subvol=/@/var/opt) /dev/sda3 on /var/spool type btrfs (rw,relatime,space_cache,subvolid=276,subvol=/@/var/spool) /dev/sda3 on /var/tmp type btrfs (rw,relatime,space_cache,subvolid=277,subvol=/@/var/tmp)
There is no single tool to do it, necessary steps are performed by different tools at different times during installation.
Is it more than the snapper command to set up snapshots?
It is more than snapper command to setup subvolume layout and of course other tools (like grub) need to expect the snapshots as well.
The thing about just following the docs does not really say how openSUSE ran the command(s) to set things up. I want to do exactly what the install should have done so that I am not missing something other tools (like zypper) might expect/use.
That is mostly what blog post was about. These are the steps that installer does.
I did look at that. Perhaps these commands are the bits related to snapper:
btrfs subvolume create /@/.snapshots mkdir /@/.snapshots/1 btrfs subvolume create /@/.snapshots/1/snapshot btrfs subvolume set-default $(btrfs subvolume list / | grep "@/.snapshots/1/snapshot" | grep -oP '(?<=ID )[0-9]+') /
Then make the info.xml file in /.snapshots/1/
<?xml version="1.0"?> <snapshot> <type>single</type> <num>1</num> <date>$DATE</date> <description>first root filesystem</description> </snapshot>
Then:
btrfs subvolume set-default $(btrfs subvolume list / | grep "@/.snapshots/1/snapshot" | grep -oP '(?<=ID )[0-9]+') /
I was expecting a snapper command somewhere.
This blog post describes how to create *subvolume layout* that is needed for snapshot rollback functionality. You still need to setup snapper itself and grub. You may also need to install additional packages (like zypper snapper plugin). Yes, unfortunately there is no single button that would do it post install. So unless your goal is to actually learn all the steps you are better off simply reinstalling.
But the blog post did not do that. Which makes me think something is still missing. My systems with working shńapshots have grub files in the snapshot directories. I think I want to set up having those created and used as well.
It's also unclear if these commands can be done on a mounted file system.
Of courses not.
On Sun, Jun 27, 2021 at 7:35 AM Andrei Borzenkov <arvidjaar@gmail.com> wrote:
It's also unclear if these commands can be done on a mounted file system.
Of courses not
Of course not for setting up the subvolumes and rearranging the files on their new homes. But all those are already set up. I only need to add one new subvolume for snapshots. Can't a new subvolume be created on a mounted file system? -- Roger Oberholtzer
On 27.06.2021 13:37, Roger Oberholtzer wrote:
On Sun, Jun 27, 2021 at 7:35 AM Andrei Borzenkov <arvidjaar@gmail.com> wrote:
It's also unclear if these commands can be done on a mounted file system.
Of courses not
Of course not for setting up the subvolumes and rearranging the files on their new homes. But all those are already set up. I only need to
No, they are not. You apparently miss the fact that for snapshot rolloback root cannot be on /@ subvolume.
add one new subvolume for snapshots. Can't a new subvolume be created on a mounted file system?
Yes, it can. It *must* be created on mounted filesystem.
-- Roger Oberholtzer
participants (3)
-
Andrei Borzenkov
-
Carlos E. R.
-
Roger Oberholtzer