[SOLVED] Partition full (100%) even if sum of all files is less than 50%
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Partition full (100%) even if sum of all files is less than 50%
Hi,
So I have an encrypted /home partition (created with LVM and encryption during Centos 6.5 install) that ran out of space all of a sudden (or it was close to 100% for weeks and I never noticed...) but the problem is that the sum of all files and folders is less than 50% of the partition's capacity.
As you can see, under /home the "biggest" folder is "file-storage" and it is 371GB. There's still 552GB to go until the capacity of 923GB is reached... All other folders and files do not account to the missing 552GB (not even close), so whats going on?
The only thing I can think of, is the encryption... Would it be possible that somehow every encrypted GB takes another GB for the encryption? Even that, roughly adding everything "du" lists and doing X2 will yield to 796GB which is still far from 923GB..
So I have an encrypted /home partition (created with LVM and encryption during Centos 6.5 install) that ran out of space all of a sudden (or it was close to 100% for weeks and I never noticed...) but the problem is that the sum of all files and folders is less than 50% of the partition's capacity.
As you can see, under /home the "biggest" folder is "file-storage" and it is 371GB. There's still 552GB to go until the capacity of 923GB is reached... All other folders and files do not account to the missing 552GB (not even close), so whats going on?
The only thing I can think of, is the encryption... Would it be possible that somehow every encrypted GB takes another GB for the encryption? Even that, roughly adding everything "du" lists and doing X2 will yield to 796GB which is still far from 923GB..
Any insight appreciated!..
Thanks
I think files only grow about 8k-12k when encrypted.
I think that whatever partition contains /home contains a lot more than just /home.
--------------------
Steve Stites
What do you mean by "a lot more than just /home"? Symlinks to other partitions? /home is being used as /home (that is, personal files no system files).. A few weeks ago I was not using encryption and I had less than 400GB of files... Impossible that it grew to almost a terabyte in less than 3 weeks..
lsof | grep deleted yielded 3 entries under /tmp... Nothing under /home
As for the encrypted space.... Thats what I expected.. a marginal increase in disk usage but not 200%+..
Distribution: Mainly Devuan with some Tiny Core, Fatdog, Haiku, & BSD thrown in.
Posts: 5,012
Rep:
I neither use LVM nor encription, but usually when you see 100% usage, (allowing for root's reserved space), & know there should be more space, it is a lack of inodes.
You probably have a lot of small files on your disk using up all the inodes, only way to overcome this situation is to have more inodes for this systems usage.
...& know there should be more space, it is a lack of inodes
Would fsck fix this?
Quote:
You probably have a lot of small files on your disk using up all the inodes, only way to overcome this situation is to have more inodes for this systems usage.
Exactly 588,534 files on that FS... Not much if you ask me..
I am using ext4 with Centos 6.6... First time in a long time using linux that I see this kind of glitch...
That strongly suggests that there were indeed open, deleted files, and the the fsck was superfluous. "lsof | grep deleted" won't find all of them. "lsof | grep -i del" will find a lot more that show "DEL" in the "FD" column and do not show "(deleted)" after the name. "DEL" indicates deleted files that were mmap()-ed and the file descriptor closed, but are still "in use" because the mmap() is still active.
Generally speaking, is it something to worry about? Why would this happen?
It's only something to worry about if you run out of space. It happens because a program intentionally unlinked some mmap()-ed file, perhaps a temporary database, to ensure that it would be deleted automatically when the program terminated. Another place it happens a lot, though not generally under /home, is with libraries that get updated while some program is still using the old version. The old library has to stay around until it is no longer in use, and those libraries are almost always mmap()-ed and not held on an open file descriptor.
You would have to run that "lsof | grep -i del" while the problem was present to see exactly what was causing it.
Hmmm - how often do you reboot ?. A reboot should both run fsck if needed, and get rid of unlinked filed descriptors.
If you reboot regularly (FSVO "regularly") and the problem persisted, but went away after a fsck that reported no errors (and reboot) , that is odd.
And, no, a fsck(8) does not fix that. You can either grow the filesystem, or you can dump(8), recreate the filesystem with a more suitable bytes-to-inode ratio, and restore(8).
About every week... I usually put the machine in suspend to RAM instead of shutting it down. Been doing this for years with the same hardware and between real reboots, I cannot pretend that the FS changed so much (added or removed thousands of files, etc).. Actually, a few weeks ago I reinstalled centos and restored everything from a backup.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.