Ask Your Question
0

Need to resize lv_home to use remaining space on pv but cannot

asked 2017-12-20 14:46:47 -0600

scp gravatar image

I have cloned my 1TB drive to a new 2TB drive. I extended the LVM2 pv on /dev/sda3 to 1.82 TiB. It has 931 GiB used. lvhome is mounted on /home and I want to extend that to use the remainder of the space. The volume group is called vggroup01 If I use vgextend /dev/vggroup01 /dev/sda3 I get "Can't open /dev/sda3 exclusively. Mounted filesystem?" I get the same response booting the system from a rescue disk in which the device is unmounted. If I use lvextend -L+931.53G /dev/vggroup01/lv_home /dev/sda3 I get: "WARNING: No free extents on physical volume "/dev/sda3". No specified PVs have space available." How should I proceed?

edit retag flag offensive close merge delete

Comments

You might give us the listings of the following commands

  • fdisk -l /dev/sda
  • pvs
  • vgs
  • lvs Those might shed some light on what's going on.
jmt gravatar imagejmt ( 2017-12-20 16:10:21 -0600 )edit

fdisk -l Disk /dev/sda: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: gpt Disk identifier: 3DD3145E-BB16-4302-9B55-7D7A58E75779

Device Start End Sectors Size Type /dev/sda1 2048 4095 2048 1M BIOS boot /dev/sda2 4096 1028095 1024000 500M EFI System /dev/sda3 1028096 3907028991 3906000896 1.8T Linux LVM

scp gravatar imagescp ( 2017-12-20 16:55:18 -0600 )edit

pvs PV VG Fmt Attr PSize PFree /dev/sda3 vg_vggroup01 lvm2 a-- 931.00g 0

vgs vg_vggroup01 1 3 0 wz--n- 931.00g 0

scp gravatar imagescp ( 2017-12-20 16:56:39 -0600 )edit

lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert lvhome vgvggroup01 -wi-ao---- <871.19g
lvroot vgvggroup01 -wi-ao---- 50.00g
lvswap vgvggroup01 -wi-ao---- 9.81g

scp gravatar imagescp ( 2017-12-20 18:26:41 -0600 )edit

2 Answers

Sort by » oldest newest most voted
1

answered 2017-12-20 22:27:31 -0600

scp gravatar image

The resolution is simply pvresize --setphysicalvolumesize 1.82TiB /dev/sda3 After that the logical volume eg; lvm_home can be resized

edit flag offensive delete link more

Comments

When enlarging the PV upto the size of the partition, you don't even need to use the "--setphysicalsize" parameter.

jmt gravatar imagejmt ( 2017-12-21 03:07:01 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-12-20 14:46:47 -0600

Seen: 498 times

Last updated: Dec 20 '17