Operating System - HP-UX
1752672 Members
6178 Online
108789 Solutions
New Discussion юеВ

Extneding the /var file system

 
Michael Slagel
Occasional Contributor

Extneding the /var file system

Hp-ux 11
Can anyone point me to doco on how to extend the /var file system? I know I need to reboot in single user with this not mounted and then do certain commands. Any help? Thanks.
11 REPLIES 11
James R. Ferguson
Acclaimed Contributor

Re: Extneding the /var file system

Michael:

If you have OnlineJFS you can do this "on-the-fly". This is a "chargeable" product feature but well worth the cost. You can use SAM to guide you throught the resize, or you can do this yourself. Do:

# lvextend -L n /dev/vgxx/lvolx
# fsadm -b 1024n /var

where n is the NEW SIZE of the logical volume in megabytes, not the increment in size;

and, 1024n is the product of 1024 and the number of megabytes you want to filesystem to ultimately be.

...JRF...
Dave Wherry
Esteemed Contributor

Re: Extneding the /var file system

You can not just extend /var even if you have On-Line JFS. /var needs to be contiguous. You can work around it by removing the logical volume that occupies the space contiguous to /var. That's more trouble than it's worth.
The easiest way I have seen is to do a make_recovery tape. Then rebuild your vg00 from that tape and resize the /var logical volume. It's very easy, works very well and depending on the size of vg00 I've found it takes 2-3 hours.

Antoanetta Naghiu
Esteemed Contributor

Re: Extneding 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
Jim Mulshine
Frequent Advisor

Re: Extneding the /var file system

Philip Chan_1
Respected Contributor

Re: Extneding the /var file system

Take a look at the system admin section, similiar question has been answered recently there with a lots of details.

Cheers.
Philip
Tim Malnati
Honored Contributor

Re: Extneding the /var file system

Dave mentioned that /var needs to be contiguous; I don't believe this is correct though. / (root), /stand, primary swap, and the dump area needs to be contiguous, but nothing more that I know of (or can find in any documentation). It is entirely possible that the install process (or Ignite) may setup /var to be contiguous by default (it's been a while since I've done a full install), but I can't see any reason why this could not be changed if you find it to be that way on your system.
Rick Garland
Honored Contributor

Re: Extneding the /var file system

Boot into sindle user mode (don't do the init -S or init 1 - boot into single user), make var is umounted, do the lvextend and extendfs, reboot or just go to init 3.
CHRIS ANORUO
Honored Contributor

Re: Extneding the /var file system

Hi Michael,

Do the following:
1.Backup up your /var
2. bdf to know where /var is
3.Boot through ISL to single user mode (ISL>hpux -is)
4.lvextend -L NNN /dev/vg00/lvoln (for var)
5.extendfs -F (filesystem) /dev/vg00/rlvoln
6.reboot

Cheers!
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
CHRIS ANORUO
Honored Contributor

Re: Extneding the /var file system

Hi Michael,

Do the following:
1.Backup up your /var
2. bdf to know where /var is
3.Boot through ISL to single user mode (ISL>hpux -is)
4.lvextend -L NNN /dev/vg00/lvoln (for var)
5.extendfs -F (filesystem) /dev/vg00/rlvoln
6.reboot

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