Operating System - HP-UX
1821608 Members
3550 Online
109633 Solutions
New Discussion юеВ

Using all disk space after mirroring

 
BigMax
Advisor

Using all disk space after mirroring

So i have HP-ux on parisc server.
I had a two 73 GB hard disks wihout a mirror. Than i installed MirrorDisk/UX (licenced copy) and created a root mirror according to HP documents and recomendations. It worked fine. Than i got two 300Gb hard disks from HP. So i have removed mirror using also that HP document.
After that i changed one of the 73Gb disks to 300 and created a mirror, then i removed the mirror leaving 300Gb as a master. Then Installed one more 300GB disk instead of the las 73gb one and rebuild the mirror once again. So now it works fine - no problems but i want to use all th 300 gbs.
So i have vg00 and SAM says the following:
Disk megabytes 286102 (300Gb - is correct) and usable megabytes 70102 (73gb - also correct).
A have 9 LVol's in this Vg.

So the thing is that i cannot create new lvol,
and also i cannot add new VG.

So does anyone have idea how no use all the 300Gbs?
It does not metter to me - to add a new lvol, vg or extend one of existing.

Thanks in advance!
The document is in attach. see page 22 for root mirror.
18 REPLIES 18
Victor BERRIDGE
Honored Contributor

Re: Using all disk space after mirroring

Greetings my friend,

What happened is you used the default vg parameters with your system, and there is not alternative but to reinstall... that is, all the definition of the volume group is done once at the creation time (max pvs max extents etc...) you have a way of getting yourself out by using an ignite tape and using it to reinstall on the 300GB disks, it will then set new values according to the disk size


All the best
Victor
Matti_Kurkela
Honored Contributor

Re: Using all disk space after mirroring

This might be one of the top 5 problems people are having with HP-UX LVM.

There are some parameters that are set when a VG is created and cannot easily be changed afterwards. These are:
- the max number of PVs in VG (Max PV)
- the max number of physical extents per PV (Max PE)
- the size of physical extents in VG (PE size)

If the Max PE value is not specified when creating the volume group, it will be automatically set to 1016 or the smallest number necessary to cover the (largest) PV in the VG _at the time of creation_.

The default PE size is 4 megabytes. So, if the system disk is larger than about 4 gigabytes (=always on modern disks), the vg00 will always be auto-sized so that it cannot later accept bigger PVs than used at the creation time.

The only way to fix this problem is to destroy the VG an re-create it with a larger MaxPE value - and if the VG is vg00, this usually means creating an Ignite tape (make_tape_recovery -x inc_entire=vg00) and using it to recreate the system with a larger vg00.

At the moment, I don't remember whether you can override the autodetected parameters of vg00 when installing HP-UX. (It might be that you can easily change PE size, but not MaxPE.) If you suspect you'll need to move vg00 to larger disks, you should make sure the vg00 is created with suitable parameters at HP-UX installation time.

This is also why it is generally not recommended to put data volumes in vg00: the data will usually grow beyond original estimates, and re-creating a separate data VG is much more convenient than re-Igniting the entire system when you hit LVM limits.
MK
BigMax
Advisor

Re: Using all disk space after mirroring

Thanks guys, can you please check the attached screenshoot? Maybe it will tell you smthing abount the param of my vg00.
Victor BERRIDGE
Honored Contributor

Re: Using all disk space after mirroring

Yes its your maxPE that limits your total size... And as said it is set at volume group creation...

But now 73GB is plenty big enough for vg00, why not use them as for system purpose only and start of a new group vg01 in mirror using your 300GB disks?

All the best
Victor
BigMax
Advisor

Re: Using all disk space after mirroring

Maybe it's a solution - to leave one 73 gb for system and two 300gb for data but the task is to use onlu 2 disks and mirror both system and data.
BigMax
Advisor

Re: Using all disk space after mirroring

So guys... is it really no way to use all the disk without reinstalling? Maybe some magic....
Victor BERRIDGE
Honored Contributor

Re: Using all disk space after mirroring

As I said,
Use the 2 73GB for vg00, and use the 2 300GB for vg01 and mirror the 2 vgs!
You have then the best of all
BigMax
Advisor

Re: Using all disk space after mirroring

Ha! This is not acceptable because my server has only 3 ports for HDD's as i told i have 3440 parisc.
Robert-Jan Goossens_1
Honored Contributor

Re: Using all disk space after mirroring

two options.

A If you have a tape drive attached to this system or you have an ignite server in your subnet, create an make_tape_recovery/make_net_recovery and recover your system to the larger disks.

B If you are on 11.11, call the HP Response Centre and request the unsupported utility called vgmodify.

Best regards,
Robert-Jan
BigMax
Advisor

Re: Using all disk space after mirroring

I do not have a tape attached to this server and about this vgmodify how can i use it?
Robert-Jan Goossens_1
Honored Contributor

