linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] LVM2 Problem Can't resize locked LV lv
@ 2007-10-30 18:36 Christian
  2007-10-31  7:45 ` [linux-lvm] LVM2 Problem Can t " Christian
  0 siblings, 1 reply; 3+ messages in thread
From: Christian @ 2007-10-30 18:36 UTC (permalink / raw)
  To: linux-lvm

Hi,

I am using LVM2 for some time now and haven't had any troubles.
But this week one of the hard disks, the one I added approx. one month 
ago, started to report read/write errors.
I bought a new one and followed the steps of an LVM how-to found on this 
website 
(http://charlesnadeau.blogspot.com/2006/10/howto-replaceupgrade-disk-part-of-lvm2_04.html).

The first steps worked fine. Even shrinking the reiser file system was 
no problem.
But when I tried to pvmove /dev/hdb1 /dev/hdf1, I am getting the error 
message: Can't resize locked LV lv.

As there is no available information about what this error message 
actually means nor how to resolve it, I hope someone on this list might 
be able to help me.

Thank you very much in advance.

Cheers Christian

PS: this is my current configuration. where hdb1 is the failing hdd, and 
hdf1 the new one.

vgdisplay -v
    Finding all volume groups
    Finding volume group "vg"
  --- Volume group ---
  VG Name               vg
  System ID
  Format                lvm2
  Metadata Areas        6
  Metadata Sequence No  10
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               0
  Max PV                0
  Cur PV                6
  Act PV                6
  VG Size               1.37 TB
  PE Size               4.00 MB
  Total PE              359489
  Alloc PE / Size       264102 / 1.01 TB
  Free  PE / Size       95387 / 372.61 GB
  VG UUID               bf1tJ5-X79X-Uy02-iilF-XEM8-u2GK-6lFhQZ

  --- Logical volume ---
  LV Name                /dev/vg/lv
  VG Name                vg
  LV UUID                oyJf6j-xKtk-qtQv-LLE3-wy4I-9qC3-9VLPr0
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                1.01 TB
  Current LE             264102
  Segments               5
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:0

  --- Physical volumes ---
  PV Name               /dev/hda3
  PV UUID               IKxWRX-hzHO-fra9-vm8O-JyVp-FyM8-trMXlw
  PV Status             allocatable
  Total PE / Free PE    25632 / 0

  PV Name               /dev/hde1
  PV UUID               wM0a1a-mT0y-2M2s-9CVH-1CYJ-sNGV-sdjrkJ
  PV Status             allocatable
  Total PE / Free PE    47694 / 0

  PV Name               /dev/hdg1
  PV UUID               oeAOVW-D4qq-24QO-PiH0-WyYh-y8lP-rqL3r9
  PV Status             allocatable
  Total PE / Free PE    76310 / 0

  PV Name               /dev/hdh1
  PV UUID               o58ymK-u6zC-J63r-w98A-cPPw-JcMN-FXWQUi
  PV Status             allocatable
  Total PE / Free PE    76310 / 0

  PV Name               /dev/hdb1
  PV UUID               uLgbrb-aNFy-8nsE-X7Aa-q0mp-n8AY-46FqSc
  PV Status             allocatable
  Total PE / Free PE    38156 / 0

  PV Name               /dev/hdf1
  PV UUID               uKsPbR-CNjT-IWTr-edSp-VmrO-CgtL-rxm0M2
  PV Status             allocatable
  Total PE / Free PE    95387 / 95387

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-lvm] LVM2 Problem Can t resize locked LV lv
  2007-10-30 18:36 [linux-lvm] LVM2 Problem Can't resize locked LV lv Christian
@ 2007-10-31  7:45 ` Christian
  2007-10-31 11:12   ` Christian
  0 siblings, 1 reply; 3+ messages in thread
From: Christian @ 2007-10-31  7:45 UTC (permalink / raw)
  To: LVM general discussion and development

Let me extend my previously posted message, as I mixed up some error 
messages: here are the correct ones:

 # lvreduce -L -150G /dev/vg/lv
  Can't resize locked LV lv

 # pvmove /dev/hdb1 /dev/hdf1
  Skipping locked LV lv
  No data to move for vg

Anyways I am still looking for an answer what "locked" means and how I 
unlock the logical volume.

I am using gentoo with kernel 2.6.17-gentoo-r8.

Once again, thank you for your help in advance

Cheers
Christian


Christian wrote:
> Hi,
>
> I am using LVM2 for some time now and haven't had any troubles.
> But this week one of the hard disks, the one I added approx. one month 
> ago, started to report read/write errors.
> I bought a new one and followed the steps of an LVM how-to found on 
> this website 
> (http://charlesnadeau.blogspot.com/2006/10/howto-replaceupgrade-disk-part-of-lvm2_04.html). 
>
>
> The first steps worked fine. Even shrinking the reiser file system was 
> no problem.
> But when I tried to pvmove /dev/hdb1 /dev/hdf1, I am getting the error 
> message: Can't resize locked LV lv.
>
> As there is no available information about what this error message 
> actually means nor how to resolve it, I hope someone on this list 
> might be able to help me.
>
> Thank you very much in advance.
>
> Cheers Christian
>
> PS: this is my current configuration. where hdb1 is the failing hdd, 
> and hdf1 the new one.
>
> vgdisplay -v
>    Finding all volume groups
>    Finding volume group "vg"
>  --- Volume group ---
>  VG Name               vg
>  System ID
>  Format                lvm2
>  Metadata Areas        6
>  Metadata Sequence No  10
>  VG Access             read/write
>  VG Status             resizable
>  MAX LV                0
>  Cur LV                1
>  Open LV               0
>  Max PV                0
>  Cur PV                6
>  Act PV                6
>  VG Size               1.37 TB
>  PE Size               4.00 MB
>  Total PE              359489
>  Alloc PE / Size       264102 / 1.01 TB
>  Free  PE / Size       95387 / 372.61 GB
>  VG UUID               bf1tJ5-X79X-Uy02-iilF-XEM8-u2GK-6lFhQZ
>
>  --- Logical volume ---
>  LV Name                /dev/vg/lv
>  VG Name                vg
>  LV UUID                oyJf6j-xKtk-qtQv-LLE3-wy4I-9qC3-9VLPr0
>  LV Write Access        read/write
>  LV Status              available
>  # open                 0
>  LV Size                1.01 TB
>  Current LE             264102
>  Segments               5
>  Allocation             inherit
>  Read ahead sectors     0
>  Block device           253:0
>
>  --- Physical volumes ---
>  PV Name               /dev/hda3
>  PV UUID               IKxWRX-hzHO-fra9-vm8O-JyVp-FyM8-trMXlw
>  PV Status             allocatable
>  Total PE / Free PE    25632 / 0
>
>  PV Name               /dev/hde1
>  PV UUID               wM0a1a-mT0y-2M2s-9CVH-1CYJ-sNGV-sdjrkJ
>  PV Status             allocatable
>  Total PE / Free PE    47694 / 0
>
>  PV Name               /dev/hdg1
>  PV UUID               oeAOVW-D4qq-24QO-PiH0-WyYh-y8lP-rqL3r9
>  PV Status             allocatable
>  Total PE / Free PE    76310 / 0
>
>  PV Name               /dev/hdh1
>  PV UUID               o58ymK-u6zC-J63r-w98A-cPPw-JcMN-FXWQUi
>  PV Status             allocatable
>  Total PE / Free PE    76310 / 0
>
>  PV Name               /dev/hdb1
>  PV UUID               uLgbrb-aNFy-8nsE-X7Aa-q0mp-n8AY-46FqSc
>  PV Status             allocatable
>  Total PE / Free PE    38156 / 0
>
>  PV Name               /dev/hdf1
>  PV UUID               uKsPbR-CNjT-IWTr-edSp-VmrO-CgtL-rxm0M2
>  PV Status             allocatable
>  Total PE / Free PE    95387 / 95387
>
>
>
>
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-lvm] LVM2 Problem Can t resize locked LV lv
  2007-10-31  7:45 ` [linux-lvm] LVM2 Problem Can t " Christian
