0

My 20.04 PC has a 128GB SSD on which / is mounted.

I have an additional 1TB SSD for homes mounted at /home. All done in fstab which I'm fairly confident with.

/ (on /dev/sda2) is showing around 97% full in GParted and I know if this fills I'll have problems. (I'm assuming this is filling due to installing apps etc?).

What's a good way to prevent this happening? What would be a good directory on / to mount elsewhere? /var looks the largest at 29GB so should I move this to another disk (create a new partition on the 1TB?) and create a new mount point in fstab? If so, what's the best way to copy? just with cp or use rsync?

Or is there better way? I also have a 480GB SSD with two partitions I use for backups and VMs mounted at /mnt/bu & /mnt/vms which I guess I could re-purpose to hold all on /.

Thanks

   ~$ sudo du -smc /var/*
[sudo] password for roger: 
7   /var/backups
196 /var/cache
1   /var/crash
29589   /var/lib
1   /var/local
0   /var/lock
1   /var/log
1   /var/mail
1   /var/metrics
13  /var/opt
0   /var/run
31  /var/snap
70  /var/spool
1   /var/tmp
518 /var/www
30421   total

sudo du -smc /* --exclude=/proc --exclude=/run 15 /bin 190 /boot 1 /cdrom 0 /dev 18 /etc 182861 /home 0 /initrd.img 0 /initrd.img.old 1489 /lib 1 /lib64 1 /lost+found 1 /media 1583995 /mnt 4294 /opt 1700 /root 14 /sbin 48696 /snap 1 /srv 2049 /swapfile 0 /sys 2 /tmp 9000 /usr 30421 /var 0 /vmlinuz 0 /vmlinuz.old 1864738 total

Roger06
  • 133

1 Answers1

1

A 128 GB directory for the system only, i.e., no user directories and user data, is incredibly plenty for a linux system. A fat linux system with plenty of applications will rarely need more than 30GB. It will therefore be up to you to see what else is still taking space in that 128 GB / partition.

In other words, moving out system directories to other partitions will not be your solution. Your solution will be to find out what else apart from the system files is taking that much space, and move that out, whatever it is.

Tools like du, ncdu, or graphical tools like Baobab allow to explore what is consuming space on a partition.

vanadium
  • 97,564