I had a root directory filling warning during my last zypper dup. I had a look with the snapper command:-
alastair@IBMW530:~> sudo snapper --config root list
[sudo] password for root:
# | Type | Pre # | Date | User | Used Space | Cleanup | Description | Userdat
a
------+--------+-------+------------------------------+------+------------+---------+-----------------------+--------
------
0 | single | | | root | | | current |
1* | single | | Mon 04 May 2020 23:29:08 BST | root | 278.89 MiB | | first root filesystem |
1637 | pre | | Tue 22 Feb 2022 22:48:00 GMT | root | 238.89 MiB | number | zypp(zypper) | importa
nt=yes
1638 | post | 1637 | Tue 22 Feb 2022 22:48:27 GMT | root | 1.23 MiB | number | | importa
nt=yes
1639 | pre | | Tue 22 Feb 2022 23:06:32 GMT | root | 4.03 MiB | number | zypp(zypper) | importa
nt=no
1640 | post | 1639 | Tue 22 Feb 2022 23:11:45 GMT | root | 78.06 MiB | number | | importa
nt=no
alastair@IBMW530:~>
Seemed OK to me and what is shown above is what I have after deleting a couple of snapshots with snapper. However I couldn’t see all the numbers I had seen . This is what I have in my root directory:-
**IBMW530:/.snapshots #** ls
**1****1548****1551****1637****1638****1639****1640** grub-snapshot.cfg
**IBMW530:/.snapshots #**
The rogue snapshots are 1548 and 1551 which do not appear, as can be seen from the snapper command. Neither can snapper delete them using the snapper command
No idea why they are there but I could not delete them in the crude manner I expected:-
**IBMW530:/.snapshots #** rm -r 1548
This command gave me very many read only files scrolling past my screen. What is correct command to force removal please?
Hi
The filesystem is read-only? Check the output from the command mount. That snapshot does not look correct… I think you have a bigger issue going on…
Really? You have one file with the name 1154815511637163816391640? Do you actually read what you post? And you are mistaken, using colors and different fonts does not make your posts more readable, just the opposite - it distracts from the content.
No idea why they are there but I could not delete them in the crude manner I expected:-
**IBMW530:/.snapshots #** rm -r 1548
This command gave me very many read only files scrolling past my screen.
Snapshots are read-only by definition, you cannot delete anything inside snapshot, why are you surprised?
Hi arvidjaar,
I am not familiar with snapper so was not aware that snapshots were read only.
The garbled cut and paste is not my doing and I had not seen the string of numbers until I saw the post.
The colour scheme is new to me too and not set by me. Must be a default somewhere in a recent upgrade.
Will post the info when I am back at the relevant machine.
Thank you for your reply.
Budge
I apologise for the colour scheme which I did not chose but it seems reasonable to me. I believe blue is for directories and red is because I am running as su for this exercise. No idea why the first version was munged.
Here is the result of the suggested command:-
**IBMW530:/.snapshots #** btrfs subvolume list /
ID 256 gen 45401 top level 5 path @
ID 257 gen 488510 top level 256 path @/var
ID 258 gen 388900 top level 256 path @/usr/local
ID 259 gen 488500 top level 256 path @/tmp
ID 260 gen 388900 top level 256 path @/srv
ID 261 gen 488500 top level 256 path @/root
ID 262 gen 488492 top level 256 path @/opt
ID 263 gen 488407 top level 256 path @/boot/grub2/x86_64-efi
ID 264 gen 143028 top level 256 path @/boot/grub2/i386-pc
ID 265 gen 488461 top level 256 path @/.snapshots
ID 266 gen 488503 top level 265 path @/.snapshots/1/snapshot
ID 1968 gen 356750 top level 265 path @/.snapshots/1548/snapshot
ID 1975 gen 360898 top level 265 path @/.snapshots/1551/snapshot
ID 2071 gen 388905 top level 265 path @/.snapshots/1637/snapshot
ID 2072 gen 388955 top level 265 path @/.snapshots/1638/snapshot
ID 2073 gen 488239 top level 265 path @/.snapshots/1639/snapshot
ID 2074 gen 488406 top level 265 path @/.snapshots/1640/snapshot
**IBMW530:/.snapshots #**
This looks OK to me but the two out of sequence snapshots are what I wish to remove.