Operating System - HP-UX
1825803 Members
2445 Online
109687 Solutions
New Discussion

how increase size of /usr

 
SOLVED
Go to solution
Asif_8
Regular Advisor

how increase size of /usr

Hi !
I havew
RP5405
HP-UX 11.11
I want increase the size of /usr

7 REPLIES 7
doug mielke
Respected Contributor

Re: how increase size of /usr

Best way is in single user mode. If that's not possible, consider symbolic links to another filesystem until you can get reboot time.
Pete Randall
Outstanding Contributor

Re: how increase size of /usr

You'll need to unmount the file system, so the easiest way is to reboot in single user mode, run lvextend, then run extendfs. However, if you have sufficient room, you can create a new file system, copy the contents of /usr into it, switch the mount points in /etc/fstab and reboot.


Pete

Pete
Hazem Mahmoud_3
Respected Contributor
Solution

Re: how increase size of /usr

# lvextend -L /dev/vg00/
# fsadm -b /usr

If you do not have fsadm, then you will need to unmount the filesystem, then do:

# extendfs /dev/vg00/

To unmount will probably need to be done in single-user mode.

-Hazem
Tim D Fulford
Honored Contributor

Re: how increase size of /usr

If you hve on-line JFS then it can be done online

# lvextend -L /dev/vg00/lvol?
# fsadm .. (I forget the switches??) ..

If you do NOT have On-line JFS then you will need to unmont /usr
# lvextend -L /dev/vg00/lvol?
# umount /usr
# extendfs .. (I forget the switches?)..
# mount /usr

Regards

Tim

-
Asif_8
Regular Advisor

Re: how increase size of /usr

thanks

I undersatand following :
boot in single user mode or change in to signale user mode (init -s ) because I am doing remotely.
# umount /usr
# lvextend -L (MB) /dev/vg00/lvol7
#extendfs -F vxfs /dev/vg00/rlvol7
(is correct option)
#mount /usr
Hazem Mahmoud_3
Respected Contributor

Re: how increase size of /usr

If you are doing this remotely, it will not work to go into single-user mode. Going into single-user mode needs to be performed on the console, because networking services are not running in single-user mode. If you need to do this remotely, then you will need to use fsadm, otherwise you will need to go to the console to do this in single-user mode.

-Hazem
Pete Randall
Outstanding Contributor

Re: how increase size of /usr

If you're doing this remotely and don't have online JFS, then your only recourse is to try to create another filesystem as I mentioned previously. If you have extra room in vg00, it is a simple matter to create an new logical volume and a file system on it. Then mount the file system as /newusr, copy the contents of /usr into /newusr (I would probably use find /usr |cpio -pdumxl /newusr), then edit /etc/fstab to switch the mount points so that /usr points to the lvol that /newusr is on and /newusr points to the lvol that /usr is on - then reboot and your /usr volume will be larger.

The only other thing I can think of is to create another file system and use symbolic links to move some things out of /usr. That would relieve some of the pressure.


Pete

Pete