Operating System - HP-UX
1834872 Members
2432 Online
110070 Solutions
New Discussion

extending file systems (/home)

 
SOLVED
Go to solution
Mark Greene_1
Honored Contributor

extending file systems (/home)

I know that some file systems like /opt require that the system be taken down to single user mode before they can be extended. Is this the case for /home? And does anyone know if a definitive list of file systems for which this applies exists? I looked in the extendfs and lvextend man pages, but they did not address this issue at all.

Thanks,
Mark
the future will be a lot like now, only later
9 REPLIES 9
Pete Randall
Outstanding Contributor

Re: extending file systems (/home)

Mark,

The key is that the file system needs to be unmounted. If you can kick your users off and manage to unmount /home without going to single user mode, then you can leave the system up.

Hope this helps,
Pete

Pete
Mark Greene_1
Honored Contributor

Re: extending file systems (/home)

Yeah, I'm going to have to do that, as we are going to swap 2 18gig drives for 2 36gig ones in our SC10 array. I was wanting to know if I can just get everyone off the system and stop the db, or if I have to go all the way down to single-user mode as well.

mark
the future will be a lot like now, only later
Jeff Schussele
Honored Contributor

Re: extending file systems (/home)

Hi Mark,

Generally
/ /stand /usr /opt & /var
*usually* need to be extended in single-user mode.
/home is iffy as users may be logged in & just sitting at a shell prompt & will be sitting in the home dir frequently. You'll almost always have to boot all users off the system to extend home.
A key is to make sure root does NOT have their home dir under /home.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Sebastian Galeski_1
Trusted Contributor

Re: extending file systems (/home)

Hi
if You use Advnced JFS You dont need to umount filesystem. Have a look at man fsadm, unfortunately when You don't have this product filesystem have to be unmounted.
S.K. Chan
Honored Contributor
Solution

Re: extending file systems (/home)

Basically you just need to know that /(root), /stand(boot) and primary-swap-lvol needs to be contiguous (ie no bad block relocation). If you run ..
# lvdisplay /dev/vg00/lvolX
==> For any of the above LVs, you'll see that "Allocation=strict/contiguous".
Other then that (/opt, /usr, /var, /home) can be lvextended in a normal way without worrying about contigous nature of these LVs. And as long as you can umount them, you can lvextend 'em, unless you have ONlineJFS which allow you to lvextend it on-the-fly. When the system is in use, it's obvious dirs like /usr,/var and /opt for exmaple cannot be unmounted, hence need to go to single-user-mode.
James R. Ferguson
Acclaimed Contributor

Re: extending file systems (/home)

Hi Mark:

The rules are simple. If you have Online JFS and are dealing with VxFS (JRF) filesystems, there is no need to unmount or go to single-user mode to extend or shrink a filesystem.

If you do not have Online JFS or the filesystem is HFS, then you *must* unmount the filesystem to extend it. In that case, you can remain in multi-user mode as long as no one (human) or no process is running that is accessing it. In cases like /var, /tmp, and sometimes /opt it is simply easier to do the maintenance in single-user mode where you have *not* transited run-levels that start daemons that use files or pipes in these filesystems. The other choice is to stop and later restart daemons that are interferring.

If you can get all of your users to stay logged-off, you can probably extend /home while running otherwise normally. Use 'fuser' to see who/what has open files if you can't unmount it, and optionally 'fuser -k' to kill processes there.

Regards!

...JRF...
Mark Greene_1
Honored Contributor

Re: extending file systems (/home)

OK, looks like I can avoid the single user mode. No OnlineJFS, but then root's home dir is / and /home is Vxfs, so unmount, lvextend, extendfs, mount should go ok.

Thanks to all who replied, points on the way.

Mark
the future will be a lot like now, only later
Sanjay_6
Honored Contributor

Re: extending file systems (/home)

Hi Mark,

/home is a mount point where the normal user home directories are created by default. If you don't have any user activity at present and you can get the users to logout, you can unmount /home and increase the filesystem size. You cannot do so with the other filesystems in vg00 since they are in use by the system normally and hence you need to go into single user mode to increase their sizes.

To check if anyone is using /home,

fuser -cu /home

to kill all process id's using /home,

fuser -ck /home

Then unmount /home,

umount /home

increase the filesystem size,

lvextend -L new_size_in_MB /dev/vg00/lv_for_home
extendfs -F vxfs /dev/vg00/rlv_for_home

Now mount the filesystem back,

mount /dev/vg00/lv_for_home /home

Hope this helps.

Regds
Trevor Roddam_1
Valued Contributor

Re: extending file systems (/home)

Just a warning:
Be careful of MAX_PE in the volume group.
This may limit the amount of disk that is usable.
By default the max size of the first disk used to create a VG is the max usable from then on. Regardless of the disks used.
There are ways around this. Let me know if they're required.
Baldric, I have a plan so cunning you could pin a tail on it and call it a weasle.