Operating System - HP-UX
1837272 Members
3019 Online
110115 Solutions
New Discussion

resizing and unmounting file systems

 
SOLVED
Go to solution
khilari
Regular Advisor

resizing and unmounting file systems

Hi people, i wanted to know how do u resize a filesystem without unmounting it. I dont have online jfs, so cant use fsadm.. Do, i have to go into single user mode and if so, how do i go about that......

Thanks.
5 REPLIES 5
Pete Randall
Outstanding Contributor
Solution

Re: resizing and unmounting file systems

In order to resize a file system, you first have to resize the logical volume which contains it. This can be done online. Then, you have to resize the file system itself, with the extendfs command if the file system is being enlarged, or with the newfs command if the file system is being reduced. Either of these commands, extendfs or newfs, require that the file system be unmounted. If you can unmount the file system then you are all set. If you can not unmount the file system because it is still in use, then you will likely need to go to single user mode in order to have it unmounted.


Pete

Pete
Jeff_Traigle
Honored Contributor

Re: resizing and unmounting file systems

Without OnlineJFS, you can't resize a file system without unmounting it. (Assuming you're using LVM.)

You don't need to be in single user mode to extand it once it's unmounted. However, some file systems in the root volumen group can't be extended. Basic steps are pretty straight forward:

lvextend -L new_size /dev/vgXX/lvname
umount /mount/point/path
extendfs -F vxfs /mount/point/path
mount /mount/point/path

See the man pages for those commands for explanation of the options.
--
Jeff Traigle
Pete Randall
Outstanding Contributor

Re: resizing and unmounting file systems

Sorry - I missed the last part of your question.

To go to single user mode, reboot your machine (shutdown -r -y 0), then interrupt the boot process at the "you have 10 seconds to interrupt" prompt, enter "hpux -is" at the prompt and the machine will come up in single user mode, logged in as root, and with only the basic file systems mounted. I generally do a "mount -a" at this point so things behave normally, then I unmount whatever file systems I need to work on.


Pete

Pete
khilari
Regular Advisor

Re: resizing and unmounting file systems

thanks i will do that. I wanted to know that when u run swintall what is the package name for online jfs which lets u use fsadm to resize the logical volumes...
And what are my choices if i cant go into the single user mode, because there are users logged in and nothing can be interrupted....
Pete Randall
Outstanding Contributor

Re: resizing and unmounting file systems

root# swlist -l product |grep -i online
OnlineJFS B.11.11 Online features of the VxFS File System


Pete

Pete