1827293 Members
2075 Online
109717 Solutions
New Discussion

How extend /usr

 
M. FRANGEUL
Advisor

How extend /usr

Hi,

How can extend the file system /usr on system HP-UX 11i (11.23).
I can't umount it, because it is always busy.

Cordialy
Didier.
9 REPLIES 9
Leif Halvarsson_2
Honored Contributor

Re: How extend /usr

Hi,
You need the OnlineJFS product. Or you have to backup/reconfigure/restore the system using Ignite.
Fred Ruffet
Honored Contributor

Re: How extend /usr

have a look at "fuser -cu /usr". If the process that are reported to use /usr can't be stopped, you'll have to boot into single mode.

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Steven E. Protter
Exalted Contributor

Re: How extend /usr

If you have Online JFS you can extend hot.

swlist -l product | grep -i JFS

fsadm -F vxfs -b

I guess you do not though.

So:

at console

boot

interupt at the 10 second prompt.

bo

Y Interact

hpux -is

or

lpux -lm

There is a copy of the lvm commands in the /sbin folder

run lvextend and extendfs from there.

Make sure you know what disk you want to extend onto. Run reports and have them handy on paper before you start.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
M. FRANGEUL
Advisor

Re: How extend /usr

I have not Online JFS, I try whith the single mode.

Think's.
Zinky
Honored Contributor

Re: How extend /usr

You should have carefully planned your OS partitions. I have always mine as a large root - minimalist partitioning scheme (since you probably have an OS disk that is at least 36GB):

/stand - 512m, / - 8192m, /opt - 4096m, /var - 8192m, /tmp - 2048m - rest as swap.

In situations like this.. most servers often do not have contigous area left so I end up simply repartitioning by doing a tape or net recovery backup and restoring.

Create a tape recovery archive:

make_tape_recovery -I -Av
or
make_tape_recovery -I -Av -a /dev/rmt/?mn

Then boot that tape. I trust you know your BCH operations already. The -I option above stops Ignite Boot from automagicaly restoring so you can re-"carve" your OS disk(s) to suite your needs -- or go with a minimalist partitioning scheme where / and /usr is just one LVOL/partition.
Hakuna Matata

Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler
M. FRANGEUL
Advisor

Re: How extend /usr

How can enter in single mode on system
HP-UX 11.23 I have not the possibility after the reboot and the 10 secondes prompt to enter in the interact mode ???

What is the procedure for the maintenance mode ?

Thank's
Didier.
Geoff Wild
Honored Contributor

Re: How extend /usr

On boot,

Interact with IPL

hpux -is


But first, you will have to lvextend - if /usr is on /dev/vg00/lvol7, then

lvextend -L NEWSIZEINMB /dev/vg00/lvol7

Then reboot...

Then /sbin/fs_wrapper -F vxfs /dev/vg00/rlvol7


I think that will work...reason is, extendfs is a symbolic link:

ll /usr/sbin/extendfs
lrwxr-xr-x 1 root root 16 Oct 29 16:37 /usr/sbin/extendfs -> /sbin/fs_wrapper

and /usr will not be mounted...

Only other way is to use a make_tape_recovery

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Sachin Patel
Honored Contributor

Re: How extend /usr

Hi Didier,
Here is what I have save in my email from long time. It works. I got this from this forum. It to expand /stand you can do that to /usr. I have done it before without any problem

Assumptions,

01. You are not just an "HP kid" who will play with ignite like stuff.

02. You like taking some risk & saving your valuable time

Size of /dev/vg00/lvol1 is A (boot or /stand or /dev/vg00/lvol1)

Size of /dev/vg00/lvol2 is B (swap or /dev/vg00/lvol2)

You wanna increase size of lvol1 from A to A+X (where X is not more than B - "physical memory installed in your machine")

Basically we have to decrease size of swap to increase boot as they are contigous.

Now Extending /stand is an easy job which can be performed in 10-15 minutes.

Steps

01. Boot your machine in LVM maintenance mode
(hpux -lm at ISL>)

#rm /etc/mnttab
#vgchange -a y /dev/vg00
#lvrmboot -r /dev/vg00
#lvremove /dev/vg00/lvol2
#lvextend -L "A+X" /dev/vg00/lvol1
#extendfs /dev/vg00/rlvol1
#lvcreate -L "B-(X+10)" -C y -r n -n lvol2 /dev/vg00
#lvlnboot -b /dev/vg00/lvol1
#lvlnboot -r /dev/vg00/lvol3
#lvlnboot -s /dev/vg00/lvol2
#lvlnboot -d /dev/vg00/lvol2
#reboot -r

You have your /stand extended now

Is photography a hobby or another way to spend $
M. FRANGEUL
Advisor

Re: How extend /usr

Thank's at all,

accomplished mission
with Steven method :

-> single-user
-> interact Y
-> hpux -is

-> cd /sbin

-> lvextend and extendfs

Thank's again
Didier.