1834925 Members
2283 Online
110071 Solutions
New Discussion

how to extend /usr ,

 
SOLVED
Go to solution
常有慈悲心
Regular Advisor

how to extend /usr ,

without reboot ,without onlinejfs
6 REPLIES 6
Rajeev  Shukla
Honored Contributor

Re: how to extend /usr ,

I am sorry there is no way you can extend /usr without a reboot.
You need to reboot the system and go to single user to extend /usr

Other option you can choose is if you have something else other than system files..like /usr/local/bin occupying space, you can create another filesystems and copy all those files there.
Naveej.K.A
Honored Contributor
Solution

Re: how to extend /usr ,

hi,

I don't think you will be able to umount /usr without rebooting. There will be lot of processes which has started from /usr. You need to boot into single user mode or lvm maintenance mode.

and then

umount /usr (it will not be mounted though)
lvextend -L newsize /dev/vg00/lvol5
extendfs -F vxfs /dev/vg00/rlvol5
mount /usr

with best wishes
Naveej
practice makes a man perfect!!!
Shaikh Imran
Honored Contributor

Re: how to extend /usr ,

Hi,
Its not possible to extend the /usr filesystem without reboot.


Regards,
I'll sleep when i am dead.
Joseph Loo
Honored Contributor

Re: how to extend /usr ,

hi,

for /usr, u need to reboot and since without online JFS:

u may do a shutdown but most importantly, u must break the 10 seconds before u can proceed to single user mode via:

after breaking to PDC Menu --> bo pri

ISL> hpux -is

since it is the logical volume of /usr u r increasing:
# /sbin/lvextend -L /dev/vg00/lvol#
# /sbin/extendfs -F vxfs /dev/vg00/rlvol#
since the /etc/default/fs is hfs, unless u want to amend the file to vxfs
# mount /usr
# lvdisplay /dev/vg00/lvol#
# mount /usr
# bdf
to check if the size is correct.

regards.
what you do not see does not mean you should not believe
Simon Hargrave
Honored Contributor

Re: how to extend /usr ,

Since many core processes live and use /usr (eg inetd and its siblings) you've no choice but to reboot.

For reference though, if you need to do the same to other filesystems in future (eg /opt which often may have things like ITO agents which can be temporarily shut down), you can do something like: -

for PID in `fuser -c /opt`
do
ps -p $PID | grep -v PID
done

This will list all processes using that filesystem. Look at the list, and if you can cleanly shut down all the processes, and start them, without affecting your application, then you can do it this way.
KapilRaj
Honored Contributor

Re: how to extend /usr ,

/usr ?. Why do you have to increase it ?. It just do not contain any temp files or logs.

Check for a coredump and remove it.

find /usr -name core -print

Kaps
Nothing is impossible