Solved

LIinux lies about disk space?

Posted on 2007-03-24
8
270 Views
Last Modified: 2008-02-01
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
/dev/mapper/VolGroup00-LogVol00
                      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
0
Comment
Question by:DrDamnit
8 Comments
 
LVL 38

Expert Comment

by:wesly_chen
ID: 18787153
It could be the bug of "df" to detect the filesystem on LVM.
Please post
cat /etc/*release*
rpm -q --whatprovides `which df`
lvcsan
0
 
LVL 57

Expert Comment

by:giltjr
ID: 18787160
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?
0
 
LVL 57

Expert Comment

by:giltjr
ID: 18787173
You can try the commands:

     lvm pvdispaly

and

    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.
0
 
LVL 57

Expert Comment

by:giltjr
ID: 18787177
Opps, there is also lvm lvdisplay
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 48

Expert Comment

by:Tintin
ID: 18787809
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.
0
 
LVL 34

Expert Comment

by:Duncan Roe
ID: 18788034
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.
0
 
LVL 32

Author Comment

by:DrDamnit
ID: 18788118
What is the syntax to increase the logical volume size?
0
 
LVL 57

Accepted Solution

by:
giltjr earned 500 total points
ID: 18788229
you can use this as a starting point:

 http://tldp.org/HOWTO/LVM-HOWTO/extendlv.html

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.

0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Suggested Solutions

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now