LVM2: Are these physical volumes free?

Hi,

I am trying to find some free space on this system. The following physical volumes look empty. Would you please help me confirm this? What other commands can I use to find free space?

Thank you in advance!

# pvdisplay -m /dev/block/104:2
  --- Physical volume ---
  PV Name               /dev/block/104:2
  VG Name               system
  PV Size               8.94 GB / not usable 2.23 MB
  Allocatable           yes
  PE Size (KByte)       4096
  Total PE              2288
  Free PE               2288
  Allocated PE          0
  PV UUID               p3QiiG-OeNU-Wd9U-PSsY-sQtE-sh0K-gf8RoW
  --- Physical Segments ---
  Physical extent 0 to 2287:
    FREE

# pvdisplay -m /dev/block/104:4
  --- Physical volume ---
  PV Name               /dev/block/104:4
  VG Name               system
  PV Size               15.00 GB / not usable 3.02 MB
  Allocatable           yes
  PE Size (KByte)       4096
  Total PE              3839
  Free PE               3839
  Allocated PE          0
  PV UUID               1dwSv3-THur-qCOd-cgNF-Hulw-2lRa-SJfPe1
  --- Physical Segments ---
  Physical extent 0 to 3838:
    FREE

I think vgs will print free space present in volume groups.

According to this output, both are already part of a volume group ( VG Name system ), but don't yet have any data on them ( Allocated PE 0 )

But generally, if you want to add additional logical volumes, check the output of vgdisplay how much space is left on the volume groups.

1 Like

Hi Pludi,

"Allocated PE 0" is good enough. It can be verified by 'vgdisplay -v | grep Free'.

Thanks a lot!