Operating System - HP-UX
1833789 Members
2463 Online
110063 Solutions
New Discussion

Increase of space of /opt

 
dhanish
Regular Advisor

Increase of space of /opt

I have /opt 2gb and i want to extend that as i have online jfs so i am doing it using sam .I have 6 gb of free space left in my vg00.But when i say increase size it gives error not enough PE'S available error might be due to strict alloacation policy.I get this error every time i try to increase any file system which is under vg00.Can anybody help me.How can i increase thay.Is this stict alloacation plocy is due to mirroring.
Never Say Die
17 REPLIES 17
MARTINACHE
Respected Contributor

Re: Increase of space of /opt

Hi,

An other solution :

- make an ingnite tape (make_recovery -ACi)
- boot from the tape
- In the menu, modify your lvm configuration (/opt size)
- Continu the restore from ignite tape

Regards,

Patrice.
Patrice MARTINACHE
Tim D Fulford
Honored Contributor

Re: Increase of space of /opt

nitin

before doing a the Ignite-UX stuff above (which will work). Try changing the strict policy

lvchange -s n /dev/vg00/lvol6
etc

Tim
-
John Palmer
Honored Contributor

Re: Increase of space of /opt

Hi,

Please post the output from the following two commands:-

vgdisplay -v vg00
lvdisplay /dev/vg00/lvol?

where lvol? is the logical volume name for /opt.

Regards,
John
Bill McNAMARA_1
Honored Contributor

Re: Increase of space of /opt

you can use

lvextend -L 200 /dev/vg00/lvol7

(I can't rememember the lvol # but use bdf)
-L is size in MB of the new /opt size NOT the size to increase by.

If it doesn't lvextend, lvchange -c n /dev/vg00/lvol7 because there may be a contiguous allocation policy in force.

You can use pvmove to move lvol8 off the disk so that you can lvextend lvol7 contiguously..
but that's more work..

then bdf will report something like this:
/opt 123456 kb % % /dev/vg00/lvol7

use fsadm then to extend the fs
fsadm -F vxfs -b 204800 /opt
The new bdf o/p will correspond to 204800
which is 1024 * 200 MB that we lvextended to above.


Later,
Bill
It works for me (tm)
Bill McNAMARA_1
Honored Contributor

Re: Increase of space of /opt

If you say -s n then your mirror of /opt may end up on the same disk.. I'm sure you don't want this.

You may need to use lvdisplay -v /dev/vg00/lvol* to find out on which disk each lvol is on and pvmove some free space on both disks allowing opt to increse in size and mirror too.

pvdisplay /dev/rdsk/cXtYdZ will show you if there is free space on the disks in the vg.

Later,
Bill
It works for me (tm)

Re: Increase of space of /opt

shutdown -ry 0
Interupt normal boot.

bo pri
Interact with IPL? y
hpux -is

In single user mode you can increase any lvol except / for example to extend /dev/vg00/lvol4:

lvextend -L /dev/vg00/lvol4
extendfs /dev/vg00/rlvol4

reboot

Enjoy
dhanish
Regular Advisor

Re: Increase of space of /opt

See vgdisplay -v o/p has 10 lvs and lvol6 is /optand lvdisplay -v /dev/dsl/lvol6 shows several pe's as current


Never Say Die
Magdi KAMAL
Respected Contributor

Re: Increase of space of /opt

Hi nitin,

The followin could help :

1. tar,fbackup, cpio ... the /opt .
#tar -cvf /dev/rmt/?m
2. umount /opt ( if you can't then go to single user mode and unmount the /opt ).
#cd /
#umount /opt
3. Extend the logical volume for /opt ( for example /dev/vg00/lvol7 )
#lvextend -L 4000 /dev/vg00/lvol7 /dev/dsk/c?t?d?
-> 4000 : in Megabytes.
#extendfs -F vxfs /dev/vg00/rlvol7
-> Attention to the caracter device in the last command.
#mount /opt
-> Go to the multi-users level if needed.
Shahul
Esteemed Contributor

Re: Increase of space of /opt


Hi

Here first U confirm that ur lvol is contiguous on not, For that

#lvdisplay -v /dev/vg00/lvol7 |pg

If it is contiguous it will show here. If yes, then U will change the property to non contiguous for extending, Otherwise U should have free PEs continuos to ur /opt lvol.

I don't think U will be having free contiguous PEs, Because U will be having another lvol just after /opt lvol. So U will have to change contiguous policy. For that better U go to LVM maintanance mode.
reboot the system, press and hold esc key and go to ISL prompt.

ISL>hpux -lm

login as root

#vgchange -a y vg00
#lvchange -C n /dev/vg00/lvol7 (assuming lvol7 as /opt)
#lvextend -L xxx /dev/vg00/lvol7 (xxx is the final value of /opt)

In lvextend U can specify to which HDD U want to extend.

lvextend -L xxx /dev/vg00/lvol7 /dev/dsk/cxtxdx

I hope this will help U.


Best of luck

Shahul



dhanish
Regular Advisor

Re: Increase of space of /opt

Hi,
If the vg is mirrored then there can be two policies that can be imposed 1)Stict mirror plicy ..that is to mirror data on seperate disks.2)Contigous policy--to save data contiguosly --pe's next to each other...so taht defragmentation is not needed. right ???.
now whn i say lvdisplay -v /dev/vg00/lvol6 then by which parameter i can see that contiguos policy is et or not.I know as u said i can turn it off by lvchange -C n /dev/vg00/lvol6.....
Never Say Die
John Palmer
Honored Contributor

