Friday, February 9, 2018

Linux missing disk space



I have KVM vps with strange disk usage:



# df -h
Filesystem Size Used Avail Use% Mounted on

/dev/sdb 493G 1.2G 466G 1% /
tmpfs 4.0G 0 4.0G 0% /dev/shm
/dev/sda1 96M 41M 51M 45% /boot


# du -sh /
du: cannot access `/proc/1633/task/1633/fd/4': No such file or directory
du: cannot access `/proc/1633/task/1633/fdinfo/4': No such file or directory
du: cannot access `/proc/1633/fd/4': No such file or directory
du: cannot access `/proc/1633/fdinfo/4': No such file or directory
1021M /



How could it be? Where are ~20G of free space?


Answer



I guess you talk about the discrepancy between 493GB total space, 1.2G used and 466GB free. This is likely the result of the usual 5% of disk space that is reserved for root and not generally available.



To check for this, please add the output of at least the Reserved block count from



tune2fs -l /dev/sdb 



to your question (provided you use ext3 or ext4 as a filesystem)


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...