@ 2007-10-31 11:12   ` Christian
  0 siblings, 0 replies; 3+ messages in thread
From: Christian @ 2007-10-31 11:12 UTC (permalink / raw)
  To: LVM general discussion and development

just got the solution over irc.
i post it in case anyone else encounters this strange behaviour.

i need to mention first that pvmove was not running (checked using lvs 
-a), so this is kind of a stange behaviour.

to fix the "locked" error, you first need to deactivate your lv
# lvchange -an /dev/vg/lv
then edit your vg backup (/etc/lvm/backup/vg) and remove "LOCKED" in the 
lv status line.
after that do
# vgcfgrestore vg
# lvchange -ay /dev/vg/lv

when doing lvreduce now, everything should work properly.

big thanks to the guys on #lvm.

cheers
christian

Christian wrote:
> Let me extend my previously posted message, as I mixed up some error 
> messages: here are the correct ones:
>
> # lvreduce -L -150G /dev/vg/lv
>  Can't resize locked LV lv
>
> # pvmove /dev/hdb1 /dev/hdf1
>  Skipping locked LV lv
>  No data to move for vg
>
> Anyways I am still looking for an answer what "locked" means and how I 
> unlock the logical volume.
>
> I am using gentoo with kernel 2.6.17-gentoo-r8.
>
> Once again, thank you for your help in advance
>
> Cheers
> Christian
>
>
> Christian wrote:
>> Hi,
>>
>> I am using LVM2 for some time now and haven't had any troubles.
>> But this week one of the hard disks, the one I added approx. one 
>> month ago, started to report read/write errors.
>> I bought a new one and followed the steps of an LVM how-to found on 
>> this website 
>> (http://charlesnadeau.blogspot.com/2006/10/howto-replaceupgrade-disk-part-of-lvm2_04.html). 
>>
>>
>> The first steps worked fine. Even shrinking the reiser file system 
>> was no problem.
>> But when I tried to pvmove /dev/hdb1 /dev/hdf1, I am getting the 
>> error message: Can't resize locked LV lv.
>>
>> As there is no available information about what this error message 
>> actually means nor how to resolve it, I hope someone on this list 
>> might be able to help me.
>>
>> Thank you very much in advance.
>>
>> Cheers Christian
>>
>> PS: this is my current configuration. where hdb1 is the failing hdd, 
>> and hdf1 the new one.
>>
>> vgdisplay -v
>>    Finding all volume groups
>>    Finding volume group "vg"
>>  --- Volume group ---
>>  VG Name               vg
>>  System ID
>>  Format                lvm2
>>  Metadata Areas        6
>>  Metadata Sequence No  10
>>  VG Access             read/write
>>  VG Status             resizable
>>  MAX LV                0
>>  Cur LV                1
>>  Open LV               0
>>  Max PV                0
>>  Cur PV                6
>>  Act PV                6
>>  VG Size               1.37 TB
>>  PE Size               4.00 MB
>>  Total PE              359489
>>  Alloc PE / Size       264102 / 1.01 TB
>>  Free  PE / Size       95387 / 372.61 GB
>>  VG UUID               bf1tJ5-X79X-Uy02-iilF-XEM8-u2GK-6lFhQZ
>>
>>  --- Logical volume ---
>>  LV Name                /dev/vg/lv
>>  VG Name                vg
>>  LV UUID                oyJf6j-xKtk-qtQv-LLE3-wy4I-9qC3-9VLPr0
>>  LV Write Access        read/write
>>  LV Status              available
>>  # open                 0
>>  LV Size                1.01 TB
>>  Current LE             264102
>>  Segments               5
>>  Allocation             inherit
>>  Read ahead sectors     0
>>  Block device           253:0
>>
>>  --- Physical volumes ---
>>  PV Name               /dev/hda3
>>  PV UUID               IKxWRX-hzHO-fra9-vm8O-JyVp-FyM8-trMXlw
>>  PV Status             allocatable
>>  Total PE / Free PE    25632 / 0
>>
>>  PV Name               /dev/hde1
>>  PV UUID               wM0a1a-mT0y-2M2s-9CVH-1CYJ-sNGV-sdjrkJ
>>  PV Status             allocatable
>>  Total PE / Free PE    47694 / 0
>>
>>  PV Name               /dev/hdg1
>>  PV UUID               oeAOVW-D4qq-24QO-PiH0-WyYh-y8lP-rqL3r9
>>  PV Status             allocatable
>>  Total PE / Free PE    76310 / 0
>>
>>  PV Name               /dev/hdh1
>>  PV UUID               o58ymK-u6zC-J63r-w98A-cPPw-JcMN-FXWQUi
>>  PV Status             allocatable
>>  Total PE / Free PE    76310 / 0
>>
>>  PV Name               /dev/hdb1
>>  PV UUID               uLgbrb-aNFy-8nsE-X7Aa-q0mp-n8AY-46FqSc
>>  PV Status             allocatable
>>  Total PE / Free PE    38156 / 0
>>
>>  PV Name               /dev/hdf1
>>  PV UUID               uKsPbR-CNjT-IWTr-edSp-VmrO-CgtL-rxm0M2
>>  PV Status             allocatable
>>  Total PE / Free PE    95387 / 95387
>>
>>
>>
>>
>>
>> _______________________________________________
>> linux-lvm mailing list
>> linux-lvm@redhat.com
>> https://www.redhat.com/mailman/listinfo/linux-lvm
>> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>>
>>
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-10-31 11:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-30 18:36 [linux-lvm] LVM2 Problem Can't resize locked LV lv Christian
2007-10-31  7:45 ` [linux-lvm] LVM2 Problem Can t " Christian
2007-10-31 11:12   ` Christian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).