Operating System - HP-UX
1833151 Members
3242 Online
110051 Solutions
New Discussion

Re: extending file systems

 
Scott Clement_2
Advisor

extending file systems

Trying to extend the /home file system. It states that it is in use. I run fuser -c and it only shows my current process probably from the fuser command but can not still umount it. What is the next stop even if I wanted to extend the / file system.
8 REPLIES 8
Geoff Wild
Honored Contributor

Re: extending file systems

fuser -cu /home

If you have online jfs - you don't need to unmount.

lvextend -L /dev/vg00/lvolX

fsadm -b M /home

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.
Sanjay_6
Honored Contributor

Re: extending file systems

Hi Scott,

If you don't have onlineJFS, try this,

to check on any process using /home filesystem,
# fuser -cu /home

if you are in /home directory, get out of that directory.
to kill all processes using /home
# fuser -ck /home

you should now be able to unmount /home and do lvextend / extendfs to extend the size of /home

If you have onlineJFS, you don't have to unmount /home to extend its size, do lvextend/fsadm to extend the size online.

You cannot extend the size of / filesystem, since it has to be contiguous. The only way to extend the size of / would be to reinstall the OS. You can take a ignite backup (take two) and then reinstall the OS on the system and at the time of installtion choose to increase the size of / filesystem.

Hope this helps.

Regds


Victor BERRIDGE
Honored Contributor

Re: extending file systems

Hi,
Do you have Online-Jfs?
Use sam...
If not
go to / do a fuser -ku /home
If you are still alive you should be able to umount now...

Good luck
Victor
A. Clay Stephenson
Acclaimed Contributor

Re: extending file systems

You will find that lsof is a much better tool at spotting open files than is fuser.

In the worst case, you can bring the system up in single-user mode and use the commands in /sbin to grow the LVOL and extend the filesystem.

You should really purchase OnlineJFS. No HP-UX box should leave /home without it.

Even with OnlineJFS, contiguously allocated LVOL's can't be extended (except when there is free space adjacent to the last PE of the LVOL) so / and /stand can't be extended. The only real solution in that case is to use IgniteUX to reload the system.


Man lvextend, extendfs, fsasm for more details and don't use SAM for this until you know how to do all the steps manually.
If it ain't broke, I can fix that.
Pete Randall
Outstanding Contributor

Re: extending file systems

Scott,

Sometimes, when all else fails, the easiest way is just to reboot into single user mode. Boot the box, interrupt at the 10 second prompt, interact with ISL and enter "hpux -is". That will bring you up in single user mode and none of the file systems will be mounted. I usually do a "mount -a" and then unmount /home so I will have access to the commands I need. From there, you can easily entend /home and then enter "init 3" to come on up into multi-user mode.

To expand the root file system ( / ), the easiest way is to make an ignite make_tape_recovery backup and use it to rebuild your root volume group, resizing file systems along the way.


Pete

Pete
Scott Clement_2
Advisor

Re: extending file systems

It still shows that root is connected to the /home. When I run fuser -ck /home it kills my process and it is back when I login. Root's home directory is the default /root. So why would it have a open file on /home?
Victor BERRIDGE
Honored Contributor

Re: extending file systems

It should not...
Check /etc/passwd, root's home should be /

All the best
Victor
P.S.
So no Online-Jfs?
Sanjay_6
Honored Contributor

Re: extending file systems

Hi,

You probably had cd'ed into that directory. Otherwise did you login as another user whose home directory is in /home and then you did a sudo or su to change to root.

Hope this helps.

regds