Lvm – System can’t get lock on VG after exending LV

lvmrhel6

So I just extended the VG on my server. Basically, the local disk is 300GB. I initially created two partitions: sda1 is a primary partition, with ext4 assigned to /boot; sda2 is where 74G VG resides (vg is server hostname).

So I had an extra 225G left. I went ahead and created a third primary partition sda3, and after succesfuly creating a VG on sda3, I used lvextend to extend the size of my lv by 1GB.

So, here are the commands I ran after fdisk:

pvcreate /dev/sda3
vgextend hostname /dev/sda3
lvextend -L+1G /dev/hostname/home

For which I received the following output:

Extending logical volume home to 2.00 GiB
Logical volume home successfully resized

However, the prompt has been stuck on the last message now for several hours. My attempts to perform an lvscan / or lvdisplay fail with the following error:

/var/lock/lvm/V_hostname: flock failed: Interrupted system call
Can't get lock for hostname
Skipping volume group hostname

So my question is, do you think my system actually succesfully performed the resize? Am I safe to reboot? Or should I wait around a little longer? This is LVM2, so I was under the assumption that I could perform these operations live while the lv is actively mounted. I know this depends on type of filesystem you're using, but I figured I was good since I am on ext4.

Best Answer

well, it should have gone OK (never had a problem resizing mounted Logical Volumes ...)

for some reason the system has not removed the LVM lock (is there a /var/lock/lvm/hostname file?)

you have not resized the FS yet so it should be ok to
1 remove lock

  rm /var/lock/lvm/hostname

2 reboot
3 check the status of the logical volume
4 resize the filesystem

good luck!