LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-09-2013, 08:33 AM   #1
guertin
LQ Newbie
 
Registered: Apr 2010
Distribution: Red Hat, Fedora, CentOS
Posts: 10

Rep: Reputation: 0
df command does not show LVM disk space


I've got a Fedora 19 box, with the local root and swap partitions managed with LVM. Everything works fine, but if I want to see how much space is available, "df" does not show the LVM volumes, only the local boot partition:

Quote:
# df -hl
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 477M 100M 348M 23% /boot
Here are the outputs of pvs, vgs, and lvs, just to confirm that everything there looks normal:

Quote:
# pvs
PV VG Fmt Attr PSize PFree
/dev/sda5 VolGroup lvm2 a-- 115.09g 672.00m
Quote:
# vgs
VG #PV #LV #SN Attr VSize VFree
VolGroup 1 2 0 wz--n- 115.09g 672.00m
Quote:
# lvs
LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert
lv_root VolGroup -wi-ao--- 104.75g
lv_swap VolGroup -wi-ao--- 9.69g
Just as a shot in the dark, I tried re-resizing the filesystem on the volume, but that did nothing:

Quote:
# resize2fs /dev/VolGroup/lv_root
resize2fs 1.42.7 (21-Jan-2013)
The filesystem is already 27459584 blocks long. Nothing to do!
What's going on? How can I make the LVM volumes show up with df?
 
Old 09-09-2013, 08:46 AM   #2
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
df only shows info for mounted filesystems.
 
Old 09-09-2013, 09:11 AM   #3
guertin
LQ Newbie
 
Registered: Apr 2010
Distribution: Red Hat, Fedora, CentOS
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by zhjim View Post
df only shows info for mounted filesystems.
This is the root filesystem. It is mounted. :-)

Quote:
/etc/fstab:

/dev/mapper/VolGroup-lv_root / ext4 defaults 1 1
/dev/sda3 /boot ext4 defaults 1 2
/dev/mapper/VolGroup-lv_swap swap swap defaults 0 0
Quote:
# mount /
mount: /dev/mapper/VolGroup-lv_root is already mounted or / busy
Quote:
# df -hl
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 477M 100M 348M 23% /boot
 
Old 09-09-2013, 10:07 AM   #4
guertin
LQ Newbie
 
Registered: Apr 2010
Distribution: Red Hat, Fedora, CentOS
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by guertin View Post
This is the root filesystem. It is mounted. :-)
Although, now that I think of it, it doesn't show up with the mount command, either:

Quote:
# mount
sysfs on /sys type sysfs (rw)
/dev/sda3 on /boot type ext4 (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
vmware-vmblock on /var/run/vmblock-fuse type fuse.vmware-vmblock (rw,nosuid,nodev,default_permissions,allow_other)
<plus a few NFS-mounted systems>
Edit: Though it is present in /proc/mounts:

Quote:
# cat /proc/mounts
rootfs / rootfs rw 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
<snip>
/dev/mapper/VolGroup-lv_root / ext4 rw,relatime,data=ordered 0 0
<snip>
/dev/sda3 /boot ext4 rw,relatime,data=ordered 0 0
fusectl /sys/fs/fuse/connections fusectl rw,relatime 0 0
vmware-vmblock /var/run/vmblock-fuse fuse.vmware-vmblock rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other 0 0
So, I guess I should amend my problem to: a mounted LVM volume does not show with either the df or mount commands.

Last edited by guertin; 09-09-2013 at 10:25 AM.
 
Old 09-09-2013, 10:33 AM   #5
guertin
LQ Newbie
 
Registered: Apr 2010
Distribution: Red Hat, Fedora, CentOS
Posts: 10

Original Poster
Rep: Reputation: 0
OK, one more interesting tidbit. If I try "mount -va":

Quote:
# mount -va
/ : ignored
/boot : already mounted
swap : ignored
/dev/shm : successfully mounted
mount: devpts is already mounted or /dev/pts busy
/sys : already mounted
mount: proc is already mounted or /proc busy
The / and swap volumes are ignored. Why "ignored" instead of "already mounted", as with /boot and /sys?
 
Old 09-09-2013, 10:51 AM   #6
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
I have no idea what so ever. Running mount v.2.20.1 and df v.8.13 on debian both print info about my root parition. Mount -av also gives as you predicted already mounted error.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can we use NFS disk for increasing LVM space Tekken Linux - Server 1 09-12-2009 07:20 AM
fdisk -l dont show disk space dandanile Linux - Server 3 08-21-2009 01:19 AM
LXer: Managing disk space with LVM LXer Syndicated Linux News 0 07-22-2007 08:18 AM
LXer: Managing Disk Space with LVM LXer Syndicated Linux News 0 04-28-2006 05:54 AM
Disk space reporting inconsistencies, lvm/df rarr Linux - Software 2 01-18-2006 12:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration