linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] lvextend problem
@ 2007-06-14 18:08 Nikolay Yevik
  2007-06-14 19:01 ` Alasdair G Kergon
  0 siblings, 1 reply; 9+ messages in thread
From: Nikolay Yevik @ 2007-06-14 18:08 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 5768 bytes --]

Greetings,

 

I would greatly appreciate if anyone can help me with the issue I am
having with vgextend.

I am trying to extend my LV but getting error about insufficient
extents, while there are enough free PEs in the VG.

 

Here is setup information:

# lvm version

  LVM version:     2.02.13 (2006-10-27)

  Library version: 1.02.12 (2006-10-13)

  Driver version:  4.7.0

 

# pvs

  PV         VG     Fmt  Attr PSize PFree

  /dev/sda2  system lvm2 a-   6.50G 708.00M

  /dev/sda3  data   lvm2 a-   1.42G      0

  /dev/sdb1  data   lvm2 a-   2.99G      0

  /dev/sdc1  system lvm2 a-   2.99G   2.99G

 

# vgs

  VG     #PV #LV #SN Attr   VSize VFree

  data     2   3   0 wz--n- 4.41G    0

  system   2   3   0 wz--n- 9.49G 3.68G

 

# lvs

  LV    VG     Attr   LSize   Origin Snap%  Move Log Copy%

  data1 data   -wi-ao 728.00M

  data2 data   -wi-ao 728.00M

  data3 data   -wi-ao   2.99G

  home  system -wi-ao 128.00M

  root  system -wi-ao   5.00G

  swap  system -wi-ao 700.00M

 

# vgdisplay

  --- Volume group ---

  VG Name               data

  System ID

  Format                lvm2

  Metadata Areas        2

  Metadata Sequence No  11

  VG Access             read/write

  VG Status             resizable

  MAX LV                0

  Cur LV                3

  Open LV               3

  Max PV                0

  Cur PV                2

  Act PV                2

  VG Size               4.41 GB

  PE Size               4.00 MB

  Total PE              1130

  Alloc PE / Size       1130 / 4.41 GB

  Free  PE / Size       0 / 0

  VG UUID               4I2UCL-raKY-a6Kt-b2SE-2vAV-vHB9-UndWx9

 

  --- Volume group ---

  VG Name               system

  System ID

  Format                lvm2

  Metadata Areas        2

  Metadata Sequence No  13

  VG Access             read/write

  VG Status             resizable

  MAX LV                0

  Cur LV                3

  Open LV               3

  Max PV                0

  Cur PV                2

  Act PV                2

  VG Size               9.49 GB

  PE Size               4.00 MB

  Total PE              2430

  Alloc PE / Size       1487 / 5.81 GB

  Free  PE / Size       943 / 3.68 GB

  VG UUID               KQ3dPF-X92n-0HVb-sYl5-iARG-wUEX-iEGJsG

 

# lvscan

  ACTIVE            '/dev/data/data1' [728.00 MB] inherit

  ACTIVE            '/dev/data/data2' [728.00 MB] inherit

  ACTIVE            '/dev/data/data3' [2.99 GB] inherit

  ACTIVE            '/dev/system/home' [128.00 MB] inherit

  ACTIVE            '/dev/system/root' [5.00 GB] inherit

  ACTIVE            '/dev/system/swap' [700.00 MB] inherit

 

# mount

/dev/mapper/system-root on / type ext3 (rw,acl,user_xattr)

proc on /proc type proc (rw)

sysfs on /sys type sysfs (rw)

debugfs on /sys/kernel/debug type debugfs (rw)

udev on /dev type tmpfs (rw)

devpts on /dev/pts type devpts (rw,mode=0620,gid=5)

/dev/sda1 on /boot type ext3 (rw,acl,user_xattr)

/dev/mapper/system-home on /home type ext3 (rw,acl,user_xattr)

/dev/mapper/data-data1 on /mnt/data1 type ext3 (rw,acl,user_xattr)

/dev/mapper/data-data2 on /mnt/data2 type ext3 (rw,acl,user_xattr)

/dev/mapper/data-data3 on /mnt/data3 type ext3 (rw,acl,user_xattr)

.host:/ on /mnt/hgfs type vmhgfs (rw,ttl=5)

securityfs on /sys/kernel/security type securityfs (rw)

none on /proc/fs/vmblock/mountPoint type vmblock (rw)

 

So "system" VG uses /dev/sda2 with 708M free and /dev/sdc1 with 2.99G
free.

This is confirmed by:

 

#pvdisplay /dev/sda2

  --- Physical volume ---

  PV Name               /dev/sda2

  VG Name               system

  PV Size               6.50 GB / not usable 3.76 MB

  Allocatable           yes

  PE Size (KByte)       4096

  Total PE              1664

  Free PE               177

  Allocated PE          1487

  PV UUID               fYVfh6-wMQ2-X2Zv-AJ6R-2CgK-c97o-KfPoLz

 

# pvdisplay /dev/sdc1

  --- Physical volume ---

  PV Name               /dev/sdc1

  VG Name               system

  PV Size               3.00 GB / not usable 3.07 MB

  Allocatable           yes

  PE Size (KByte)       4096

  Total PE              766

  Free PE               766

  Allocated PE          0

  PV UUID               XUUjaG-okI9-AQbG-JLwa-oqBO-rkse-pTyg53

 

So there is a total of free 943 PE (4M each) in "system" VG. 

 

I want to extend /dev/system/root:

 

# lvextend -l+2 /dev/system/root /dev/sdc1

  Extending logical volume root to 5.01 GB

  Insufficient free space: 1282 extents needed, but only 766 available

 

Or 

 

# lvextend -l+2 /dev/system/root

  Extending logical volume root to 5.01 GB

  Insufficient free space: 1282 extents needed, but only 943 available

 

Same if I specify actual size (in MB or GB) instead if number of PEs.

 

Looks like it tries to reallocate the whole LV to the size needed
instead of just adding the needed size from VG free space

to the already existing LV.

 

What I am not understanding or missing here?

 

 

Respectfully,

 

Nikolay V. Yevik

----------------------------------------------------------------------
This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient.  Any review, use, distribution, or disclosure by others is strictly prohibited.  If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message.

[-- Attachment #2: Type: text/html, Size: 31512 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [linux-lvm] lvextend problem
@ 2007-02-27 15:55 Guilio Iannazzo
  2007-02-27 21:01 ` Luca Berra
  0 siblings, 1 reply; 9+ messages in thread
