1834434 Members
2287 Online
110067 Solutions
New Discussion

Re: lvextend

 
SOLVED
Go to solution
Deborah Weatherspoon
Frequent Advisor

lvextend

Hi all,

I tried to add a new disk and then try to extend it to 70G, however it did not increase when I umounted and mounted it. Did it actually work ? If not, can it be fixed ?

adm3:[/] # pvcreate -f /dev/rdsk/c10t1d5
Physical volume "/dev/rdsk/c10t1d5" has been successfully created.
adm3:[/] # vgextend /dev/vg03 /dev/dsk/c10t1d5
vgextend: Warning: Max_PE_per_PV for the volume group (12799) too small for this PV (30719).
Using only 12799 PEs from this physical volume.
Current path "/dev/dsk/c10t0d3" is an alternate link, skip.
Volume group "/dev/vg03" has been successfully extended.
Volume Group configuration for /dev/vg03 has been saved in /etc/lvmconf/vg03.conf
adm3:[/] # lvextend -L 71680 /dev/vg03/lvol1
Logical volume "/dev/vg03/lvol1" has been successfully extended.
Volume Group configuration for /dev/vg03 has been saved in /etc/lvmconf/vg03.con

--- Volume groups ---
VG Name /dev/vg03
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 1
Open LV 1
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 12799
VGDA 4
PE Size (Mbytes) 4
Total PE 25596
Alloc PE 17920
Free PE 7676
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg03/lvol1
LV Status available/syncd
LV Size (Mbytes) 71680
Current LE 17920
Allocated PE 17920
Used PV 2


--- Physical volumes ---
PV Name /dev/dsk/c8t0d3
PV Name /dev/dsk/c10t0d3 Alternate Link
PV Status available
Total PE 12797
Free PE 0
Autoswitch On

PV Name /dev/dsk/c10t1d5
PV Status available
Total PE 12799
Free PE 7676
Autoswitch On


adm3:[/] #
28 REPLIES 28
Ludovic Derlyn
Esteemed Contributor

Re: lvextend

hi,

Your problem is due to your VG
Vg03 has been created with a disk of 50g, (max PE par Pv * PE size so 12799* *4) and you should add a disk of 70G
Only size of 50G will be set

Two solutions:

- destruct and create a new vg (save data before and restore after)

- Add disk of 50 G only

regards
L-DERLYN

Patrick Wallek
Honored Contributor
Solution

Re: lvextend

You missed a step. You extended the LV, but you never extended the filesystem that is on the LV. Until you do that bdf will still show the old size.

You need to do 1 of 2 things:

1) IF YOU HAVE ONLINE JFS -- fsadm -b 71680m /dev/vg03/lvol1
or
(assuming /dir is where this LV is mounted)
fsadm -b 71680m /dir

2) If you DO NOT have online JFS --
umount /dir
extendfs /dev/vg03/rlvol1
mount /dir
Robert-Jan Goossens
Honored Contributor

Re: lvextend

Hi Deborah,

