1

Recently installed RHEL7 on a PowerEdge R320 with the following drives:

2 x 300GB sas 15k
2 x 1TB sas 7.2k

When setting up LVM during installation I purposefully left over 100gb free in case I needed to expand later.

I'm now seeing that I need to expand one of the volumes created during install.

The problem is pvs is only showing what I created, and is not showing any usable free space.

[user@box ~] pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               rhel_os
  PV Size               165.79 GiB / not usable 0   
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              42443
  Free PE               0
  Allocated PE          42443
  PV UUID               sDdEfu-qagM-qq35-OGfF-HpPw-Bizd-LcXazt

  --- Physical volume ---
  PV Name               /dev/sdb1
  VG Name               rhel_data
  PV Size               139.71 GiB / not usable 4.00 MiB
  Allocatable           yes 
  PE Size               4.00 MiB
  Total PE              35766
  Free PE               1
  Allocated PE          35765
  PV UUID               Jgjcad-idBE-wxXc-tGGf-SY8m-qb8T-nBi9ar

parted shows the free space:

[user@box ~]# parted
GNU Parted 3.1
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print free                                                       
Model: DELL PERC H710 (scsi)
Disk /dev/sda: 299GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
        18.4kB  1049kB  1030kB           Free Space
 1      1049kB  301MB   300MB   primary  xfs          boot
 2      301MB   178GB   178GB   primary               lvm
        178GB   299GB   121GB            Free Space

What do I need to do to make use of that 121GB?

2

You should expand the Linux LVM partition /dev/sda2 for example with gparted and the resize the physical volume with "pvresize /dev/sda2". After that you should be able to use the additional space. Alternatively (this is more safer IMHO) you can create another Linux LVM partition on the free disk space, then create an additional Physical Volume and add it to your Volume Group. You can follow this how-to and pay attention to the partition numbers: http://www.tecmint.com/extend-and-reduce-lvms-in-linux/

  • > this is more safer IMHO < Why is resizing the LVM partition considered less (or un) safe? – a coder Jul 20 '16 at 1:50
  • I consider less save resizing the LVM partition because in case something going wrong during the repartitioning you can loose the data but in case you have a backup or clone of that partition and a downtime for restoring the partition it is not a problem, you the LVM partition resizing – DarkVex Jul 20 '16 at 19:35

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.