Unable to rollback from read-only snapshot

The most current snapshot on my system is unbootable (long story). I’m booting into a prior read-only snapshot successfully, but when attempting a snapper rollback, I’m encountering this:

➜  ~ sudo snapper -v --debug rollback
constructing ProxySnapper object
executing command
Ambit is classic.
Creating read-only snapshot of default subvolume.THROW: dbus error exception
CAUGHT: dbus error exception
Creating snapshot failed.

Can’t see any more info in journalctl, so I’m at a bit of a loss and would appreciate any pointers.

btrfs subvolume list
➜  ~ sudo btrfs subvolume list /                           
ID 256 gen 78939 top level 5 path @
ID 257 gen 78993 top level 256 path @/var
ID 258 gen 78972 top level 256 path @/usr/local
ID 259 gen 78562 top level 256 path @/srv
ID 260 gen 78977 top level 256 path @/root
ID 261 gen 78562 top level 256 path @/opt
ID 262 gen 78993 top level 256 path @/home
ID 263 gen 63305 top level 256 path @/boot/grub2/x86_64-efi
ID 264 gen 63305 top level 256 path @/boot/grub2/i386-pc
ID 265 gen 78991 top level 256 path @/.snapshots
ID 266 gen 78942 top level 265 path @/.snapshots/1/snapshot
ID 453 gen 63305 top level 257 path @/var/lib/machines
ID 742 gen 78846 top level 265 path @/.snapshots/476/snapshot
ID 743 gen 78846 top level 265 path @/.snapshots/477/snapshot
ID 744 gen 78846 top level 265 path @/.snapshots/478/snapshot
ID 745 gen 78846 top level 265 path @/.snapshots/479/snapshot
ID 774 gen 78846 top level 265 path @/.snapshots/508/snapshot
ID 775 gen 78846 top level 265 path @/.snapshots/509/snapshot
ID 787 gen 78846 top level 265 path @/.snapshots/521/snapshot
ID 788 gen 78846 top level 265 path @/.snapshots/522/snapshot
ID 789 gen 78846 top level 265 path @/.snapshots/523/snapshot
ID 790 gen 78846 top level 265 path @/.snapshots/524/snapshot
ID 791 gen 78870 top level 265 path @/.snapshots/525/snapshot
ID 792 gen 78879 top level 265 path @/.snapshots/526/snapshot
ID 793 gen 78883 top level 265 path @/.snapshots/527/snapshot
ID 794 gen 78891 top level 265 path @/.snapshots/528/snapshot
ID 795 gen 78901 top level 265 path @/.snapshots/529/snapshot
ID 796 gen 78908 top level 265 path @/.snapshots/530/snapshot

fstab
➜  ~ cat /etc/fstab                               
/dev/system/root                           /                       btrfs  defaults                      0  0
/dev/system/root                           /var                    btrfs  subvol=/@/var                 0  0
/dev/system/root                           /usr/local              btrfs  subvol=/@/usr/local           0  0
/dev/system/root                           /srv                    btrfs  subvol=/@/srv                 0  0
/dev/system/root                           /root                   btrfs  subvol=/@/root                0  0
/dev/system/root                           /opt                    btrfs  subvol=/@/opt                 0  0
/dev/system/root                           /home                   btrfs  subvol=/@/home                0  0
/dev/system/root                           /boot/grub2/x86_64-efi  btrfs  subvol=/@/boot/grub2/x86_64-efi  0  0
/dev/system/root                           /boot/grub2/i386-pc     btrfs  subvol=/@/boot/grub2/i386-pc  0  0
UUID=85C8-70B8                             /boot/efi               vfat   utf8                          0  2
/dev/system/root                           /.snapshots             btrfs  subvol=/@/.snapshots          0  0
UUID=047C84337C842212                      /mnt/x                  ntfs   umask=0000,windows_names,hide_dot_files,discard,uid=1000,gid=1000,exec  0  0
/dev/mapper/cr_system-swap                 swap                    swap   defaults                      0  0

snapper list
➜  ~ sudo snapper list              
   # | Type   | Pre # | Date                         | User | Used Space | Cleanup | Description           | Userdata     
-----+--------+-------+------------------------------+------+------------+---------+-----------------------+--------------
  0  | single |       |                              | root |            |         | current               |              
  1+ | single |       | Mo 25 Mär 2024 13:37:29 CET  | root | 151,50 MiB |         | first root filesystem |              
