linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] grow lv bug
@ 2009-09-21 22:08 Hugh
  2009-09-21 22:32 ` malahal
  0 siblings, 1 reply; 8+ messages in thread
From: Hugh @ 2009-09-21 22:08 UTC (permalink / raw)
  To: linux-lvm

This seems to be a bug with lvm. Unable to grow the logical volume.
I have the space. pvextend succeeded, vgextend succeeded but lvextend, 
lvresize fail.

Where can I report this and get some support?

Following is a transcript of my attempt to solve this problem. I've remove the 
sda stuff as it has no problems.

[root@fc11-64 ~]# pvs -v
    Scanning for physical volume names
  PV         VG         Fmt  Attr PSize  PFree  DevSize PV UUID                               
  /dev/sdb2  VolGroup00 lvm2 a-   67.91G 20.00G  47.93G eCuGyH-jV7L-Tgdg-JyYW-
sWK1-ehZY-OLw0WS
[root@fc11-64 ~]# pvscan
  PV /dev/sdb2   VG VolGroup00   lvm2 [67.91 GB / 20.00 GB free]
  PV /dev/sda2   VG vg_fc1164    lvm2 [99.80 GB / 0    free]
  Total: 2 [167.71 GB] / in use: 2 [167.71 GB] / in no VG: 0 [0   ]

[root@fc11-64 ~]# parted -l
Model: VMware, VMware Virtual S (scsi)
Disk /dev/sdb: 73.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      32.3kB  74.0MB  74.0MB  primary  ext3         boot 
 2      74.0MB  51.5GB  51.5GB  primary               lvm  
Model: Linux device-mapper (dm)
Disk /dev/mapper/VolGroup00-LogVol00: 49.3GB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End     Size    File system  Flags
 1      0.00B  49.3GB  49.3GB  ext3              


Model: Linux device-mapper (dm)
Disk /dev/mapper/VolGroup00-LogVol01: 2114MB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End     Size    File system  Flags
 1      0.00B  2114MB  2114MB  linux-swap        


[root@fc11-64 ~]# rpm -q kernel
kernel-2.6.29.6-217.2.8.fc11.x86_64
[root@fc11-64 ~]# rpm -qa | grep lvm
lvm2-2.02.48-2.fc11.x86_64
system-config-lvm-1.1.9-1.fc11.noarch


[root@fc11-64 ~]# lvresize -v -d -L 65.9375G 
/dev/VolGroup00/LogVol00
Finding volume group VolGroup00
Archiving volume group "VolGroup00" metadata (seqno 5).
Extending logical volume LogVol00 to 65.94 GB
Found volume group "VolGroup00"
Found volume group "VolGroup00"
Loading VolGroup00-LogVol00 table
device-mapper: reload ioctl failed: Invalid argument
Failed to suspend LogVol00
Creating volume group backup "/etc/lvm/backup/VolGroup00" 
(seqno 6).

[root@fc11-64 ~]# lvextend -v -d -L 65.9375G 
/dev/VolGroup00/LogVol00
Finding volume group VolGroup00
Archiving volume group "VolGroup00" metadata (seqno 5).
Extending logical volume LogVol00 to 65.94 GB
Found volume group "VolGroup00"
Found volume group "VolGroup00"
Loading VolGroup00-LogVol00 table
device-mapper: reload ioctl failed: Invalid argument
Failed to suspend LogVol00
Creating volume group backup "/etc/lvm/backup/VolGroup00" 
(seqno 6).


Running Logical Volume Manager gui and attempting to extend the 
volume results in the same error.

[root@fc11-64 ~]# pvdisplay
--- Physical volume ---
PV Name /dev/sdb2
VG Name VolGroup00
PV Size 67.93 GB / not usable 24.13 MB
Allocatable yes
PE Size (KByte) 32768
Total PE 2173
Free PE 640
Allocated PE 1533
PV UUID eCuGyH-jV7L-Tgdg-JyYW-sWK1-ehZY-OLw0WS

[root@fc11-64 ~]# vgdisplay
--- Volume group ---
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 5
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 67.91 GB
PE Size 32.00 MB
Total PE 2173
Alloc PE / Size 1533 / 47.91 GB
Free PE / Size 640 / 20.00 GB
VG UUID 7I9mBS-xzMJ-L1fC-7IT4-ckJq-g8r3-pv333k

[root@fc11-64 ~]# lvdisplay
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol01
VG Name VolGroup00
LV UUID ph5nOV-3cyI-fFNV-WlyQ-rDI8-dTsY-5FcWn2
LV Write Access read/write
LV Status available
# open 0
LV Size 1.97 GB
Current LE 63
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2

--- Logical volume ---
LV Name /dev/VolGroup00/LogVol00
VG Name VolGroup00
LV UUID ZGiTvh-XhRo-sLk5-bkJX-U30G-xkCD-rYszvt
LV Write Access read/write
LV Status available
# open 0
LV Size 45.94 GB
Current LE 1470
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:3
</cut>


[root@fc11-64 ~]# tail -3 /var/log/messages
Sep 10 20:55:46 fc11-64 kernel: device-mapper: table: device 8:18 
too small for target
Sep 10 20:55:46 fc11-64 kernel: device-mapper: table: 253:3: 
linear: dm-linear: Device lookup failed
Sep 10 20:55:46 fc11-64 kernel: device-mapper: ioctl: error adding 
target to table

[root@fc11-64 ~]# fdisk -l
Disk /dev/sdb: 73.0 GB, 73014444032 bytes
255 heads, 63 sectors/track, 8876 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd426be2d

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 9 72261 83 Linux
/dev/sdb2 10 6266 50259352+ 8e Linux LVM

Disk /dev/dm-0: 102.9 GB, 102965968896 bytes
255 heads, 63 sectors/track, 12518 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 4194 MB, 4194304000 bytes
255 heads, 63 sectors/track, 509 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-1 doesn't contain a valid partition table

Disk /dev/dm-2: 2113 MB, 2113929216 bytes
255 heads, 63 sectors/track, 257 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-2 doesn't contain a valid partition table

Disk /dev/dm-3: 49.3 GB, 49325015040 bytes
255 heads, 63 sectors/track, 5996 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-3 doesn't contain a valid partition table


All I can see is the log message, but it doesn't help me to solve the problem 
and the error message seems to be wrong. Where can I report this bug?

Thanks Hugh.

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

* Re: [linux-lvm] grow lv bug
  2009-09-21 22:08 [linux-lvm] grow lv bug Hugh
@ 2009-09-21 22:32 ` malahal
  2009-09-21 22:47   ` Alasdair G Kergon
  2009-09-25 15:12   ` [linux-lvm] grow lv bug - pvs -v display bug David Timms
  0 siblings, 2 replies; 8+ messages in thread
