I'm showing a difference in available space in lvdisplay vs df -h

[user@box]~ lvdisplay

  --- Logical volume ---
  LV Path                /dev/rhel_data/www
  LV Name                www
  VG Name                rhel_data
  LV UUID                898kpA-ZtbV-RjEB-Qu6V-tM5v-cEvd-KjbtZS
  LV Write Access        read/write
  LV Creation host, time box.example.com, 2016-06-14 16:43:11 -0400
  LV Status              available
  # open                 1
  LV Size                279.38 GiB
  Current LE             71521
  Segments               3
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:6

The volume above is mounted at /data/www.

[user@box ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/dm-19       47G   47G  3.2M 100% /data/www

[user@box ~]# umount /dev/mapper/rhel_data-www 
umount: /dev/mapper/rhel_data-www: not mounted
[user@box ~]# umount /data/www/

[user@box ~]# resize2fs /dev/mapper/rhel_data-www 
resize2fs 1.42.9 (28-Dec-2013)
resize2fs: Device or resource busy while trying to open /dev/mapper/rhel_data-www
Couldn't find valid filesystem superblock.

Info about the mount:

[user@box]~ mount | grep www
/dev/mapper/luks-e258bd7a-3201-457e-8ade-695c87c53e36 on /data/www type xfs (rw,nosuid,nodev,noexec,relatime,seclabel,attr2,inode64,noquota) 

How do I make use of the additional space that lvdisplay displays?

  • What is the filesystem used on that volume? e.g. mount | grep www – Aaron Jul 20 '16 at 18:30
  • /dev/mapper/luks-e258bd7a-3201-457e-8ade-695c87c53e36 on /data/www type xfs (rw,nosuid,nodev,noexec,relatime,seclabel,attr2,inode64,noquota) – a coder Jul 20 '16 at 18:33
  • 1
    Use xfs_growfs /data/www to use the extra space allocated to that volume. – Aaron Jul 20 '16 at 18:34
  • Please add that as the answer to this question. – a coder Jul 20 '16 at 18:35

To grow a XFS filesystem to use the space allocated to it after resizing the volume

xfs_growfs /mount/point


xfs_growfs /data/www
  • 3
    Be carefull, xfs can only be grown, not shrinked. – Uwe Burger Jul 20 '16 at 19:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.