Operating System - HP-UX
1843013 Members
3089 Online
110212 Solutions
New Discussion

Re: Cannot extend logical volume for -var using SAM

 
Paolo Gilli
Frequent Advisor

Cannot extend logical volume for -var using SAM

I need to extend extend logical volume for -var using SAM.
When I click on ok SAM told me that can't umont /var.
Running fuser /var the response is:
/var:
where is the problem?
how can i solve it?

Thank
6 REPLIES 6
Christopher McCray_1
Honored Contributor

Re: Cannot extend logical volume for -var using SAM

Hello,

Unless you have Online JFS, you have to boot into single-user mode to do this.

Sorry

Chris
It wasn't me!!!!
harry d brown jr
Honored Contributor

Re: Cannot extend logical volume for -var using SAM

You need to use "lsof":

http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.61/

BTW, with so many things using /var, you either need ONLINE-JFS, or kill every process using /var, or boot into single user mode.

live free or die
harry
Live Free or Die
Uday_S_Ankolekar
Honored Contributor

Re: Cannot extend logical volume for -var using SAM

Hello,

Check if you have online JFS
swlist would show you.
If you have on line jfs then it is much simpler to extend LV.
Or else you have extend LV in a singel user mode.

Let us know

-USA..
Good Luck..
Hai Nguyen_1
Honored Contributor

Re: Cannot extend logical volume for -var using SAM

When you use SAM to extend an LV. It first runs lvextend to add more space to the LV (this part does not requires the FS on which the LV is mounted be unmounted). Second, SAM tries to unmount the FS before running extendfs to reflect the new size of the FS.

The second part fails but the first part may have succeeded.
You can run this to verify if the first part has succeeded.

# lvdisplay /dev/vg00/lvol8

If the current LE is different from the allocated LE then the first part has run successfully. Then you can schedule to bring the server down to single user mode and run
#extendfs /dev/vg00/rlvol8

Then bring the server up to multi-user mode.

Hai
Martin Johnson
Honored Contributor

Re: Cannot extend logical volume for -var using SAM

If you don't have OnlineJFS, you must reboot into single user mode (not just shutdown to single user mode - must reboot). Use the extendfs command. If you still have problems, mount /var, umount /var, then try the extendfs again.

HTH
Marty
Bill Hassell
Honored Contributor

Re: Cannot extend logical volume for -var using SAM

Just a note about the majority of HP-UX mountpoints: in multi-user mode, they are usually quite busy so to extend /usr, /var, or /tmp, you'll need to go into single user mode. The optional (priced) product called Online JFS can avoid this step unless any of these volumes are HFS rather than VxFS, in which case, you must go into single user mode.

Single user mode: nope, init s or S (or init 5 or 6 or other Unix flavors of init) can't take you there, despite what the man pages say, and neither will shutdown 0. init S or S will tell init to take of the processes init owns, but there are many other processes that init doesn't handled. And shutdown was able to get rid of all the multi-user processes and unmount all but / (and perhaps /stand) in the past but not anymore.

To get to single user mode, use shutdown -r 0 and be sure to catch the boot interrupt message on the way back. If you keep missing it, use this command before shutdown -r 0:

setboot -b off

and the system will pause for you. Make very sure that root's shell is /sbin/sh--if not, change it back! Then type:

boot primary

and say YES to interact with the IPL (initial program loader). When you get an ISL (initial system loader--don't ask about ISL != IPL), type:

hpux -is

and once you get a prompt, you will be in single user mode and you can use lvextend AND extendfs to make /var bigger. When done, type these commands:

setboot -b on
reboot -q


Bill Hassell, sysadmin