You forgot to extend the filesystem. use fsadm or extendfs (depends if you have OnlineJFS installed to extend the filesystem.

--
vgextend: Warning: Max_PE_per_PV for the volume group (12799) too small for this PV (30719).
--

Your current volume group configuration will not allow you to use the full capacity of your disk new lun/disk.
Max_Pe_Per_PV (12799) * PE Size (Mbytes) 4 = +/- 50 GB

Your disk is 30719 * 4 MB = +/- 120 GB

Regards,
Robert-Jan
James R. Ferguson
Acclaimed Contributor

Re: lvextend

Hi:

Well, you added only 12,799 4MB physical extents to your volume group, although you could not use all of physical extents that the physical disk had to offer. This constriant is a function of the paramters used during the original 'vgcreate'.

Next, you successfully extended the logical volume by 71680/4 or 17920 extents as shown in your 'vgdisplay'.

As yet you have NOT extended the filesystem contained *within* the logical volume --- or at least you haven't stated or shown that.
Until you do that, a 'bdf' or 'df' will not show any change in the mounted filesystem space. Use 'fsadm' or 'extendfs' to enlarge your filesystem.

Regards!

...JRF...
Pete Randall
Outstanding Contributor

Re: lvextend

Here is the problem:

"vgextend: Warning: Max_PE_per_PV for the volume group (12799) too small for this PV (30719)."

When the VG was originally created, max_pe was allowed to default and therefor was set to accomodate the original physical volume. This new, larger volume exceeds that size so only part of it is gets used.

Your solution is either to delete and re-create the VG with a large max_pe or to make this new disk into a separate VG.


Pete

Pete
Torsten.
Acclaimed Contributor

Re: lvextend

What is your OS version?
In case of 11.23 or 11.31 you can adjust the maximum values via vgmodify. This tool comes per patch in 11.23.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Deborah Weatherspoon
Frequent Advisor

Re: lvextend

Thanks all,

It appears to be ok....

# vgdisplay -v vg03
--- Volume groups ---
VG Name /dev/vg03
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 1
Open LV 1
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 12799
VGDA 4
PE Size (Mbytes) 4
Total PE 25596
Alloc PE 17920
Free PE 7676
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg03/lvol1
LV Status available/syncd
LV Size (Mbytes) 71680
Current LE 17920
Allocated PE 17920
Used PV 2


--- Physical volumes ---
PV Name /dev/dsk/c8t0d3
PV Name /dev/dsk/c10t0d3 Alternate Link
PV Status available
Total PE 12797
Free PE 0
Autoswitch On

PV Name /dev/dsk/c10t1d5
PV Status available
Total PE 12799
Free PE 7676
Autoswitch On


adm3:[/] #

/dev/vg03/lvol1 73400320 52367808 20876824 71% /u03
Torsten.
Acclaimed Contributor

Re: lvextend

You should add the alternate link for PV Name /dev/dsk/c10t1d5 too!


Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Deborah Weatherspoon
Frequent Advisor

Re: lvextend

Thanks Torsten,

This is a first for me, could you provide the command.
Sp4admin
Trusted Contributor

Re: lvextend

If you have Online-JFS you can extend it on the fly. If not you will need to umount the filesystem and then extend it using extendfs and then mount the filesystem.

sp,
Torsten.
Acclaimed Contributor

Re: lvextend

According to the output above

PV Name /dev/dsk/c8t0d3
PV Name /dev/dsk/c10t0d3 Alternate Link
...
PV Name /dev/dsk/c10t1d5

it *could* be c8t1d5.
Anyway, you should run
vgscan -p -v
to check this.

Let's assume we have the correct device, run

vgextend /dev/vg03 /dev/dsk/c8t1d5
and check with vgdisplay.

You should have an "alternate link" entry now.



Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Deborah Weatherspoon
Frequent Advisor

Re: lvextend

I'm getting an error message.

vgextend /dev/vg03 /dev/dsk/c10t1d5
vgextend: Warning: Max_PE_per_PV for the volume group (12799) too small for this PV (30719).
Using only 12799 PEs from this physical volume.
Current path "/dev/dsk/c10t0d3" is an alternate link, skip.
vgextend: The physical volume "/dev/dsk/c10t1d5" is already recorded in the "/etc/lvmtab" file.
Torsten.
Acclaimed Contributor

Re: lvextend

vgextend /dev/vg03 /dev/dsk/c10t1d5
vgextend: Warning: Max_PE_per_PV for the volume group (12799) too small for this PV (30719).
Using only 12799 PEs from this physical volume.

See earlier posts - this space cannot be used currently.


vgextend: The physical volume "/dev/dsk/c10t1d5" is already recorded in the "/etc/lvmtab" file.

Yes it is. There must be another device file for this volume. How about the vgscan -p -v output?

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Deborah Weatherspoon
Frequent Advisor

Re: lvextend

/dev/vg03
/dev/dsk/c8t0d3
/dev/dsk/c8t1d5
/dev/dsk/c10t0d3
/dev/dsk/c10t1d5

Torsten.
Acclaimed Contributor

Re: lvextend

Now run
vgextend /dev/vg03 /dev/dsk/c8t1d5
and check with vgdisplay -v vg03

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Deborah Weatherspoon
Frequent Advisor

Re: lvextend

Same error message.

# vgextend /dev/vg03 /dev/dsk/c8t1d5
vgextend: Warning: Max_PE_per_PV for the volume group (12799) too small for this PV (30719).
Using only 12799 PEs from this physical volume.
Current path "/dev/dsk/c10t0d3" is an alternate link, skip.
vgextend: The physical volume "/dev/dsk/c8t1d5" is already recorded in the "/etc/lvmtab" file.
adm3:[/u03/oradata/MIGR] # vgdisplay -v vg03
--- Volume groups ---
VG Name /dev/vg03
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 1
Open LV 1
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 12799
VGDA 4
PE Size (Mbytes) 4
Total PE 25596
Alloc PE 17920
Free PE 7676
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg03/lvol1
LV Status available/syncd
LV Size (Mbytes) 71680
Current LE 17920
Allocated PE 17920
Used PV 2


--- Physical volumes ---
PV Name /dev/dsk/c8t0d3
PV Name /dev/dsk/c10t0d3 Alternate Link
PV Status available
Total PE 12797
Free PE 0
Autoswitch On

PV Name /dev/dsk/c10t1d5
PV Status available
Total PE 12799
Free PE 7676
Autoswitch On


adm3:[/u03/oradata/MIGR] #
Torsten.
Acclaimed Contributor

Re: lvextend

Please post
uname -a
strings /etc/lvmtab

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
TwoProc
Honored Contributor

Re: lvextend

See Pete Randalls' previous posting.

You've exceeded the maximum amount of PE's a volume group can have. You need to backup the drives contained volume group, drop the volume group, and recreate the volume using the "-e" switch.

From your display above you'll notice two things:
a) Max PE per PV 12799
and for each PV..