Re: Increase of space of /opt

The information is given in the line that starts:-

Allocation

e.g.
Allocation strict/contiguous
Allocation strict

etc.
dhanish
Regular Advisor

Re: Increase of space of /opt

See i have just seen that the contiguos allocation policy is not applied on my lv lvol6 (/opt) Only the strict mirror policy has been applied onn vg00.so it means the only consraints in incraesing is it has to write on the separate pvs .I have to pv 's used for this vg out of this one is mirror of the other.and i have enough free space avaialble in my vg00 i2 6 gb ie if i wanna incraece by 1 gb more thn it shud allow me as itr requires in all teh 2 gb to increasse.and sice this stict mirror policy has been applied to total vg (so all the lv's )so all the lv 's will be using the pvs symmetically .
Never Say Die
John Palmer
Honored Contributor

Re: Increase of space of /opt

Please post the output from
vgdisplay -v vg00

It sounds as though you haven't got sufficient free space for one of the mirror copies.

Regards,
John
dhanish
Regular Advisor

Re: Increase of space of /opt

Thats right on one pv i have 3 pe's free and on other i have 1503 pe's free.But if u can

tell me that how that can be the case as i have stict mirror policy in place for all the lvs

ie for the total vg00 so all the data for all the logical volumes should be written

symmetrically.Why this is not the case
Never Say Die
Bill McNAMARA_1
Honored Contributor

Re: Increase of space of /opt

How many disks in the VG.
If there are just 2 then there should be the same PEs free on the 2 PVs unless you forgot to mirror some lvols or bad blocks found or disk sizes different.


Otherwise you need to issue a pvmove to balance lvol distribution up between pvs.

Ps with online JFS you can do this online.

Bill
It works for me (tm)
Varghese Mathew
Trusted Contributor

Re: Increase of space of /opt

Hi,

If you don't have space left in vg00 , you can go for creating a new logical volume in one other volume group. I have done it earlier and it worked also.. ie; we will mount /opt as a different file system

Be sure that you are in Single user mode.

# cd /opt
#find . -depth -print |cpio -pdmuxv /newopt
provided /newopt is the new file system mounted.
after copying all the contents of /opt to /newopt then unmount the /newopt
#umount /newopt
delete the contents of /opt
#cd /opt
#pwd (verify that u r in /opt only)
#rm -r *(be careful while using this command)
Now u can mount the new opt file system.
#mount /dev/vgXX/lvnewopt /opt
verify the bdf output
#bdf
Do not forget to make necessary changes in /etc/fstab if required. You can insert the entry for the new opt in /etc/fstab -->just after /home (if possible)

Hope this will help u.
Cheers !!!
Mathew


Cheers !!!
Michael Tully
Honored Contributor

Re: Increase of space of /opt

If the mirroring is not consistant across
your two disks why not fix this up at the
same time by removing the mirrored copies,
extend your /lvol# for /opt and resync the
mirrors.

# lvreduce -m 0 /dev/vg00/lvol#
# lvextend -m 1 /dev/vg00/lvol#

Make sure you are aware of the existing
mirrors before you attempt this.

HTH
Michael
Anyone for a Mutiny ?