Operating System - HP-UX
1753485 Members
4197 Online
108794 Solutions
New Discussion юеВ

Adding space to mirror /opt

 
SOLVED
Go to solution
mvr
Regular Advisor

Adding space to mirror /opt

Hello,

I need to increase the size of the /opt partition. The /opt partition is on vg00 and is a mirrored partition. It is mirrored on the two system disks mounted in the CPU. I know I need to goto single user mode to do this but I am not sure of the exact procedure. Below is the out put of the vgdisplay command and the lvdisplay.This is a production box and I want to be clear before I start. Can anybody help ?

$ vgdisplay /dev/vg00
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 12
Open LV 12
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 5120
VGDA 4
PE Size (Mbytes) 16
Total PE 2170
Alloc PE 1266
Free PE 904
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0


$ lvdisplay -v /dev/vg00/lvol5
--- Logical volumes ---
LV Name /dev/vg00/lvol5
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 1008
Current LE 63
Allocated PE 126
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c2t6d0 63 63
/dev/dsk/c1t6d0 63 63

5 REPLIES 5
Sridhar Bhaskarla
Honored Contributor
Solution

Re: Adding space to mirror /opt

Hi,

Since this is a mirrored filesystem, make sure you have enough space on both the disks.

#pvdisplay /dev/dsk/c2t6d0
#pvdisplay /dev/dsk/c2t6d0

Look at "Free PE".

If you have online JFS, you can be able to do it online without having to reboot the box into single user mode.
The commands are

#lvextend -L new_size_in_mb /dev/vg00/lvol5

(new_size_in_mb = the total size. For ex., if you have 1000 MB and if you want to add another 500MB, the new_size_in_mb would be 1500MB)

#fsadm -b size_in_blocks /opt

(size_in_blocks = new_size_in_mb*1024)

If you don't have online JFS, then you would interact with ISL while booting.

ISL> hpux -is

Once it puts you in single user mode, then mount /usr,/tmp and /var.

#mount /usr
#mount /tmp
#mount /var
#lvextend -L new_size_in_mb /dev/vg00/lvol5
#extendfs -F vxfs /dev/vg00/lvol5
#mount /opt
#bdf /opt
make sure it reflects the new size.
#init 3
to get into multi-user mode.

-Sri

You may be disappointed if you fail, but you are doomed if you don't try
Pete Randall
Outstanding Contributor

Re: Adding space to mirror /opt

Quote:

Changing the size of a mirrored logical volume
DocId: LVMKBRC00005095 Updated: 3/21/02 1:15:00 AM



Pete

Pete
Michael Steele_2
Honored Contributor

Re: Adding space to mirror /opt

Your total available free space =

VGDA 4 * Free PE 904 = 3616 mb

To increase /dev/vg00/lvol5 via LVM maintenance mode may not be necessary if you have online JFS.

swlist -l fileset | grep -i online

If so then:
lvextend -L ### /dev/vg00/lvol5

1024 * ### = SUM

fsadm -F vxfs -b $SUM /opt

If no online JFS then:

lvextend -L ### /dev/vg00/lvol5

sync, sync, sync
shutdown -r now
interupt boot
bo pri
interact with IPL
ISL>hpux -lm -is

boots to singler user in LVM mode

extendfs /dev/vg00/lvol5

reboot

NOTE: Never init 3 from LVM maintance mode, always reboot or you'll corrupt your O/S.
Support Fatherhood - Stop Family Law
Michael Steele_2
Honored Contributor

Re: Adding space to mirror /opt

Gag! (* hasty pudding candidate *)

Your PE_SIZE is 16mb, not the usual default of 4mb. So that's

16 mb * 904 Free PE's = 14464 mb

Sorry.
Support Fatherhood - Stop Family Law
mvr
Regular Advisor

Re: Adding space to mirror /opt

Thank you all I was able to add the space to /opt with no problem. I also tried to add space to /var the same way but it did not take. I will open a new thread for this. Again thank you all for your help.