Re: Using all disk space after mirroring

You need to request this tool, call your local HP support center.

http://welcome.hp.com/country/ru/ru/contact_us.html
BigMax
Advisor

Re: Using all disk space after mirroring

ok will try to do it.
but then, when i get it what shoul i do?
Robert-Jan Goossens_1
Honored Contributor

Re: Using all disk space after mirroring

attaching the man page.
BigMax
Advisor

Re: Using all disk space after mirroring

thanks a lot. but nevertheless can anybody send me by e-mail vgmodify? Decause i think i will wait too long for HP support's response. I am in Russia, so they (HP support) do not know how to work fast.
Robert-Jan Goossens_1
Honored Contributor

Re: Using all disk space after mirroring

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=733428

Remember to take good backups!!!

Good luck,
Robert-Jan
BigMax
Advisor

Re: Using all disk space after mirroring

Thanks a lot. i will try to use it and will com├С back with the results.
BigMax
Advisor

Re: Using all disk space after mirroring

So fellos, I DID IT!
Here you can find a complete 27 step manual HOW TO transfer a system to a new bigger HDDs and how to install mirror using MirrorDisk/UX. All needed files, butwithout MirrorDisk Depot (is too large), all documentation and the follwing instruction are attached as one zip archieve. Lets Call it Bigmax kit :) And ploease be informed that i take no responsibility about it and for using MirrorDisk/UX you need a licence and you can kill you sistem and be able to reinstall it. All the steps i perfomed on my 3440 PA-Risc resver and i succeeded.
Good LUCK

From Moscow, Russia with LOVE.

------------------BEGIN---------------------
1. First we should transfer system to new disks. Install Mirror Disk/UX from depot (if you do not have it)
2. If you had a mirror - then reduce it whith this script (c2t0d0 is master - keeps with data):
#!/usr/local/bin/bash
for lvol in lvol1 lvol2 lvol3 lvol4 lvol5 lvol6 lvol7 lvol8 lvol9
do
lvreduce -m 0 /dev/vg00/$lvol /dev/dsk/c2t1d0
done
3. Detach the slave drive (not usable) and install new drive instead of it
4. Create a ROOT mirror, using the following document HP-UX LVM Documentation.pdf pages 22 and 40. (c2t1d0 - slave)
5. Reduce this mirror leaving new disk as master with this script (c2t0d0 - old, c2t1d0 - new)
#!/usr/local/bin/bash
for lvol in lvol1 lvol2 lvol3 lvol4 lvol5 lvol6 lvol7 lvol8 lvol9
do
lvreduce -m 0 /dev/vg00/$lvol /dev/dsk/c2t0d0
done
6. Create a ROOT mirror, using the following document HP-UX LVM Documentation.pdf pages 22 and 40. (c2t0d0 - slave)
7. Reboot and check all works ok. Now we will extend the VG free space by using extra space of newly installed HDD
8. Put the vgmodify file into some folder under "/" filesystem and set permissions to 777.
9. Go to server's console by telnet . You should know the password.
10. Press CO to enter Live Console.
11. Press Ctrl+e, than ├С (without Ctrl) and than f (also without Ctrl)
12. Then go back to ssh shell and Shutdown -R now
13. During startup process when you'll see something like that "To discontinue boot press any key" - DO it - prees any key
14. Then enter BO command to boot until ISL.
15. When you see ISL> promt enter hpux -lm to boot the system into LVM maintenance mode.
16. After you see the SH promt "#" you should first backup you VG configuration. Use this: vgcfgbackup vg00
17. Now we will make a change to the vg00 to make in use more space. READ the vgmodify man page, forum etc to completly understand what is LVM, PE, PV, LV etc.
18. cd / and then ./vgmodify -e 17500 -p 4 -r vg00
19. -e 17500 - is new max number of PE and each PE is 16mb so we can use 280Gb, -p 4 - is new max number of PV (disks).
20. be shure command of point 18 worked with no errors because VGRA area could not fit into int initial place after changing some parameters (if i left -p 16 it was not fit and i reduced it to 4 because i do not have more than 3 HDD's)
21. If all ok - then run whith NO -r key. ./vgmodify -e 17500 -p 4 vg00
22. After you see NO ERRORS message (or smth like this) step to point 24.
23. If any erros detected - try to solve the problems or run a vgcfgrestore vg00 and try to understand what is wrong
24. So if no errors then shutdown -R now.
25. During the first boot it will do some strange things and say about crashes and errors - DO NOT TOUCH it let him boot automatically the secont time - it will be successfull. If not - try do play with LVM maintenance mode.
26. Use SAM or somth like it to check your vg00 available megabytes has changed.
27. After successfull boot you can use newly added free space as you wish. I have just extended one of my lvols.
------------------END-----------------------

BigMax
Advisor

Re: Using all disk space after mirroring

see my last post for solution. it works