From: malahal @ 2009-09-21 22:32 UTC (permalink / raw)
  To: linux-lvm

Hugh [whobedobe@dodo.com.au] wrote:
> This seems to be a bug with lvm. Unable to grow the logical volume.
> I have the space. pvextend succeeded, vgextend succeeded but lvextend, 
> lvresize fail.
> 
> Where can I report this and get some support?
> 
> Following is a transcript of my attempt to solve this problem. I've remove the 
> sda stuff as it has no problems.
> 
> [root@fc11-64 ~]# pvs -v
>     Scanning for physical volume names
>   PV         VG         Fmt  Attr PSize  PFree  DevSize PV UUID                               
>   /dev/sdb2  VolGroup00 lvm2 a-   67.91G 20.00G  47.93G eCuGyH-jV7L-Tgdg-JyYW-
> sWK1-ehZY-OLw0WS

DevSize is smaller than PSize!

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

* Re: [linux-lvm] grow lv bug
  2009-09-21 22:32 ` malahal
@ 2009-09-21 22:47   ` Alasdair G Kergon
  2009-09-22 13:16     ` Hugh
  2009-09-25 15:12   ` [linux-lvm] grow lv bug - pvs -v display bug David Timms
  1 sibling, 1 reply; 8+ messages in thread
From: Alasdair G Kergon @ 2009-09-21 22:47 UTC (permalink / raw)
  To: LVM general discussion and development

On Mon, Sep 21, 2009 at 03:32:57PM -0700, malahal@us.ibm.com wrote:
> DevSize is smaller than PSize!
 
Yes, we've seen a few of these recently.
Would be useful if the reporters gave more background context to see
if there are any common factors between the cases that could lead to
mitigation.

Alasdair

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

* Re: [linux-lvm] grow lv bug
  2009-09-21 22:47   ` Alasdair G Kergon
@ 2009-09-22 13:16     ` Hugh
  2009-09-22 13:23       ` Alasdair G Kergon
  0 siblings, 1 reply; 8+ messages in thread
From: Hugh @ 2009-09-22 13:16 UTC (permalink / raw)
  To: LVM general discussion and development

On Tuesday 22 September 2009 08:47:18 Alasdair G Kergon wrote:
> On Mon, Sep 21, 2009 at 03:32:57PM -0700, malahal@us.ibm.com wrote:
> > DevSize is smaller than PSize!
> 
> Yes, we've seen a few of these recently.
> Would be useful if the reporters gave more background context to see
> if there are any common factors between the cases that could lead to
> mitigation.
> 
> Alasdair
> 
> _______________________________________________
> 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/
> 
Simple Alasdair, why didn't you ask in the first place.

I added 20G of space to the vmware virtual drive.
pvresize - success
vgresize - success
and then I tried to do a lvresize but it failed.

I didn't understand your original answer but Marian was a bit clearer, however 
I'm still confused and I can't fix my drive.

There are so many fs types and they race them through fedora. I realise this 
isn't your problem but I'm left not knowing how to fix this. I tried gparted 
but it can't resize lvms and I don't know how to resize my sdb2. Could you 
offer any help or point me to a dummies guide since this is a lvm partition. I 
found a guide to resize an ext3 or ext2, but not lvm and I don't know if it 
will break if I try to delete the partition and recreate it?

HYCH,

Hugh

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

* Re: [linux-lvm] grow lv bug
  2009-09-22 13:16     ` Hugh
