[root@dns ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/cos-root 499G 494G 5.2G 99% / devtmpfs 2.9G 0 2.9G 0% /dev tmpfs 2.9G 0 2.9G 0% /dev/shm tmpfs 2.9G 8.7M 2.9G 1% /run tmpfs 2.9G 0 2.9G 0% /sys/fs/cgroup /dev/vda1 985M 202M 733M 22% /boot tmpfs 581M 0 581M 0% /run/user/0 tmpfs 581M 0 581M 0% /run/user/1002 actual size of my sites is about 70gb size of /var folder is about 7 gb can you help me figure out this problem and how to solve it.
Hello there, Something is obviously using a lot of space. You can track down the larger folders by using the following command. du -h --max-depth=1 / Code (markup): You can keep changing the final directory query once you start seeing where the larger folders are to dig deeper, for example: du -h --max-depth=1 /home Code (markup): Regards, Chris
Hello, with further investigation [root@dns ~]# du -h --max-depth=1 /home 0 /home/cPanelInstall 1.1M /home/.cpcpan 69G /home/virtfs 168M /home/cpanelsolr 16K /home/clamav 47G /home/sumdueu 116G /home [root@dns ~]# du -h --max-depth=1 / 231M /boot 0 /dev du: cannot access ‘/proc/7647/task/7647/fd/4’: No such file or directory du: cannot access ‘/proc/7647/task/7647/fdinfo/4’: No such file or directory du: cannot access ‘/proc/7647/fd/4’: No such file or directory du: cannot access ‘/proc/7647/fdinfo/4’: No such file or directory du: cannot access ‘/proc/7710’: No such file or directory du: cannot access ‘/proc/7711’: No such file or directory du: cannot access ‘/proc/7714’: No such file or directory du: cannot access ‘/proc/7715’: No such file or directory 0 /proc 8.4M /run 0 /sys 1.3G /etc 16M /root 11G /var 196K /tmp 11G /usr 47G /home 0 /media 0 /mnt 165M /opt 0 /srv 0 /backup 70G / i am unable to find more than 250 gb where it is being used.
Just enter high volume directory and use mentioned command to trace used directory.By default /var directory stored all kind of logs files,So trace out which file more big. #cd /DirectoryName #du -sch * Code (markup):
I tried this command but still unable to find any very directory. by all different types of commands i used, all shows about 70 gb is actually used by my vps. but unable to find or get any idea where about 350 gb used on vps.
Just put exact command to your terminal and send here output of command. # cd / #ls #du -sch * Code (markup): Before submit command ,ensure you are in root directory.
[root@dns ~]# cd / [root@dns /]# ls backup hs_err_pid21856.log lib sbin bin hs_err_pid24601.log lib64 scripts boot hs_err_pid2841.log media srv core.26256 hs_err_pid28848.log mnt sys dev hs_err_pid30368.log opt tmp etc hs_err_pid30652.log proc usr home hs_err_pid3171.log razor-agent.log var hs_err_pid11659.log hs_err_pid4059.log root vmi115958 hs_err_pid1606.log hs_err_pid7091.log run [root@dns /]# du -sch * 0 backup 0 bin 249M boot 1.9M core.26256 0 dev 2.3G etc 46G home 16K hs_err_pid11659.log 16K hs_err_pid1606.log 16K hs_err_pid21856.log 16K hs_err_pid24601.log 16K hs_err_pid2841.log 20K hs_err_pid28848.log 16K hs_err_pid30368.log 16K hs_err_pid30652.log 20K hs_err_pid3171.log 16K hs_err_pid4059.log 16K hs_err_pid7091.log 0 lib 0 lib64 0 media 0 mnt du: cannot access ‘proc/6250/task/6250/fd/4’: No such file or directory du: cannot access ‘proc/6250/task/6250/fdinfo/4’: No such file or directory du: cannot access ‘proc/6250/fd/4’: No such file or directory du: cannot access ‘proc/6250/fdinfo/4’: No such file or directory du: cannot access ‘proc/7308’: No such file or directory 0 proc 4.0K razor-agent.log 18M root 81M run 0 sbin 0 scripts 0 srv 0 sys 4.0K vmi115958 49G total [root@dns /]#
Yes ,You are using total 49 GB space. Just confirm your total volume disk sda size,using mentioned command #fdisk -l #df -h Code (markup): Cross match both of them. Please send output of mentioned command #free -g #vmstat -s #cat /proc/meminfo Code (markup):
[root@dns /]# fdisk -l Disk /dev/vda: 536.9 GB, 536870912000 bytes, 1048576000 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x000be984 Device Boot Start End Blocks Id System /dev/vda1 * 2048 2050047 1024000 83 Linux /dev/vda2 2050048 1048575999 523262976 8e Linux LVM Disk /dev/mapper/cos-root: 535.8 GB, 535818141696 bytes, 1046519808 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes [root@dns /]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/cos-root 499G 418G 81G 84% / devtmpfs 2.9G 0 2.9G 0% /dev tmpfs 2.9G 0 2.9G 0% /dev/shm tmpfs 2.9G 89M 2.8G 4% /run tmpfs 2.9G 0 2.9G 0% /sys/fs/cgroup /dev/vda1 985M 250M 685M 27% /boot tmpfs 581M 0 581M 0% /run/user/0 [root@dns /]# free -g total used free shared buff/cache available Mem: 5 1 3 0 1 3 Swap: 0 0 0 [root@dns /]# vmstat -s 5946076 K total memory 1442200 K used memory 1389264 K active memory 119848 K inactive memory 4296832 K free memory 128 K buffer memory 206916 K swap cache 0 K total swap 0 K used swap 0 K free swap 14795745 non-nice user cpu ticks 31765 nice user cpu ticks 3060827 system cpu ticks 49431481 idle cpu ticks 7343146 IO-wait cpu ticks 0 IRQ cpu ticks 125982 softirq cpu ticks 695608 stolen cpu ticks 134242527 pages paged in 30693684 pages paged out 0 pages swapped in 0 pages swapped out 843185453 interrupts 320126046 CPU context switches 1518797315 boot time 881499 forks [root@dns /]# cat /proc/meminfo MemTotal: 5946076 kB MemFree: 4113296 kB MemAvailable: 4041468 kB Buffers: 128 kB Cached: 179096 kB SwapCached: 0 kB Active: 1524896 kB Inactive: 148232 kB Active(anon): 1499636 kB Inactive(anon): 85420 kB Active(file): 25260 kB Inactive(file): 62812 kB Unevictable: 0 kB Mlocked: 0 kB SwapTotal: 0 kB SwapFree: 0 kB Dirty: 112 kB Writeback: 0 kB AnonPages: 1493984 kB Mapped: 55692 kB Shmem: 91140 kB Slab: 60108 kB SReclaimable: 26068 kB SUnreclaim: 34040 kB KernelStack: 4304 kB PageTables: 28996 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 2973036 kB Committed_AS: 3104528 kB VmallocTotal: 34359738367 kB VmallocUsed: 22604 kB VmallocChunk: 34359707148 kB HardwareCorrupted: 0 kB AnonHugePages: 49152 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB DirectMap4k: 102272 kB DirectMap2M: 3043328 kB DirectMap1G: 5242880 kB [root@dns /]#
This is some thing wrong from OS or Platform level.Required to know VPS platform with access for tracing issue,You can raised about this issue to your service provider.
OP mentioned that he is using a VPS. Depending on the type of VPS, he may be obtaining the status of the master node, as opposed to his own personal VPS. For instance, with OpenVZ, depending on how file system quota is configured, a container may report the disk usage of the entire mounted /vz folder, as opposed to the amount of disk space they are currently using. Additionally, based on all the feedback, it looks like the op is unable to shrink the size of the disk, so the virtual disk may have become bloated. OP, if you delete content from your log directory, or some of the larger files, does the disk size decrease for /?
Alright. Now that you have done that, are you able to make changes to the .htaccess file now? That may not resolve where the discrepancy in size is, but has decreasing the overall space resolved your ability to edit files.
Also, generally when I am trying to track down issues, I just run the following commands cd / du -sh * and that should show you all the files in the root directory, and directories with their accumulated size. Has helped me track down rogue directories with bloated usage, since you can find one with an abnormally large amount of disk space used, browse into the directory, and run "du -sh *" again to dig deeper until you find the culprit. Warning, that it may take a bit of time to run, as it parses the entire tree.
Okay, my apologies. I was under the impression that you were not able to write changes to disk based on the disk being full. Please go ahead and try the du -sh * at /, and see if you are able to locate where the space is
[root@dns ~]# du -sh * 188K chkrootkit-0.52 32K core.14330 40K core.14331 0 cpanel3-skel 1.1M cpanel-install.log 4.0K error_log 0 FLUSH 4.0K installer.lock 144K ~]# journalctl -xe 28K latest 0 logfile 0 mkdir 1.5M old_rpm_dbs 4.0K original-ks.cfg 0 perl5 40K php.ini.new 40K php.ini.orig 16K SET 16K show 16K sum*u_w*1 8.0K tart-up result is done. 20K tmp 0 writelog 28K ystemctl enable php-fpm.service [root@dns ~]#
[root@dns ~]# du -sh * 188K chkrootkit-0.52 32K core.14330 40K core.14331 0 cpanel3-skel 1.1M cpanel-install.log 4.0K error_log 0 FLUSH 4.0K installer.lock it looks like you are doing that from your directory root. please do cd / du -sh * so that you do it from the / directory
[root@dns ~]# cd / [root@dns /]# du -sh * 0 backup 0 bin 291M boot 1.9M core.26256 0 dev 862M etc 55G home 20K hs_err_pid1053.log 16K hs_err_pid10792.log 20K hs_err_pid11174.log 16K hs_err_pid11659.log 16K hs_err_pid1606.log 16K hs_err_pid20829.log 16K hs_err_pid21763.log 16K hs_err_pid21856.log 16K hs_err_pid24601.log 16K hs_err_pid2841.log 20K hs_err_pid28848.log 16K hs_err_pid30368.log 16K hs_err_pid30652.log 16K hs_err_pid31157.log 20K hs_err_pid3171.log 16K hs_err_pid31778.log 16K hs_err_pid4059.log 16K hs_err_pid5116.log 16K hs_err_pid7091.log 16K hs_err_pid8736.log 16K hs_err_pid9753.log 0 lib 0 lib64 0 media 0 mnt du: cannot access ‘proc/16637/task/16637/fd/4’: No such file or directory du: cannot access ‘proc/16637/task/16637/fdinfo/4’: No such file or directory du: cannot access ‘proc/16637/fd/4’: No such file or directory du: cannot access ‘proc/16637/fdinfo/4’: No such file or directory 0 proc 4.0K razor-agent.log 21M root 17M run 0 sbin 0 scripts 0 srv 0 sys 4.0K vmi115958 [root@dns /]#
Are you using MySQL on this Server? It looks like some hidden files occupying space on the Server, Check in MySQL directory if there is InnoDB hidden file that is occupying space.