476  | pre    |       | Fr 03 Mai 2024 14:10:16 CEST | root | 314,51 MiB | number  | zypp(zypper)          | important=yes
477  | post   |   476 | Fr 03 Mai 2024 14:10:30 CEST | root |   5,41 MiB | number  |                       | important=yes
478  | pre    |       | Fr 03 Mai 2024 22:53:42 CEST | root |  10,98 MiB | number  | zypp(packagekitd)     | important=yes
479  | post   |   478 | Fr 03 Mai 2024 22:57:06 CEST | root | 317,75 MiB | number  |                       | important=yes
508- | pre    |       | Di 07 Mai 2024 15:47:59 CEST | root | 327,49 MiB | number  | zypp(packagekitd)     | important=no 
509  | post   |   508 | Di 07 Mai 2024 15:49:05 CEST | root |  71,69 MiB | number  |                       | important=no 
521  | pre    |       | Di 07 Mai 2024 17:45:02 CEST | root |  79,88 MiB | number  | zypp(zypper)          | important=no 
522  | post   |   521 | Di 07 Mai 2024 17:45:16 CEST | root | 640,00 KiB | number  |                       | important=no 
523  | pre    |       | Di 07 Mai 2024 18:26:23 CEST | root |   1,19 MiB | number  | zypp(packagekitd)     | important=no 
524  | post   |   523 | Di 07 Mai 2024 18:27:12 CEST | root |   1,08 MiB | number  |                       | important=no 
525  | pre    |       | Di 07 Mai 2024 21:48:49 CEST | root |   1,73 MiB | number  | before update         | important=yes
526  | post   |   525 | Di 07 Mai 2024 21:53:40 CEST | root |  96,00 KiB | number  | after update          | important=yes
527  | pre    |       | Di 07 Mai 2024 22:02:25 CEST | root |  96,00 KiB | number  | before update         | important=yes
528  | post   |   527 | Di 07 Mai 2024 22:05:48 CEST | root | 272,00 KiB | number  | after update          | important=yes
529  | pre    |       | Di 07 Mai 2024 23:00:51 CEST | root | 352,00 KiB | number  | before update         | important=yes
530  | post   |   529 | Di 07 Mai 2024 23:04:18 CEST | root |  38,18 MiB | number  | after update          | important=yes

Upload output as root of

journalctl -b --full --no-pager

to https://paste.opensuse.org/

And show

btrfs filesystem usage -T /

Journalctl

btrfs filesystem usage -T /
➜  ~ sudo btrfs filesystem usage -T /                                             
Overall:
    Device size:                 201.12GiB
    Device allocated:            161.07GiB
    Device unallocated:           40.05GiB
    Device missing:                  0.00B
    Device slack:                    0.00B
    Used:                        150.68GiB
    Free (estimated):             47.31GiB      (min: 27.29GiB)
    Free (statfs, df):            47.31GiB
    Data ratio:                       1.00
    Metadata ratio:                   2.00
    Global reserve:              216.52MiB      (used: 0.00B)
    Multiple profiles:                  no

                           Data      Metadata System                              
Id Path                    single    DUP      DUP      Unallocated Total     Slack
-- ----------------------- --------- -------- -------- ----------- --------- -----
 1 /dev/mapper/system-root 155.01GiB  6.00GiB 64.00MiB    40.05GiB 201.12GiB     -
-- ----------------------- --------- -------- -------- ----------- --------- -----
   Total                   155.01GiB  3.00GiB 32.00MiB    40.05GiB 201.12GiB 0.00B

You could try

snapper --no-dbus ...

If anything, it may give some more information what goes wrong.

Sure thing.

snapper --no-dbus
➜  ~ sudo snapper --no-dbus -v --debug rollback      
[sudo] password for root: 
constructing ProxySnapper object
executing command
Snapper constructor
snapper version 0.10.7
libsnapper version 7.4.0
config_name:root root_prefix:/ disable_filters:false
loading file /etc/snapper/configs/root
key:SUBVOLUME value:/
key:FSTYPE value:btrfs
key:QGROUP value:1/0
SELinux support disabled
key:SYNC_ACL value:no
subvolume:/ filesystem:btrfs
number of ignore patterns:8
found 18 snapshots
Ambit is classic.
Creating read-only snapshot of default subvolume.THROW: open failed path://.snapshots/531 errno:2 (No such file or directory)
CAUGHT: open failed path://.snapshots/531 errno:2 (No such file or directory)
constructor SystemCmd: /usr/lib/snapper/plugins/10-sdbootutil.snapper create-snapshot-pre / btrfs 531
sout:4 serr:6
[0] fd:4 ev:0x1 [1] fd:6 ev:0x1
poll ret:2
NewLine out:true err:true
Text_Ci: NewLine:true
Text_Ci: NewLine:true
NewLine out:true err:true
Wait ret:10412
NewLine out:true err:true
Text_Ci: NewLine:true
Text_Ci: NewLine:true
NewLine out:true err:true
Wait:10412 pid:10412 stat:0 Ret:0
stopwatch 0.001591s for "/usr/lib/snapper/plugins/10-sdbootutil.snapper create-snapshot-pre / btrfs 531"
NewLine out:true err:true
NewLine out:true err:true
system() Returns:0
create snapshot failed, btrfs_util_create_snapshot_fd2() failed, errno:2 (No such file or directory)
THROW: create snapshot failed
CAUGHT: create snapshot failed
RETHROW: create snapshot failed
Snapper destructor
CAUGHT: create snapshot failed
Error (create snapshot failed).

