1846842 Members
8182 Online
110256 Solutions
New Discussion

increase var

 
SOLVED
Go to solution
Nobody's Hero
Valued Contributor

increase var

I found some free extents in vg00 and would like to increase /var. Where can I find procedures to do this? Will I be able to unmount /var and increase this without effecting the operation of the system. I dont use online jfs.
UNIX IS GOOD
8 REPLIES 8
Armin Feller
Honored Contributor
Solution

Re: increase var

If you don't have OnlineJFS installed you have to umount /var. Normaly you will not be able to umount /var in MultiUser and you are not able to stop all processes on /var. To increase /var you have to boot your system into SingleUser (reboot, break bootup, boot to isl, then boot into SingleUser "hpux -is"). There /var is not mounted and you can use the normal LVM commands:

# lvextend -L /dev/vg00/lvol?
# extendfs -F /dev/vg00/rlvol?
# mountall
# bdf
# cd /
# shutdown -r 0

Regards ...
Armin
Cheryl Griffin
Honored Contributor

Re: increase var

Without OnlineJFS you'll have a hard time freeing up /var since it is used by system daemons, applications, etc.

You should shutdown -r to reboot the system, interrupt the boot process and boot into single user mode. From there, you use lvextend and extendfs. mount /var to check your work, and if all looks good reboot into multi-user mode.

Cheryl

"Downtime is a Crime."
James R. Ferguson
Acclaimed Contributor

Re: increase var

Hi Robert:

If you don't have OnlineJFS, then you need to shutdown your server and boot into single user mode where '/var' and '/usr' aren't mounted.

Next, use 'lvextend' to enlarge the logical volume in which '/var' resides. Follow that with 'extendfs' to actually increase the size of the filesystem within the logical volume. My preference, when done, is to reboot and let the system come up normally.

Regards!

...JRF...
A. Clay Stephenson
Acclaimed Contributor

Re: increase var

Because /var is going to be busy, you are going to have to shutdown and come up in single-user mode. You then can do an lvextend followed by an extendfs.

Let's say that /var is currently 800 MB and you want to go to 900MB.

0) Single-user mode
1) lvextend -L 900 /dev/vg00/lvol8
2) extendfs -F vxfs /dev/vg00/rlvol8
3) mount /var

Man lvextend, extendfs_vxfs for details.

If it ain't broke, I can fix that.
Michael Steele_2
Honored Contributor

Re: increase var

The basick commands are:
lvextend -L ### /dev/vg00/lv0l8
-and-
umount /filesystem
extendfs /dev/vg00/lvol8

But you'll also get into LVM maintenance mode.


lvextend -L ### /dev/vg00/lv0l8 (* you can lvextend before rebooting *)

reboot
interrupt boot
bo pri
interact with IPL
ISL>hpux -lm -is
vgchange -a y vg00
vgdisplay
lvdisplay
extendfs /dev/vg00/lvol8 (* when ready *)
mount /usr
mount /var
bdf
Happy?
Then reboot at this point. DON'T use 'init 3' to come up or you'll corrupt the O/S.
reboot
Support Fatherhood - Stop Family Law
someone_4
Honored Contributor

Re: increase var

You will have to get into single user mode by rebooting the box,
interrupting the boot process,
entering
boot pri ISL
from the menu prompt,
interact with ipl- yes
type
hpux -is
from the ISL prompt.

cat /etc/fstab
to see what number the filesytem is is.


# /sbin/lvdisplay /dev/vg00/lvol8
This will return the size in MB that /var currently is.


# /sbin/lvextend -L /dev/vg00/lvol8

/var is vxfs but this can be checked by doing the
following
# /sbin/fstyp /dev/vg00/lvol8
Note the return value.

#/sbin/extendfs -F /dev/vg00/rlvol8

shutdown -ry 0



Richard
John Poff
Honored Contributor

Re: increase var

Hi Robert,

Without OnlineJFS, you won't be able to extend /var without unmounting it, which is pretty much impossible on a running system. You'll have to shutdown the box and come up in single user mode, extend /var, and then reboot.

JP
Jon Finley
Honored Contributor

Re: increase var

You might want to note, that he CAN do the lvextend at init 3, he just won't be able to unmount /var to do the extendfs without going to single user mode.

This at least will reduce the down time.

Jon
"Do or do not. There is no try!" - Yoda