From: Guilio Iannazzo @ 2007-02-27 15:55 UTC (permalink / raw)
  To: linux-lvm

Hi,
about the *environment* :
[root@priscilla var]# cat /proc/version
Linux version 2.4.21-20.ELsmp (bhcompile@tweety.build.redhat.com) (gcc 
version 3.2.3 20030502 (Red Hat Linux 3.2.3-42)) #1 SMP Wed Aug 18 
20:46:40 EDT 2004

The *problem* :
I extended a logical volume following the procedure

umount -l /dev/Volume00/var

lvextend -L+5G /dev/Volume00/var
e2fsck -f /dev/Volume00/var
mount -l /dev/Volume00/var

The ouput of e2fsck was as following : 

[root@priscilla var]# e2fsck -f /dev/Volume00/var
e2fsck 1.32 (09-Nov-2002)
Pass 1: Checking inodes, blocks, and sizes
Duplicate blocks found... invoking duplicate block passes.
Pass 1B: Rescan for duplicate/bad blocks
Duplicate/bad block(s) in inode 40962: 164114 164115 164117
Duplicate/bad block(s) in inode 122885: 491781
Pass 1C: Scan directories for inodes with dup blocks.
Pass 1D: Reconciling duplicate blocks
(There are 2 inodes containing duplicate/bad blocks.)

File /run/utmp (inode #40962, mod time Tue Feb 27 10:20:28 2007)
  has 3 duplicate block(s), shared with 1 file(s):
        <filesystem metadata>
Clone duplicate/bad blocks<y>? yes

File /log/audit.d/bin.1 (inode #122885, mod time Tue Feb 27 14:01:00 2007)
  has 1 duplicate block(s), shared with 1 file(s):
        <filesystem metadata>
Clone duplicate/bad blocks<y>? yes

Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/Volume00/var: ***** FILE SYSTEM WAS MODIFIED *****
/dev/Volume00/var: 553/1572864 files (14.8% non-contiguous), 
706071/6291456 blocks

Now, once the filesystem mounted, I've lost all the data I had on /var 
(which I didn't back up, I know I know it's extremely stupid, luckily 
enough this is not a production machine).
For example

[root@priscilla var]# ll /var/
total 0

however

[root@priscilla var]# mkdir /var/log
mkdir: cannot create directory `/var/log': File exists

??
What happened ? How to get all the data back ?
Thank you

Giulio

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [linux-lvm] lvextend problem
@ 2002-03-16 17:55 Jens Berlips
  2002-03-16 19:13 ` Tim
  0 siblings, 1 reply; 9+ messages in thread
From: Jens Berlips @ 2002-03-16 17:55 UTC (permalink / raw)
  To: linux-lvm

Hello

I have two partitions on a 80gb harddrive.

/dev/hdb1
/dev/hdb2

I have created a VG called store_vg.
$vgcreate store_vg /dev/hdb2
then
$lvcreate -lXXX -nstore_lv store_vg
creating an LV using all space left on hdb2

What I wanted to do next was adding the hdb1
without loosing the data on hdb2.

So I did.
vgextend store_vg /dev/hdb1
then
lvextend -lXXX /dev/store_vg/store_lv /dev/hdb1

But I noticed that this didnt work and when doing a
$ df. I got the same results as before. I guess this has
to do with hdb1 not being formatted (using mkfs.xfs) correctly. When
reformatting the entire LV (extended with hdb1) I got everything to work.
But all data lost.

This was more of a test, so I didn't loose any critical data. But how
should this proceedure be done correctly?

Thanks in advance
Jens Berlips

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

end of thread, other threads:[~2007-06-14 19:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-14 18:08 [linux-lvm] lvextend problem Nikolay Yevik
2007-06-14 19:01 ` Alasdair G Kergon
2007-06-14 19:50   ` Nikolay Yevik
  -- strict thread matches above, loose matches on Subject: below --
2007-02-27 15:55 Guilio Iannazzo
2007-02-27 21:01 ` Luca Berra
2002-03-16 17:55 Jens Berlips
2002-03-16 19:13 ` Tim
2002-03-17  2:01   ` Friedrich Lobenstock
2002-03-22 17:07     ` bo

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