• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 287
  • Last Modified:

LIinux lies about disk space?

My disk is not full (I think) yet I have disk space errors from the FTP server. How do I fix this?

Notice the logical volume is at 100%, but the actual disks are not.

[root@tux ~]# df
Filesystem           1K-blocks      Used Available Use% Mounted on
                      17775388  17766680         0 100% /
/dev/hda1               101086     18959     76908  20% /boot
/dev/shm                257624         0    257624   0% /dev/shm
/dev/sda1            240362656 149159508  78993348  66% /mnt/server01
1 Solution
It could be the bug of "df" to detect the filesystem on LVM.
Please post
cat /etc/*release*
rpm -q --whatprovides `which df`
Linux is telling the truth.  The volume "VolGroup00-LogVol00" is full.

You apparently created a logical volume and set its size to about 17MB and the volume is full.

You need to increase the size of the virtual volume, or create a new volume and set that up to be used by your FTP server.  I would suggest the second option, that way if the volume gets full (again) it will not cause problems with your system.  I also beleive that in order to grow a logical volume you must have it unmounted.  As this is your root, that will be very difficult to do.

What distribution are you using?
You can try the commands:

     lvm pvdispaly


    lvm vgdispaly

The first command will display the "physical volumes" (hard drive partitions, NOT hard drives) that the logical volume manager is in control of.  The second will display the logical volumes.

You can think of a logical volume as a partition.  If you had a 100GB disk and created a 10GB partition and then filled that partition, the partition is full even though the disk is not.
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Opps, there is also lvm lvdisplay
It doesn't matter if you have terrabytes of disk and create a 200MB filesystem and fill it up.  The filesystem is still going to be full.

The obvious solution is to either delete files that aren't needed or increase the size of the logical volume.
Duncan RoeSoftware DeveloperCommented:
This is just normal output from df.
Even simple disk partitions have this property - there is a certain amount of disk space reserved for root to use only. This ensures that there is room to rewrite enlarged directory structures after a disk is reported as "full" to a non-root process. A root process can use this space for any purpose it chooses, but if it fills the disk there is possibility of really serious damage to a directory. This is another good reason not to run processes as root if at all possible btw.
DrDamnitAuthor Commented:
What is the syntax to increase the logical volume size?
you can use this as a starting point:


Read up on how Logical Volumes work.  You can only increase the size of the logical volume to the maximum size of of the physical volume(s) (a.k.a partitions).  If you need to increase the size of the physical volume(s).  You should beable to create a new parition and then add that partition to the physical volume and then increase the size of the logical volume and then increase the size of the file system.

When you go to do this I would suggest that you:

1) Get a good backup.
2) Get another good backup.
3) Verify that you know how to restore the complete system from some other boot device (CD, memory stick whatever)
4) Check your distribution's documentation for extending a logical volume's size.
5) Go for broke and try it.

As your logical volume is mounted as root ("/") if anything goes wrong, you will LOOSE all data and will need to restore from some other boot device.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now