Quote:
Originally Posted by
baris35
Maybe to define a target directory name and empty it in case df -H is above %95-%98 etc would be good. I do not demand more space, just deletion of consumed part section is okay.
Sorry, but i might be a bit slow:
if you have some data which you don't need at all (in this "target directory")
and it should be deleted automatically when the "disc" (i suppose what you mean is "filesystem") is 95% or 98% full - why can't that be deleted at first without getting the filesystem that full in first place?
Data is either nececssary or not: if it is, get a bigger disk and/or add a disk, make the filesystem bigger and avoid a full filesystem that way. If it is not necessary and you are prepared to throw it away at certain circumstance you can throw it away in first place, no?
Btw., you should nowadays ALWAYS use LVM (logical volume manager) and at most have the /boot and (if you use UEFI) the UEFI-system-partition as real partitions. Everything else (including the / FS) should come from a logical volume. It is easy to resize that logical volumes and resize the filesystems on them, minimising the administration overhead.
I use Linux on my desktop and my laptop and the following schema has worked best for me:
/dev/sda1 512MB mounted at /boot (for grub, the boot menu and the kernel images)
Everything else in a VG:
- 32GB swap (unecessary but Linux acts funny with suspend-to-RAM or suspend-to-disk when the paging space is smaller than the RAM and this is how much my laptop has installed)
- 20GB mounted at / (for the main OS installation)
- 20GB mounted at /altroot (this is for a secondary OS installation, comes in handy if for some reason the main installation goes to the fritz)
- 10GB mounted at /home (user data, resize according to necessity)
- 50GB mounted at /opt/images (all my virtual machines disk files go there, i use lots of virtual machines for test purposes but most only need barebone OS installations, therefore not much space necessary)
/ and /altroot are mounted vice versa: if i start the OS from what is normally /altroot it will be mounted at / and what is normally / will be mounted at /altroot instead. Everything else is mounted on its normal place. This way i have two separate OS installations and if one breaks i can still boot from the other and repair or even replace it. This has already saved my behind as the update from Xubuntu 17 to 18 left me with an unbootable system for no apparent reason.
I hope this helps.
bakunin