Missing snapshots and maybe other problems?

Hey, so I was doing an update using the update alias earlier and for some reason my system took a crap and reloaded the desktop partway through. I tried updating again but ran into some problems. I then tried to restore an old snapshot. The snapshot seemingly worked at first but when booting into the system after restoring it, it said that there was an error in regards to the kernel and it needing to be loaded first. So I ended up booting into a live environment and using chroot to reinstall grub and install a new kernel. I am now currently back in the working system but there are no snapshots created automatically or manually. I see nothing under snapper within Btrfs assistant and clicking on new does nothing either. Also, not sure if this will help, but updating the system says something along the lines of snapper missing type I think. And updating grub outputs what seems like snapshots that I can't access or boot from.

sudo update-grub
[sudo] password for adamj:         
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/garuda-dr460nized/theme.txt
Found linux image: /boot/vmlinuz-linux-zen
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux-zen.img
Found fallback initrd image(s) in /boot:  intel-ucode.img initramfs-linux-zen-fallback.img
Found linux image: /boot/vmlinuz-linux-cachyos
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux-cachyos.img
Found fallback initrd image(s) in /boot:  intel-ucode.img initramfs-linux-cachyos-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
grub-probe: error: cannot find a GRUB drive for /dev/sdc1.  Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sdc1.  Check your device.map.
Found Windows Boot Manager on /dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
Detecting snapshots ...
Found snapshot: 2022-02-27 23:41:18 | restore_backup_@_234140482                         | N/A  | N/A                                                                      |
Found snapshot: 2022-02-27 23:39:51 | restore_backup_@_234118553                         | N/A  | N/A                                                                      |
Found snapshot: 2022-02-27 23:38:00 | restore_backup_@_233951712                         | N/A  | N/A                                                                      |
Found snapshot: 2022-02-27 20:28:31 | restore_backup_@_234140482/.snapshots/380/snapshot | post | bubblewrap desktop-file-utils fprintd geoclue jre-openjdk-headless libng |
Found snapshot: 2022-02-27 20:28:26 | restore_backup_@_234140482/.snapshots/379/snapshot | pre  | pacman -Su                                                               |
Found snapshot: 2022-02-27 16:35:17 | restore_backup_@_234140482/.snapshots/378/snapshot | post | expat garuda-dr460nized geoip-database lib32-libjpeg-turbo libjpeg-turbo |
Found snapshot: 2022-02-27 16:35:15 | restore_backup_@_234140482/.snapshots/377/snapshot | pre  | pacman -Su                                                               |
Found snapshot: 2022-02-27 16:34:08 | restore_backup_@_234140482/.snapshots/376/snapshot | post | electron12                                                               |
Found snapshot: 2022-02-27 16:34:06 | restore_backup_@_234140482/.snapshots/375/snapshot | pre  | pacman -Rns electron12                                                   |
Found snapshot: 2022-02-26 01:32:16 | restore_backup_@_234140482/.snapshots/374/snapshot | post | yuzu-mainline-bin                                                        |
Found snapshot: 2022-02-26 01:32:15 | restore_backup_@_234140482/.snapshots/373/snapshot | pre  | pacman --remove -c -s -- yuzu-mainline-bin                               |
Found snapshot: 2022-02-26 00:34:57 | restore_backup_@_234140482/.snapshots/372/snapshot | post | clang expat garuda-dr460nized grub-btrfs intel-media-sdk jdk11-openjdk j |
Found snapshot: 2022-02-26 00:34:40 | restore_backup_@_234140482/.snapshots/371/snapshot | pre  | pacman -Su                                                               |
Found snapshot: 2022-02-26 00:31:43 | restore_backup_@_234140482/.snapshots/370/snapshot | post | yuzu-mainline-bin                                                        |
Found snapshot: 2022-02-26 00:31:41 | restore_backup_@_234140482/.snapshots/369/snapshot | pre  | pacman -S yuzu-mainline-bin                                              |
Found snapshot: 2022-02-18 05:40:28 | restore_backup_@_233800042                         | N/A  | N/A                                                                      |
Found snapshot: 2022-02-18 05:23:11 | restore_backup_@_054028336                         | N/A  | N/A                                                                      |
Found snapshot: 2022-02-18 05:21:35 | restore_backup_@_052311921                         | N/A  | N/A                                                                      |
Found snapshot: 2022-02-18 05:17:47 | restore_backup_@_052135433                         | N/A  | N/A                                                                      |
Found snapshot: 2022-02-08 05:05:33 | restore_backup_@_051747333                         | N/A  | N/A                                                                      |
Found snapshot: 2022-02-06 04:01:18 | restore_backup_@_050533893                         | N/A  | N/A                                                                      |
Found snapshot: 2022-02-02 23:12:52 | restore_backup_@_040118184                         | N/A  | N/A                                                                      |
Found snapshot: 2022-02-02 22:46:57 | restore_backup_@_231252474                         | N/A  | N/A                                                                      |
Found snapshot: 2022-02-02 20:53:07 | restore_backup_@_224657520                         | N/A  | N/A                                                                      |
Found 24 snapshot(s)
Unmount /tmp/grub-btrfs.jQvoP2PuWs .. Success
Found memtest86+ image: /boot/memtest86+/memtest.bin
done