Show

btrfs qgroup show /
btrfs qgroup show /
Qgroupid    Referenced    Exclusive   Path 
--------    ----------    ---------   ---- 
0/5           16.00KiB     16.00KiB   <toplevel>
0/256         52.00KiB     52.00KiB   @
0/257          5.00GiB      5.00GiB   @/var
0/258          2.58MiB    128.00KiB   @/usr/local
0/259         16.00KiB     16.00KiB   @/srv
0/260        162.98MiB    162.98MiB   @/root
0/261         16.00KiB     16.00KiB   @/opt
0/262        123.98GiB    123.93GiB   @/home
0/263         16.00KiB     16.00KiB   @/boot/grub2/x86_64-efi
0/264         16.00KiB     16.00KiB   @/boot/grub2/i386-pc
0/265        108.00KiB    108.00KiB   @/.snapshots
0/266         14.97GiB    151.50MiB   @/.snapshots/1/snapshot
0/453         16.00KiB     16.00KiB   @/var/lib/machines
0/706            0.00B        0.00B   <stale>
0/707            0.00B        0.00B   <stale>
0/722            0.00B        0.00B   <stale>
0/723            0.00B        0.00B   <stale>
0/740            0.00B        0.00B   <stale>
0/741            0.00B        0.00B   <stale>
0/742         14.85GiB    314.51MiB   @/.snapshots/476/snapshot
0/743         14.63GiB      5.41MiB   @/.snapshots/477/snapshot
0/744         14.63GiB     10.98MiB   @/.snapshots/478/snapshot
0/745         14.62GiB    317.75MiB   @/.snapshots/479/snapshot
0/766            0.00B        0.00B   <stale>
0/769            0.00B        0.00B   <stale>
0/770            0.00B        0.00B   <stale>
0/771            0.00B        0.00B   <stale>
0/772            0.00B        0.00B   <stale>
0/773            0.00B        0.00B   <stale>
0/774         14.86GiB    327.49MiB   @/.snapshots/508/snapshot
0/775         14.82GiB     71.69MiB   @/.snapshots/509/snapshot
0/776            0.00B        0.00B   <stale>
0/777            0.00B        0.00B   <stale>
0/778            0.00B        0.00B   <stale>
0/779            0.00B        0.00B   <stale>
0/780            0.00B        0.00B   <stale>
0/781            0.00B        0.00B   <stale>
0/782            0.00B        0.00B   <stale>
0/783            0.00B        0.00B   <stale>
0/784            0.00B        0.00B   <stale>
0/785            0.00B        0.00B   <stale>
0/786            0.00B        0.00B   <stale>
0/787         14.84GiB     79.88MiB   @/.snapshots/521/snapshot
0/788         14.83GiB    640.00KiB   @/.snapshots/522/snapshot
0/789         14.83GiB      1.19MiB   @/.snapshots/523/snapshot
0/790         14.97GiB      1.08MiB   @/.snapshots/524/snapshot
0/791         14.97GiB      1.73MiB   @/.snapshots/525/snapshot
0/792         14.76GiB     96.00KiB   @/.snapshots/526/snapshot
0/793         14.76GiB     96.00KiB   @/.snapshots/527/snapshot
0/794         14.76GiB    272.00KiB   @/.snapshots/528/snapshot
0/795         14.76GiB    352.00KiB   @/.snapshots/529/snapshot
0/796         14.86GiB     38.18MiB   @/.snapshots/530/snapshot

And

snapper get-config
snapper get-config
Key                    | Value
-----------------------+------
ALLOW_GROUPS           |      
ALLOW_USERS            |      
BACKGROUND_COMPARISON  | yes  
EMPTY_PRE_POST_CLEANUP | yes  
EMPTY_PRE_POST_MIN_AGE | 1800 
FREE_LIMIT             | 0.2  
FSTYPE                 | btrfs
NUMBER_CLEANUP         | yes  
NUMBER_LIMIT           | 2-10 
NUMBER_LIMIT_IMPORTANT | 4-10 
NUMBER_MIN_AGE         | 1800 
QGROUP                 | 1/0  
SPACE_LIMIT            | 0.5  
SUBVOLUME              | /    
SYNC_ACL               | no   
TIMELINE_CLEANUP       | yes  
TIMELINE_CREATE        | no   
TIMELINE_LIMIT_DAILY   | 10   
TIMELINE_LIMIT_HOURLY  | 10   
TIMELINE_LIMIT_MONTHLY | 10   
TIMELINE_LIMIT_WEEKLY  | 0    
TIMELINE_LIMIT_YEARLY  | 10   
TIMELINE_MIN_AGE       | 1800

Well, summary qroup is missing. You can either remove it from snapper config or create it on your root filesystem

btrfs qgroup create 1/0 /

It helps in estimating how much space snapshots consume in total.

The existing snapshots will be missing (they can be added), but future snapshots will be included in the summary.

That did the trick. You’re a star. Very much appreciate you taking the time, thank you.

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