Operating System - HP-UX
1748066 Members
5329 Online
108758 Solutions
New Discussion юеВ

Re: Need help extending /opt files system

 
SOLVED
Go to solution
HP-UX_Newb
Frequent Advisor

Need help extending /opt files system

Hi,

I have a mirror boot partition as follow:

PV Name /dev/disk/disk11_p2
PV Status available
PV Size 67.48 GB
Free 0.38 GB
Allocated 99.44 %

PV Name /dev/disk/disk10_p2
PV Status available
PV Size 67.48 GB
Free 0.38 GB
Allocated 99.44 %

(Newly added Disk)
/dev/disk/disk8 67.48 BG

My vg00 is running out of space and I need to extend its LVs. I have add another physical drive and extended vg00 with it. Here is what I did but it's not working, is this because it's a mirror boot disk?

pvcreate -f /dev/rdisk/disk8
vgextend /dev/vg00 /dev/disk/disk8
(These next steps are where it fails)
lvextend -l xxx /dev/vg00/lvol5

I tried umounting the /opt but it's device busy error. And also tried to use fuser -ku (even with -cku option) /opt but it fails.

I even reboot in single user's mode without /opt being mount but I can't extend the file systems. Any help would be greatly appreciated!
10 REPLIES 10
Patrick Wallek
Honored Contributor

Re: Need help extending /opt files system

>>(These next steps are where it fails)
>>lvextend -l xxx /dev/vg00/lvol5

How does it fail? What is the exact command you ran? What is the error you get?
Uday_S_Ankolekar
Honored Contributor

Re: Need help extending /opt files system

Also paste your vgdisplay -v output
Do you have online JFS installed?
Good Luck..
HP-UX_Newb
Frequent Advisor

Re: Need help extending /opt files system

Hi Patrick,

Here are the commands and its output.

#vgextend -f /dev/vg00 /dev/disk/disk8

Physical volume "/dev/rdisk/disk8" has been successfully created.

vgextend: Warning: Max_PE_per_PV for the volume group (4328) too small for this PV (4375).
Using only 4328 PEs from this physical volume.

Volume group "/dev/vg00" has been successfully extended.

Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf


#lvextend -L 31744 /dev/vg00/lvol5

lvextend: Not enough free physical extents available.

Logical volume "/dev/vg00/lvol5" could not be extended.

Failure possibly caused by strict allocation policy


It looks like the VG didn't get the extra space I have added from this warning:
vgextend: Warning: Max_PE_per_PV for the volume group (4328) too small for this PV (4375).
Using only 4328 PEs from this physical volume.

How would I fix that?
HP-UX_Newb
Frequent Advisor

Re: Need help extending /opt files system

Here is the vgdisplay -v

--- Volume groups ---

VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 8
Open LV 8
Max PV 16
Cur PV 3
Act PV 3
Max PE per PV 4328
VGDA 6
PE Size (Mbytes) 16
Total PE 12966
Alloc PE 8590
Free PE 4376
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
VG Version 1.0
VG Max Size 1082g
VG Max Extents 69248

--- Logical volumes ---

LV Name /dev/vg00/lvol1
LV Status available/syncd
LV Size (Mbytes) 2048
Current LE 128
Allocated PE 256
Used PV 2

LV Name /dev/vg00/lvol2
LV Status available/syncd
LV Size (Mbytes) 12288
Current LE 768
Allocated PE 1536
Used PV 2

LV Name /dev/vg00/lvol3
LV Status available/syncd
LV Size (Mbytes) 1024
Current LE 64
Allocated PE 128
Used PV 2

LV Name /dev/vg00/lvol4
LV Status available/syncd
LV Size (Mbytes) 112
Current LE 7
Allocated PE 14
Used PV 2

LV Name /dev/vg00/lvol5
LV Status available/syncd
LV Size (Mbytes) 22528
Current LE 1408
Allocated PE 2816
Used PV 2

LV Name /dev/vg00/lvol6
LV Status available/syncd
LV Size (Mbytes) 10240
Current LE 640
Allocated PE 1280
Used PV 2

LV Name /dev/vg00/lvol7
LV Status available/syncd
LV Size (Mbytes) 10240
Current LE 640
Allocated PE 1280
Used PV 2

LV Name /dev/vg00/lvol8
LV Status available/syncd
LV Size (Mbytes) 10240
Current LE 640
Allocated PE 1280
Used PV 2

--- Physical volumes ---
PV Name /dev/disk/disk11_p2
PV Status available
Total PE 4319
Free PE 24
Autoswitch On
Proactive Polling On

PV Name /dev/disk/disk10_p2
V Status available
Total PE 4319
Free PE 24
Autoswitch On
Proactive Polling On

PV Name /dev/disk/disk8
PV Status available
Total PE 4328
Free PE 4328
Autoswitch On
Proactive Polling On

No, I dont have JFS installed.
Uday_S_Ankolekar
Honored Contributor

Re: Need help extending /opt files system

you have Max PE per PV set to 4328 while creating vg00, that's why you are seeing this error.

check man pages for vgmodify for next step of actions.

USA
Good Luck..
HP-UX_Newb
Frequent Advisor

Re: Need help extending /opt files system

Thanks Uday!

I read the man page and it looks like I can extend the max_pe but I'm a bit concern doing this. The VG, vg00, is what I'm trying to extend but it is also the OS boot partition. I'm scared that it will either crashes the system or give me hell!

I ran the syntax below to show me what I can do.
#vgmodify -t /dev/vg00
(Output:)
Current Volume Group settings:

Max LV 255
Max PV 16
Max PE per PV 4328
PE Size (Mbytes) 16
VGRA Size (Kbytes) 592
VRA space (Kbytes) without PE renumbering 768
VGRA space (Kbytes) PE renumbering lower 768

Volume Group optimized settings (no PEs renumbered):

max_pv(-p) max_pe(-e) Disk size (Mb)

3 30460 487360
4 22780 364480
5 18172 290752
6 15100 241600
7 13052 208832
8 11260 180160
9 9980 159680
10 8956 143296
11 8188 131008
12 7420 118720
13 6908 110528
14 6396 102336
15 5884 94144
16 5628 90048
17 5372 85952
18 4860 77760
19 4604 73664
21 4348 69568

#vgmodify -e 11260 /dev/vg00 (I want to hit the enter key but...)

Rebuilding the system with a bigger max_pe is not an option. Does anyone have experiences extending the OS partition so it can ease my concerns a little?
HP-UX_Newb
Frequent Advisor

Re: Need help extending /opt files system

I can't run the command vgmodify -e to extend vg00 anyway! The VG, vg00 is active and you can't deactivate it since it's the main OS partition. I guess I have a bigger problems, does anyone know how to deactivate or can you even deactivate the OS VG?

It looks like I may have to rebuild the system! DBAs and everyone else is not going to like this! LOL.
Patrick Wallek
Honored Contributor
Solution

Re: Need help extending /opt files system

The problem is that you have all LVs in VG00 mirrored. You are trying to extend /opt (lvol5), but you only added a single disk.

To get this to work you need to add 2 new disks so that the new space will be mirrored across both disks.

Since you only have 1 disk, when it tries to extend the mirror, it can't.
HP-UX_Newb
Frequent Advisor

Re: Need help extending /opt files system

Patrick, that's it!

This was my last resort! I took another drive and added to vg00 and gave it a tried ... and bam! ... that was the whole cost of it!!! All that and I should of known from the beginning when I stated, "I had a mirrored boot partition". I gave myself a hit and I didn't get it! LOL

Thank you, Patrick!