LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   df not showing correct lvm disk size value (https://www.linuxquestions.org/questions/linux-software-2/df-not-showing-correct-lvm-disk-size-value-831348/)

fusion1275 09-10-2010 06:09 AM

df not showing correct lvm disk size value
 
Hi all,

Just added a new disk. 160GB.

Created the PV and VG and LV and Filesystem

Mounted it and it is reporting a value that was the original value and not the extended value I have added.

Quote:

root@Zeus-home:/home# lvdisplay /dev/Zeus-misc/misc
--- Logical volume ---
LV Name /dev/Zeus-misc/misc
VG Name Zeus-misc
LV UUID IkhYoK-OaDa-46AD-TQGD-d6Lx-pyy5-1xELvh
LV Write Access read/write
LV Status available
# open 0
LV Size 120.00 GB
Current LE 30720
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:6
When I mount it on /home/misc directory and run a df

Quote:

root@Zeus-home:~# df -h /home/misc/
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/Zeus--misc-misc
50G 180M 47G 1% /home/misc

Can someone point out whats going on here and what I have done wrong please.

hurryi 09-10-2010 06:14 AM

please use the commands below and give the output

pvs
vgs
lvs

fusion1275 09-10-2010 06:24 AM

Thanks for the prompt reply:

Quote:

root@Zeus-home:~# pvs
/dev/sdb1 Zeus-misc lvm2 a- 394.96G 274.96G
Quote:

root@Zeus-home:~# vgs
Zeus-misc 1 1 0 wz--n- 394.96G 274.96G
Quote:

root@Zeus-home:~# lvs
misc Zeus-misc -wi-ao 120.00G

hurryi 09-10-2010 06:39 AM

hmmm strange, I dont really get that
maybe the filesystem can be smaller then the logical volume

did u extended the lv sometime? if yes you should resize the fs too
with command resize2fs if i remember right

fusion1275 09-10-2010 06:56 AM

Sorry everyone... yes you were right hurryi. Seems I missed that part out.

Ive now run it and hey presto!!

Thanks again.

hurryi 09-10-2010 07:22 AM

you are welcome ;)


All times are GMT -5. The time now is 08:50 AM.