Operating System - HP-UX
1834346 Members
1811 Online
110066 Solutions
New Discussion

Re: how to extend the /var file system

 
Michael Slagel
Occasional Contributor

how to extend the /var file system

Hp-ux 11
I need to extend the /var file system. I know I need to boot in a mode that will not mount this system and then execute certain commands. Can anyone point me in the direction of these instructions? Thanks.
5 REPLIES 5
Jennifer Chiarelli
Regular Advisor

Re: how to extend the /var file system

If you issue the shutdown command (with no options) you will go into single user mode. You need to be in single user mode to expand /var.
It's a binary world!
Stacey Rippetoe
Advisor

Re: how to extend the /var file system

Actually there are sometimes problems shutting down into single user to perform this task. You need to have the file system unmounted and sometimes if you shutdown into single user you will get device busy.
I would recommend you boot into single user.
Backup the filesystem before extending
* shutdown -r now
* interrupt the boot
* boot from primary and interact with ISL
* Boot into single user mode using hpux -is
NOTE:Nothing will be mounted.
Then go ahead with your extend....
* lvextend
* extendfs (use the character device)
verify with bdf
Reboot the system to its normal running state using shutdown -r now
Antoanetta Naghiu
Esteemed Contributor

Re: how to extend the /var file system

1. If /var is VxFS and you purchased OnLine JFS, you can do it on the fly. If you do not have OnLine JFS, see 2.
2. If /var is HFS, you have to boot in single user mode, lvextend the logical volume where /var resides, extendfs and everything should be fine. No other headaches. To boot in single user mode and the syntax for lvextend, extendfs, see ?Installing HP-UX 11.0 and Updating HP-UX 10.x to 11.0, Chapter 7 Troubleshooting, Adjusting File System Size. The example from there is exactly on increasing /var. See as well same book on http://www.docs.hp.com/dynaweb/hpux11/@Generic__CollectionView
Philip Chan_1
Respected Contributor

Re: how to extend the /var file system

You have to enter single user mode for that.

1. do "bdf" to mark your lvol for /var

2. "shutdown now" will take you to single user mode.

3. "umount" /var (or using the lvol name)

4. "lvextend -L

5. "extendfs "

6. "reboot"

when the server come up the var fs should be extended.
CHRIS_ANORUO
Honored Contributor

Re: how to extend the /var file system

Hi Michael,
To extend/increase file system size do the following:
1 backup the fielsystem e.g. /var (using fbackup)
2.cp fstab to fstab.old and also do bdf to note the Filesystem e.g.(/dev/vg00/lvoln)
3. Reboot to single user mode. (Interrupt and boot interatively through ISL> hpux -is) This will take you to single user mode.
4. Extend filesystem /var: lvextend -L nnn /dev/vg00/lvoln (nnn new size in mb)
5.extendfs -F vxfs /dev/vg00/rlvoln
6.fsck -F vxfs /dev/vg00/lvoln
7.mount /dev/vg00/lvoln
8.Restore from backup
9.Reboot the system

Cheers
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.