--- Physical volumes ---
PV Name /dev/dsk/c8t0d3
...
Total PE 12797

PV Name /dev/dsk/c10t1d5
...
Total PE 12799

So, notice on c8t0d3 - you're 2 PE's away from the max (only 8M left to allocate), and on c10t1d5, you're already maxed out.

Only thing left to do is backup, recreate using the "-e" switch, create your sizes as you need, then restore.
We are the people our parents warned us about --Jimmy Buffett
Deborah Weatherspoon
Frequent Advisor

Re: lvextend

adm3:[/] # uname -a
HP-UX adm3 B.11.11 U 9000/800 124464646 unlimited-user license
adm3:[/] # strings /etc/lvmtab
/dev/vg00
/dev/dsk/c1t2d0
/dev/dsk/c2t2d0
/dev/vg01
/dev/dsk/c8t0d1
/dev/dsk/c10t0d1
/dev/vg02
/dev/dsk/c8t0d2
/dev/dsk/c10t0d2
/dev/vg03
/dev/dsk/c8t0d3
/dev/dsk/c10t0d3
/dev/dsk/c10t1d5
/dev/vg05
/dev/dsk/c8t1d4
/dev/dsk/c10t1d4
/dev/vg06
/dev/dsk/c8t0d7
/dev/dsk/c10t0d7
/dev/vg07
/dev/dsk/c8t1d0
/dev/dsk/c10t1d0
/dev/vg08
/dev/dsk/c8t1d2
/dev/dsk/c10t1d2
/dev/vg09
/dev/dsk/c8t1d5
adm3:[/] #
Torsten.
Acclaimed Contributor

Re: lvextend

OK, you are running 11.11, so vgmodify is not an option.

Your last post looks very strange :-(

From the post above I see at least for vg03

/dev/dsk/c8t0d3
/dev/dsk/c10t0d3
are primary and alternate path to the same device.

But how about

/dev/dsk/c10t1d5
and
/dev/dsk/c8t1d5 ?

I assume the same.
But one link is now part of vg03, the other is part of vg09.

You did force the pvcreate, so I guess you destroyed vg09. Check this!


If vg09 is gone now, consider to rebuild at least vg03 and think about how to proceed with vg09.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Deborah Weatherspoon
Frequent Advisor

Re: lvextend

Neither vg03 or vg09 has any real data on it. In essence, both can be blown away.
If you're not bored yet, please get futher instructions.
Sandman!
Honored Contributor

Re: lvextend

Run the following to see if c8t1d5 and c10t1d5 disks are the same. These cmds will show the PVID written on each of the disks:

# echo '0x2008?2X' | adb /dev/dsk/c10t1d5
# echo '0x2008?2X' | adb /dev/dsk/c8t1d5
Deborah Weatherspoon
Frequent Advisor

Re: lvextend

echo '0x2008?2X' | adb /dev/dsk/c8t1d5
2008: 76B2E06 46E4BEF4
adm3:[/] # echo '0x2008?2X' | adb /dev/dsk/c10t1d5
2008: 76B2E06 46E4BEF4
Sp4admin
Trusted Contributor

Re: lvextend

If there is no data on the disk just blow it away and recreate the disk using pvcreate -f /dev/rdsk/c#t#d#. then vgextend vg03 to that disk. and then create your logical volumes. Besure to do a pvremove to remove the disk first.

pvcreate -f /dev/rdsk/c#t#d#

vgcreate /dev/vg03 /dev/dsk/c#t#d# /dev/dsk/c#t#d#

lvextend -L (MB) /dev/vg03/lvol#

just my $0.02
sp,