cancel
Showing results for 
Search instead for 
Did you mean: 

Can't extend lv

 
Highlighted
Valued Contributor

Can't extend lv

Hi,

I have recently increased the size of my pv and I am now attempting to increase the lv but I get the following error:

 

# vgdisplay
  --- Volume group ---
  VG Name               VolGroup00
  System ID            
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  20
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                8
  Open LV               8
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               249.97 GB
  PE Size               32.00 MB
  Total PE              7999
  Alloc PE / Size       2013 / 62.91 GB
  Free  PE / Size       5986 / 187.06 GB
  VG UUID               Zme52J-J22F-PisG-oOSQ-wwB2-QJ29-ZpofJk

# lvextend -L +180G /dev/VolGroup00/tmp_vol
  Extending logical volume tmp_vol to 182.00 GB
  device-mapper: reload ioctl failed: Invalid argument
  Failed to suspend tmp_vol


 

Any ideas on how I can resolve this?

R,
D.

5 REPLIES 5
Highlighted
Valued Contributor

Re: Can't extend lv

Hi,

 

There are three options to resolve this problem, any one will resolve the problem:

1>Extend the partition size to use the extended space. You can use parted or fdisk (using fdisk, you may need to delete the partition and recreate it with old start cylinder and new end cylinder).

 

2>Create a new partition in extended space using fdisk /dev/sdX. You can pvcreate on this and extended VG,LV and at last file system also. Replace "X" with proper device name.

 

3>Inform device-mapper of the underlying changes:

[root@IT-371723 ~]# kpartx -d /dev/mapper/testvg-lvol0
[root@IT-371723 ~]# dmsetup remove /dev/mapper/testvg-lvol0
[root@IT-371723 ~]# vgscan

 

Regards,

Chhaya

Regards,
Chhaya

I am an HP employee.
Was this post useful? - You may click the KUDOS! star to say thank you.
Highlighted
Valued Contributor

Re: Can't extend lv

Hi,

 

I seen this on the redhat website also but it does not work:

 

# kpartx -d /dev/mapper/VolGroup00-tmp_vol
# dmsetup remove /dev/mapper/VolGroup00-tmp_vol
device-mapper: remove ioctl failed: Device or resource busy
Command failed

 

It seems like a standard enough error but nothing on it on the web in terms of resolution???

 

R,

D.

Highlighted
Valued Contributor

Re: Can't extend lv

HI,

 

Check if the device is already mounted. Unmounting the device and then trying  might work.

 

Regards,
Chhaya

Regards,
Chhaya

I am an HP employee.
Was this post useful? - You may click the KUDOS! star to say thank you.
Highlighted
Valued Contributor

Re: Can't extend lv

Hi,

 

I have already tried this and it doesn't make any difference.

 

R,

D.

Highlighted
Esteemed Contributor

Re: Can't extend lv

What's the distro/version? What are kernel, device mapper and lvm versions? Do you use a custom kernel?