Solved

LIinux lies about disk space?

Posted on 2007-03-24
8
274 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
BASH script to modify crontab? 3 50
Best way to split and output to csv in bash 2 61
php ssh2_scp_send 1 49
AWS - HAProxy- KeepAlived 5 17
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

920 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

16 Experts available now in Live!

Get 1:1 Help Now