Operating System - HP-UX
1835210 Members
2255 Online
110077 Solutions
New Discussion

Re: extend /home on a K-Class server

 
Aaron_76
Occasional Advisor

extend /home on a K-Class server

I want to add some users into the /home directory. But it keeps complaining of no room what is the best way to proceed ???
7 REPLIES 7
malvin drakley
Esteemed Contributor

Re: extend /home on a K-Class server

Hi you can extend the file system, you need to first boot to single user mode ie "shutdown -is", then you need to type the command:
"vgchange -a y /dev/vg00"
next to you need to check /etc/fstab to find the mountpoint and file system type for home.

then "lvextend -L 2048 /dev/vg00/lvolx" where x is your vol number.

then "extendfs -F vxfs /dev/vg00/rlvolx"

Then you can come back to multiuser and your file system will have been extended.

the 2048 size you will need to set to your own parameter, as you might not want to increase home by 2gb
hope this helps
malvin
Not me Chief, I'm Radar
Mark Grant
Honored Contributor

Re: extend /home on a K-Class server

Firstly, see if you have any space left in the volume group.

"vgdisplay vg00" (assuming you have /home in vg00). If you have "FREE PE" reported then you can increase the logical volume that /home sits on by that amount. If you also have OnLineJFS installed ("swlist | grep OnLineJFS") you can increase the size of /home online.

Assuming you have spare space in the volume group, extend the logical volume for /home

lvextend -L 900 /dev/vg00/lvol4

This assumed that you wat to make it 900MB in size and the logical volume is lvol4

If you do have OnLineJFS you can then go

fsadm -b 900M /home

and you are done :)

If you don't have online JFS you are going to have to unmount /home first. If you can get all your users out, you might be able to unmount it, otherwise you are going to have to boot into single user mode

When it is unmounted go

extendfs -F vxfs /dev/vg00/rlvol4

Then you should be done.

If you don't have free extents in your volume group, you are going to have to either decrease another filesystem or preferably extend the volume group by adding a spare disk.

Hope this helps!
Never preceed any demonstration with anything more predictive than "watch this"
Aaron_76
Occasional Advisor

Re: extend /home on a K-Class server

Thanks both for your excellent help
Saurav_1
Valued Contributor

Re: extend /home on a K-Class server

Hi,

I request you, Pls assign Points accordingly.

Saurav
Steven E. Protter
Exalted Contributor

Re: extend /home on a K-Class server

Last I checked it should be possible to do a /home expansion without single use mode.

fuser -cu /home

That will list processes on the home filesystem.

fuser -cuk /home

Will put them out of your misery.

Then proceed with the good instructions above to expand the fs.

The first post is a good idea for expaning /var

I second the notion on the points. At least one of the prior posters provided you a complete solution. Ettiquette dicates 8-10 points under those circumstances.

This post. 2 pointer tops.

:-)

Happy foruming....

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Suresh Patoria
Super Advisor

Re: extend /home on a K-Class server

Hi,

See the following step may be help u.

1) note down the /home logical volume path like /dev/vg00/lvol4

2)bring the system in to single user mode using the init s comand or shutdown -ry 0 and interrupt the system use the hpux -is option

3)exnted the /home file system

lvextend -L <> /dev/vg00/lvol4

Note: your define size should more then u have original like suppose u have 100MB size of /home. you want to increase the 100MB more then u suppose to give 200 with -L option.

4> do the commitment change
exntedfs /dev/vg00/4lvol4

5>mount the file logical volume

mount -F vxfs /dev/vg00/lvol4 /home

6) use the comand bdf to check size

7) brint the system back to multiuser mode using init 3 command or reboot the system

Thanx
Norman_21
Honored Contributor

Re: extend /home on a K-Class server

hello,

Steven has brought up a good point. You can kill the processes of a /home file system in order to unmout it but sometimes it is impossible to umount /var as well as /usr.
Take into consideration that DOWN TIME is a major iussue with live production servers.
So if you have to bring the server down to Single user Mode, the best way is :
#vgdisplay vg00 [check the Free PE, let's assume Free PE is 30
# echo '30*4'|bc
120
Above means that you have 120Mb free since it is very important to determine the free size in MB, you'll need it with the command lvextend.
#init S [This will take it to Single user mode]
#lvextend -L 120 /dev/vg00/lvol6 (home is lvol6 in my system)
#extendfs -F vxfs /dev/vg00/rlvol6 /home[Notice the 'r'lvol6]
#mount /dev/vg00/lvol6 /home
#bdf /home
#init 3
Make sure your system runs in Run level 3, to do this :
#who -r

Good luck
"Attitudes are contagious, is yours worth catching"/ My first point was given by SEP on January 31, 2003