37GB /, ~2GB free, no space left on device, snapper fills partition,how to configure/stop snapper ?

After i opened and closed this topic :
https://forums.opensuse.org/showthread.php/523679-system-hangs-and-then-reboots-to-CLI-snapshot-is-full-how-to-recue

i also read this topic :
https://forums.opensuse.org/showthread.php/521290-snapshots-are-filling-root-directory-up

And other topics about the same problem that seems to be very frequent on opensuse leap 42.2

Yesterday, during an update with Yast2 , i was also suddenly losing my GUI and had to do some snapper cleaning with the command
snapper rm **- **

It’s the third time it happens since i jumped into 42.2, coming from 13.1 .

I cannot live with such instability.
My root partition is ~37GB and the free space is ~2GB . And i don’t want to erase anything .

How can i manage to stay away from such instability ?

Is it safe to reduce the number of snapshots in /etc/snapper/configs/root , as recommanded in other topics ?

Should i turn off snapper ?

How to turn off snapper ?

Is it safe to turn off snapper ?

Here https://forums.opensuse.org/showthread.php/523679-system-hangs-and-then-reboots-to-CLI-snapshot-is-full-how-to-recue?p=2815734#post2815734

Christophe_deR](https://forums.opensuse.org/member.php/2672-Christophe_deR) wrote this : " Yes / (and /home is on the same partition) is on btrfs "

IF you are using your btrfs partition for both root / and /home this may contribute to your disk usage problem.

Terminal command df -h confirms partitions used for both root / and /home

Earlier self was advised best keep root / and /home in separate partitions.
**
IF** using both on same partition, consider your /home location may contribute more to your disk usage problem than btrfs, so perhaps need consider creating separate partition to use for /home

Others more knowledgeable than self know how to safely move /home from one partition to another.

.

Thnak you for your answers

But there are some other questions that i would like to solve :

Is it safe to reduce the number of snapshots in /etc/snapper/configs/root , as recommanded in other topics ?

Should i turn off snapper ?

How to turn off snapper ?

Is it safe to turn off snapper ?

Here is a snapper instruction page

https://en.opensuse.org/Portal:Snapper

It is safe to turn off it is safe to remove snapshots up to the 0 number

only use snapper utilities to remove/view snap shots. SEE INSTRUCTIONS above

If you have home on the same partition as root that can take up a good amount of space… Moving it to it’s own space will help a lot.

Make a backup of important things before doing things like this;)


How: 
1 Prepare a partition to copy the home files. Make and format it with a Linux file system ext4 or xfs are recommended. Large enough to at least hold all home data
2 copy all data from current home to new partition. Note only the data IN home not home itself
3 log into terminal mode.At boot press e find line starting linux or linuxefi go to end (it wraps) add space and 3 press F10 to continue boot
   Log in to terminal as root. change to /home (cd /home) erase all files (rm  -R *)  NOTE be very sure you are in home if in root / then you erase the whole system because you are root :'(   
   run command line yast. type yast select partitions and set the new partition to mount as /home. Be sure not to format it.
 Quit yast and reboot (type reboot)

      If all went well your home should now be on the new partition and you have freed up a lot of space on /

Take it slow and be sure you understand each step before proceeding. If you don’t understand something ask do not guess

Thanks for your answer.
I prefer to have home on my / because i lack of space .
I cleaned a lot of non essential datas, and i can breathe now.

I think snapper is dangerous for those running out of space on small partitions <40GB .
Installer should turn snapper off in such case .

Sorry if i post this in this thread and in another one, but i really need help :
Because i get crashes around 4 or 5 times a week, now i really need to get rid of this ***** snapper : tell me how can i kick it away from my system, please

Remove all snapshots ( for i in seq 1 100; do snapper delete $i; done )
Uninstall all snapper related software ( zypper rm “snapper” )

If you have more than 100 snapshots ( snapper list ) adjust the values.

I guess you could use snapper delete 1-100 as well.

Reboot.

Can i also remove /.snapshot folder ?

I think it might be dangerous to manually delete files/directories connected to snapper. You should manage snapper through the appropriate commands.

Thanks to all for your answers
But now, i have removed all snapper packages
Is it safe to remove /.snapshots , now ?

No you did it Backwards remove all but first snapshot then remove snapper. Snapper is embedded into the BTRFS file system. it is part and parcel removing the first snap will break the file system. Manually removing snaps or snap directries will break the file system. Use only snapper utilities to modify snaps

Ah…

So i should:

  • re-install the uninstalled snapper packages,
  • type “snapper rm 0-xxx” ( or “snapper rm 1-???” ) ,
  • check if /.snapshots is empty ,
  • and then uninstall again every snapper packages ?

Am i right ?

Sounds much better to me :wink:

Just using the tools to delete snapshots and configuring snapshot to make no more snapshots should do the trick also IMHO.

OK, thanks again.
Now it looks like /.snapshots contains 3 directories :
1
104
124

The 2 last are empty, and the snapshot 1 contains about 7GB .
On a 37 GB partition, that’s a lot.
Can i try a “snapper rm 1” ? Or is it too risky ?

Risky. Removing could bork the system also note that snapshots do not show up like normal files you must use the snapper tools to see what is really there. Back up anything important before trying

Because of the odd way you set up with home on root and only 37 gig I suggest you reinstall using ext4 instead of BTFS if you must confine your self to such a small space.

Because home is on root you will lose whatever is there so backup any important files. If home was on it’s own partition then you could reinstall without touching home

No. I am not going to do anything. Too late. I have been through too much instability.
I have been working for days to adapt from 13.1 .
I have no time for such things, sorry. Though i’d love to have such time, like when i was the university.
Anyway, i thank you very much for your help.