@ 2009-09-22 13:23       ` Alasdair G Kergon
  2009-09-22 21:55         ` Hugh
  0 siblings, 1 reply; 8+ messages in thread
From: Alasdair G Kergon @ 2009-09-22 13:23 UTC (permalink / raw)
  To: Hugh; +Cc: LVM general discussion and development

On Tue, Sep 22, 2009 at 11:16:02PM +1000, Hugh wrote:
> pvresize - success

Do you recall what command line you used?
Did you just do pvresize <device>
or did you use the --setphysicalvolumesize argument?

Alasdair

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

* Re: [linux-lvm] grow lv bug
  2009-09-22 13:23       ` Alasdair G Kergon
@ 2009-09-22 21:55         ` Hugh
  2009-09-22 22:27           ` Alasdair G Kergon
  0 siblings, 1 reply; 8+ messages in thread
From: Hugh @ 2009-09-22 21:55 UTC (permalink / raw)
  To: LVM general discussion and development

On Tuesday 22 September 2009 23:23:30 Alasdair G Kergon wrote:
> On Tue, Sep 22, 2009 at 11:16:02PM +1000, Hugh wrote:
> > pvresize - success
> 
> Do you recall what command line you used?
> Did you just do pvresize <device>
> or did you use the --setphysicalvolumesize argument?
> 
> Alasdair
> 
> _______________________________________________
> 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/
> 
Yes I did. I used --setphysicalvolumesize
it responded that it was successful.

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

* Re: [linux-lvm] grow lv bug
  2009-09-22 21:55         ` Hugh
@ 2009-09-22 22:27           ` Alasdair G Kergon
  0 siblings, 0 replies; 8+ messages in thread
From: Alasdair G Kergon @ 2009-09-22 22:27 UTC (permalink / raw)
  To: Hugh; +Cc: LVM general discussion and development

On Wed, Sep 23, 2009 at 07:55:09AM +1000, Hugh wrote:
> Yes I did. I used --setphysicalvolumesize
> it responded that it was successful.

Without any warning messages?

From the man page:

      --setphysicalvolumesize size
	Overrides  the  automatically-detected size of the PV.  Use with
	care, or prior to reducing the physical size of the device.

If you change the physical size of the device, it detects the new size
automatically and you don't need that argument.  But that argument instructs
LVM to pretend the device is some size other than the one it really is...

Maybe we should require --force as well and add a 'Please confirm you
know what this actually does' prompt.

Alasdair

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

* Re: [linux-lvm] grow lv bug - pvs -v display bug
  2009-09-21 22:32 ` malahal
  2009-09-21 22:47   ` Alasdair G Kergon
@ 2009-09-25 15:12   ` David Timms
  1 sibling, 0 replies; 8+ messages in thread
From: David Timms @ 2009-09-25 15:12 UTC (permalink / raw)
  To: LVM general discussion and development

On 09/22/2009 08:32 AM, malahal@us.ibm.com wrote:
> Hugh [whobedobe@dodo.com.au] wrote:
>>      Scanning for physical volume names
>>    PV         VG         Fmt  Attr PSize  PFree  DevSize PV UUID
>>    /dev/sdb2  VolGroup00 lvm2 a-   67.91G 20.00G  47.93G eCuGyH-jV7L-Tgdg-JyYW-
>> sWK1-ehZY-OLw0WS
>
> DevSize is smaller than PSize!
Exactly what I was saying, yes PFree is indicating +'ve 20GB free, not 
-'ve 20GB Free. Looks at the very least like a bug in pvsc -v

I am guessing that my gui tool system-config-lvm uses the lvs PFree 
value to suggest that it can expand an lv into pv free space. But if 
this value was correct (ie showing as negative), then maybe it wouldn't 
suggest that there is pv free space, and then fail inexplicably when the 
user attempts to use some of that "anti-free" space ?

As well as displaying "-" space free, it might make sense for the tool 
to suggest there is something wrong with the setup, since the printed 
values don't actually make any sense (eg like assert (pvsize - pvusage) 
<> pvfree) to push the admin to see the problem.

DaveT.

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

end of thread, other threads:[~2009-09-25 15:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-21 22:08 [linux-lvm] grow lv bug Hugh
2009-09-21 22:32 ` malahal
2009-09-21 22:47   ` Alasdair G Kergon
2009-09-22 13:16     ` Hugh
2009-09-22 13:23       ` Alasdair G Kergon
2009-09-22 21:55         ` Hugh
2009-09-22 22:27           ` Alasdair G Kergon
2009-09-25 15:12   ` [linux-lvm] grow lv bug - pvs -v display bug David Timms

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).