LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   LVM2 volume size / free space ,mismatch (http://www.linuxquestions.org/questions/linux-newbie-8/lvm2-volume-size-free-space-mismatch-758034/)

Grismar 09-27-2009 03:30 AM

LVM2 volume size / free space ,mismatch
 
Hello,

Newbie here, so be gentle :)

I'm relatively new to the administration end of Linux. I'm running a Ubuntu 9.04 desktop system. I don't have a lot of extra's installed, just Wine, uTorrent, proftpd, apache, mysql, php5 and samba.

I've put two 60Gb disks in and created a volume group, added both to them and created a single logical volume. The total size of the logical volume should be about 114Gb, but there's only 8.2Gb worth of files on it and it reports there is only 987M free.

When I run 'lvdisplay', it says "LV Size 114.00 GB", which seems ok. I've mounted the logical volume on a mount point called /var/tabot and when I run 'df /var/tabot -h', it says "Size 37G, Used 34G, Avail 987M", which seems strange to me. I can't relate the numbers "37G" and "34G" to anything, so I'm assuming running 'df' on a mounted logical volume in a volume group makes no sense? The free space matches what I find when using the volume though (it goes down as I put stuff on it and when it reaches zero, the system reports errors when I try to put more on it)

Can anyone explain to me why the total size of my 114Gb logical volume seem to be limited to little over 9Gb? And perhaps give me some clue on how to get access to the rest of the space?

Thanks in advance,
Grismar.

Grismar 09-27-2009 03:35 AM

Answering my own question
 
Sometimes it helps to state a question, to make the problem clear. :)

Turns out that, somehow, I had managed to get the volume unmounted. I assumed that the procedure I went through to get it mounted would ensure it to get re-mounted after a reboot. Clearly, it did not and the free space reported was that of the drive /var was on.

Silly mistake, I admit. All the same, hope it helps someone that finds this short thread :)

Greetings,
Grismar.

eco 09-27-2009 03:40 AM

Hi Grismar,

Could you give us the output of

Code:

# pvscan
Code:

# vgdisplay -v
Code:

# lvdisplay -v
Code:

# grep -v "#" /etc/lvm/lvm.conf |grep ..
Code:

# df -h
Did you ever extend the LV and forget to resize the filesystem?

eco 09-27-2009 03:41 AM

Hmmm, ignore the above then ;)

Grismar 09-28-2009 04:47 AM

Quote:

Originally Posted by eco (Post 3698296)
Hmmm, ignore the above then ;)

Thanks for the response anyway. ;) The way I found out was by checking 'lvdisplay' yet again. It showed '# open' to be "2" and I realised that I had files open on the volume (or so I thought), so I ran 'umount'. It told me nothing was mounted and I had my answer.

Greetings,
Grismar.


All times are GMT -5. The time now is 09:40 PM.