System:
  Kernel: 5.16.11-1-cachyos x86_64 bits: 64 compiler: gcc v: 11.2.0
    parameters: BOOT_IMAGE=/restore_backup_@_205307865/boot/vmlinuz-linux-cachyos
    root=UUID=95b636ca-42a5-47b4-9b7a-038581af6cdf rw
    rootflags=subvol=restore_backup_@_205307865 quiet splash
    rd.udev.log_priority=3 vt.global_cursor_default=0
    resume=UUID=41193397-191d-45b5-8c2b-405cf71e73b2 loglevel=3
  Desktop: KDE Plasma 5.24.2 tk: Qt 5.15.2 info: latte-dock
    wm: kwin_wayland vt: 2 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
  Type: Laptop System: ASUSTeK product: X510UA v: 1.0
    serial: <superuser required>
  Mobo: ASUSTeK model: X510UA v: 1.0 serial: <superuser required>
    UEFI: American Megatrends v: X510UA.312 date: 04/29/2020
Battery:
  ID-1: BAT0 charge: 6.2 Wh (22.1%) condition: 28.1/42.1 Wh (66.9%)
    volts: 11.5 min: 11.5 model: ASUSTeK ASUS Battery type: Li-ion serial: N/A
    status: Discharging cycles: 440
CPU:
  Info: model: Intel Core i7-7500U bits: 64 type: MT MCP
    arch: Amber/Kaby Lake note: check family: 6 model-id: 0x8E (142)
    stepping: 9 microcode: 0xEC
  Topology: cpus: 1x cores: 2 tpc: 2 threads: 4 smt: enabled cache:
    L1: 128 KiB desc: d-2x32 KiB; i-2x32 KiB L2: 512 KiB desc: 2x256 KiB
    L3: 4 MiB desc: 1x4 MiB
  Speed (MHz): avg: 2476 high: 2734 min/max: 400/3500 scaling:
    driver: intel_pstate governor: performance cores: 1: 2511 2: 2678 3: 1983
    4: 2734 bogomips: 23220
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf
    mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional,
    IBRS_FW, STIBP: conditional, RSB filling
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel HD Graphics 620 vendor: ASUSTeK driver: i915 v: kernel
    bus-ID: 00:02.0 chip-ID: 8086:5916 class-ID: 0300
  Device-2: IMC Networks VGA UVC WebCam type: USB driver: uvcvideo
    bus-ID: 1-6:3 chip-ID: 13d3:5a07 class-ID: 0e02 serial: <filter>
  Display: wayland server: X.Org 1.22.1 compositor: kwin_wayland driver:
    loaded: intel unloaded: modesetting alternate: fbdev,vesa display-ID: :1
    screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x286mm (20.0x11.3")
    s-diag: 583mm (23")
  Monitor-1: XWAYLAND0 res: 1920x1080 hz: 60 dpi: 143
    size: 340x190mm (13.4x7.5") diag: 389mm (15.3")
  OpenGL: renderer: Mesa Intel HD Graphics 620 (KBL GT2) v: 4.6 Mesa 21.3.7
    direct render: Yes
Audio:
  Device-1: Intel Sunrise Point-LP HD Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel alternate: snd_soc_skl bus-ID: 00:1f.3
    chip-ID: 8086:9d71 class-ID: 0403
  Sound Server-1: ALSA v: k5.16.11-1-cachyos running: yes
  Sound Server-2: PulseAudio v: 15.0 running: no
  Sound Server-3: PipeWire v: 0.3.47 running: yes
Network:
  Device-1: Intel Wireless 8265 / 8275 driver: iwlwifi v: kernel
    bus-ID: 02:00.0 chip-ID: 8086:24fd class-ID: 0280
  IF: wlp2s0 state: up mac: <filter>
  IF-ID-1: virbr0 state: down mac: <filter>
Bluetooth:
  Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8
    bus-ID: 1-8:4 chip-ID: 8087:0a2b class-ID: e001
  Report: bt-adapter ID: hci0 rfk-id: 0 state: down
    bt-service: enabled,running rfk-block: hardware: no software: yes
    address: <filter>
Drives:
  Local Storage: total: 961.34 GiB used: 102.87 GiB (10.7%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 870 EVO 500GB
    size: 465.76 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    type: SSD serial: <filter> rev: 1B6Q scheme: GPT
  ID-2: /dev/sdb maj-min: 8:16 vendor: Samsung model: SSD 860 EVO M.2 500GB
    size: 465.76 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    type: SSD serial: <filter> rev: 1B6Q scheme: GPT
  ID-3: /dev/sdc maj-min: 8:32 type: USB vendor: SanDisk
    model: Cruzer Force size: 29.81 GiB block-size: physical: 512 B
    logical: 512 B type: N/A serial: <filter> rev: 1.00 scheme: MBR
  SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
Partition:
  ID-1: / raw-size: 448.4 GiB size: 448.4 GiB (100.00%)
    used: 102.84 GiB (22.9%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 27.9 MiB (9.3%) fs: vfat dev: /dev/sda1 maj-min: 8:1
  ID-3: /home raw-size: 448.4 GiB size: 448.4 GiB (100.00%)
    used: 102.84 GiB (22.9%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
  ID-4: /var/log raw-size: 448.4 GiB size: 448.4 GiB (100.00%)
    used: 102.84 GiB (22.9%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
  ID-5: /var/tmp raw-size: 448.4 GiB size: 448.4 GiB (100.00%)
    used: 102.84 GiB (22.9%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: zram size: 15.51 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
  ID-2: swap-2 type: partition size: 17.06 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/sda3 maj-min: 8:3
Sensors:
  System Temperatures: cpu: 57.0 C pch: 44.5 C mobo: N/A
  Fan Speeds (RPM): cpu: 3100
Info:
  Processes: 254 Uptime: 9m wakeups: 1 Memory: 15.51 GiB
  used: 3.12 GiB (20.1%) Init: systemd v: 250 tool: systemctl Compilers:
  gcc: 11.2.0 clang: 13.0.1 Packages: pacman: 1567 lib: 391 Shell: fish
  v: 3.3.1 running-in: konsole inxi: 3.3.12
Garuda (2.5.5-1):
  System install date:     2022-02-23
  Last full system update: 2022-02-28
  Is partially upgraded:   No
  Relevant software:       NetworkManager
  Windows dual boot:       Probably (Run as root to verify)
  Snapshots:               Snapper
  Failed units:            systemd-sysctl.service
Invalid snapshot '--type'.
==> root: 
(8/8) Syncing all file systems...

Just noticed that under the root config there is nothing but when ticking the restore mode box it shows snapshots again

It looks like there was a failure in restoring your snapshot. The snapshot was restored but it failed to restore the nested subvols.

The good news is that it is easy to fix. You need to mount the root(subvolid=5) of your btrfs partition and then move the .snapshots subvol. For example, if you mount it to /mnt, the command would be

sudo mv /mnt/restore_backup_@_234140482/.snapshots /mnt/@/.snapshots
3 Likes

Hi, thanks for the reply. Definitely sounds like this would fix my problem. I'm not familiar at all with snapper yet so I tried running that command but it said no such file or directory. Do I need to run a command prior such as mounting snapper into the /mnt directory and then running that command? Thanks for the help I do appreciate it.

Okay nevermind I realised what I did wrong. So I mounted /dev/sda2 to /mnt and then ran the above command. Waiting for it to complete currently. Should I then simply reboot or do anything else like restoring it?

Okay so I ran that command and rebooted but still nothing under Btrfs assistant and my latest snapper backup within the grub menu is 3 hours old with the name "restore_backup_@_234140482". So it seems your suggestion didn't fix it unfortunately @dalto

Are you sure you mounted the subvolid=5?
In my opinion (looking at similar previous topics, I'm no expert here) it should be something like:

sudo mount /dev/sda2 /mnt -o subvolid=5
sudo rmdir /mnt/@/.snapshots
sudo mv /mnt/restore_backup_@_234140482/.snapshots /mnt/@/.snapshots
sudo umount /mnt
2 Likes

Thanks, I thought this would be an easy task but for whatever reason I am getting operation not permitted error's whatever I try. Even trying to move the folder to an external hard drive first and then back to the destination directory.

It would be incredibly helpful if you always posted the input and output from the terminal, as text.

3 Likes

Maybe try this before the mv

sudo rmdir /mnt/@/.snapshots

Added also above for completeness.

3 Likes

Right sorry I'm not at my laptop currently but I would have if I was

Okay I'll try that in a few minutes when I can thank you

Okay, so a bit of progress now thanks to your guys help. I now have moved restore_backup_@_234140482/.snapshots into /mnt/@/.snapshots

However, after a reboot, there is nothing under Btrfs assistant still.

ls /mnt/@/.snapshots/
drwxr-xr-x - root 28 Feb 03:48  369
drwxr-xr-x - root 28 Feb 03:49  370
drwxr-xr-x - root 28 Feb 03:49  371
drwxr-xr-x - root 28 Feb 03:49  372
drwxr-xr-x - root 28 Feb 03:49  373
drwxr-xr-x - root 28 Feb 03:49  374
drwxr-xr-x - root 28 Feb 03:49  375
drwxr-xr-x - root 28 Feb 03:49  376
drwxr-xr-x - root 28 Feb 03:50  377
drwxr-xr-x - root 28 Feb 03:50  378
drwxr-xr-x - root 28 Feb 03:50  379
drwxr-xr-x - root 28 Feb 03:50  380

Have you sudo umount /mnt?
What is the output of
sudo btrfs subvolume list / ?

1 Like

Yes I have unmounted /mnt

ID 256 gen 35133 top level 5 path restore_backup_@_205307865
ID 257 gen 35133 top level 5 path @home
ID 258 gen 35127 top level 5 path @root
ID 259 gen 20636 top level 5 path @srv
ID 260 gen 35133 top level 5 path @cache
ID 261 gen 35133 top level 5 path @log
ID 262 gen 35121 top level 5 path @tmp
ID 263 gen 35115 top level 656 path @/.snapshots
ID 408 gen 35062 top level 5 path restore_backup_@_224657520
ID 493 gen 35062 top level 5 path restore_backup_@_231252474
ID 500 gen 35062 top level 5 path restore_backup_@_040118184
ID 519 gen 35062 top level 5 path restore_backup_@_050533893
ID 544 gen 35062 top level 5 path restore_backup_@_051747333
ID 615 gen 35062 top level 5 path restore_backup_@_052135433
ID 616 gen 35062 top level 5 path restore_backup_@_052311921
ID 617 gen 35062 top level 5 path restore_backup_@_054028336
ID 626 gen 35062 top level 5 path restore_backup_@_233800042
ID 641 gen 8858 top level 263 path @/.snapshots/369/snapshot
ID 642 gen 8858 top level 263 path @/.snapshots/370/snapshot
ID 643 gen 8858 top level 263 path @/.snapshots/371/snapshot
ID 644 gen 8858 top level 263 path @/.snapshots/372/snapshot
ID 645 gen 8858 top level 263 path @/.snapshots/373/snapshot
ID 646 gen 9228 top level 263 path @/.snapshots/374/snapshot
ID 647 gen 9340 top level 263 path @/.snapshots/375/snapshot
ID 648 gen 8858 top level 263 path @/.snapshots/376/snapshot
ID 649 gen 9221 top level 263 path @/.snapshots/377/snapshot
ID 650 gen 8858 top level 263 path @/.snapshots/378/snapshot
ID 651 gen 9216 top level 263 path @/.snapshots/379/snapshot
ID 652 gen 9126 top level 263 path @/.snapshots/380/snapshot
ID 653 gen 35062 top level 5 path restore_backup_@_233951712
ID 654 gen 35062 top level 5 path restore_backup_@_234118553
ID 655 gen 35061 top level 5 path restore_backup_restore_backup_@_234140482_005828109
ID 656 gen 35115 top level 5 path @
ID 657 gen 35114 top level 5 path restore_backup_@_234140482

Can you share the output of the command findmnt /

1 Like
TARGET SOURCE                                 FSTYPE OPTIONS
/      /dev/sda2[/restore_backup_@_205307865] btrfs  rw,noatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvolid=256,subvol=/restore_backup_@_205307865

You're still booted into a snapshot. The BTRFS Assistant advised you to reboot immediately, did you not do that?

1 Like

I'm not booted into a snapshot. I've rebooted like 10 times in the past hour not into a snapshot

You are booted into a snapshot. You must have somehow overwritten your grub config while in a snapshot. If I am being honest, I am not sure how that could happen since when you boot into a snapshot there is an overlayfs in place.

2 Likes