My root partition was 100% full. I moved files from /var/log to an external disk. How can I find out which files from this partition are not needed and could be moved / deleted?
/dev/mapper/centos-root 50G 47G 3.4G 94% /
devtmpfs 3.8G 0 3.8G 0% /dev
tmpfs 3.8G 8.0K 3.8G 1% /dev/shm
tmpfs 3.8G 49M 3.8G 2% /run
tmpfs 3.8G 0 3.8G 0% /sys/fs/cgroup
/dev/sdc 1.9T 509G 1.4T 28% /media/backup1
/dev/sda1 494M 316M 179M 64% /boot
/dev/sdd 1.8T 549G 1.3T 30% /media/backup
/dev/mapper/centos-home 1.9T 515G 1.4T 27% /home
tmpfs 771M 0 771M 0% /run/user/0
tmpfs 771M 0 771M 0% /run/user/1000
[root@home /]# du -sch *
0 bin
290M boot
8.0K dev
54M etc
515G home
0 lib
0 lib64
1.1T media
0 mnt
17M opt
du: cannot access ‘proc/17149/task/17149/fd/4’: No such file or directory
du: cannot access ‘proc/17149/task/17149/fdinfo/4’: No such file or directory
du: cannot access ‘proc/17149/fd/4’: No such file or directory
du: cannot access ‘proc/17149/fdinfo/4’: No such file or directory
0 proc
4.0K razor-agent.log
60M root
49M run
0 sbin
0 srv
0 sys
240K tmp
3.6G usr
39G var
1.6T total
/root partition full
-
- Posts: 45
- Joined: 2014/12/21 01:03:40
Re: /root partition full
I expect most of the space is taken by applications in /usr. You could remove unwanted applications. If that does not provide you with enough free space then you are going to have to increase the size of your root partition.
Re: /root partition full
39 GB in /var sounds a lot. What is in her. Big databases? Virtual machine images?
Drill deeper into /var to find out what is taking up the space there.
Try for example:
to find all files larger than 10 MB.
Drill deeper into /var to find out what is taking up the space there.
Try for example:
Code: Select all
sudo find /var -size 10M -exec ls -ld {} \;
Re: /root partition full
Run du -m -x --max-depth=1 /var and find the largest culprit there then repeat the command on /var/largestdir and keep repeating until you find the problem directory and then look at its contents.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
-
- Posts: 133
- Joined: 2016/11/20 11:58:45
Re: /root partition full
The biggest chunk is in /var/www/html/... A store pictures / movies for my galleries.
Let me see whether I can move to /home and still access from my webserver application (piwigo)
Thanks for the hint
Let me see whether I can move to /home and still access from my webserver application (piwigo)
Thanks for the hint