1833927 Members
3445 Online
110063 Solutions
New Discussion

Change /home size.

 
SOLVED
Go to solution
Jeffrey F. Goldsmith
Super Advisor

Change /home size.

I have two UNIX servers, diomede (L2000) with HP-UX 11.0 & gravina (rp3440-4) with HP-UX 11.23. I am in the processes of moving my users from diomede to Gravina and found that /home on Gravina is too small. So, I need to increase the size of /home (/dev/vg00/lvol5) which is currently 32768kb in size. Diomede’s /home is 409600kb and is using 39% of that space. I would like to increase gravina’s /home to match the size of /home on diomede.

/root is located on /home so I can’t umount /home and increase its size. No, I don’t have online JFS installed on my server. Yes, I am in the process of purchasing it right now.

Here is my question: Should I wait to get online JFS installed on my server before trying to increase the size of /home or should I move /root off /home so I can umount /home so I can increase its size?

Another online JFS question: Is there going to be a problem with me installing online JFS on my server?

If I should proceed with increasing /home can you give me the steps to do that?

Thanks for the help

Jeff
12 REPLIES 12
Geoff Wild
Honored Contributor
Solution

Re: Change /home size.

Never put root in /home

Put it in /root - so yes - move that one first.

Next, there will be no problem installing OnlineJFS. If you can wait - then wait.

Otherwise, move root, then you will be able to umount /home and extend.

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.
James R. Ferguson
Acclaimed Contributor

Re: Change /home size.

Hi Jeff:

Installation of Online JFS will require a reboot as kernel filesets are added.

If there's no urgency, you could wait until after you install OnlineJFS. Otherwise:

You could move '/home/root' from '/home' if there aren't any processes using it. In fact, I would *not* have root's login directory here. My preference is to keep is available at all times by making '/root' a simple subdirectory of '/'. In this way its readily available in single user mode.

If you want to enlarge '/home' before you install Online JFS:

# umount /home

# lvextend -L newsize_in_MB /dev/vg00/lvolX

(or):

# lvextned -l newsize_in_extents /dev/vg00/lvolX

# extendfs -F vxfs /dev/vg00/rlvolX #...note raw device here

# mount /dev/vg00/lvolX /home

Regards!

...JRF...
Jeffrey F. Goldsmith
Super Advisor

Re: Change /home size.

If it is better to not have /root under /home why does HP put it in /home? When I did a search on moving /root I read several calls saying to put /root under /home to help with security. Is security going to be an issue if I move /root to / ?

OK, now my question is how should I go about moving /root from /home to /? The server is not in production right now so I can reboot it when ever I need to.

Thanks
Pete Randall
Outstanding Contributor

Re: Change /home size.

Jeff,

First off, HP does not put /root under /home. A default installation will have root's home directory being /, which is not very good. Secondly, putting /root under /home will make it unavailable in single user mode when nothing but / is mounted. So - the standard recommendation is to have a /root directory rather than a /home/root directory.


Pete

Pete
Geoff Wild
Honored Contributor

Re: Change /home size.

HP doesn't put root in /home - they put it in in /

Linux puts it in /root - where a lot of people think is a good place.

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.
Chan 007
Honored Contributor

Re: Change /home size.

Jeff,

Best idea is to create a directory for root in "/".

Copy your profiles from /home/root to /root.

Change you passwd file to /root.

logout and login ..!! DON'T do it without a session, better use telnet 0, so that you can get a session upon the existing one or use a new session.

If your login works fine, unmount /home
and carry on what JRF says..!!!

Cheers..
Chan
Jeffrey F. Goldsmith
Super Advisor

Re: Change /home size.

Here is what I have done so far.

cd /
mkdir root
chmod 777 root
cp -R /home/root/* /root/
cp -R /home/root/.* /root/
cp /etc/passwd /etc/passwd.old
vi /etc/passwd
changed this line
from: root:8YavI6wC13CKE:0:3::/home/root:/sbin/sh
to: root:8YavI6wC13CKE:0:3::/root:/sbin/sh

Then I started a new session with reflections and after I logged in I see that I am pointed at /root instead of /home/root.

Is this all that I needed to do? Then I guess that I need to close the other two reflections windows and I would be able to umount /home. Are there any other steps that I am missing?

Thanks.
Chan 007
Honored Contributor

Re: Change /home size.

Jeff,

You got it right.

Once you complete it DON'T change your /root back to /home

Follow JRF's method to extend your file systems.

Also I foung you given 777 permissions to /root change it to 744.

Also if possible give marks to all who provided inputs..:-) including ME

Chan
Jeffrey F. Goldsmith
Super Advisor

Re: Change /home size.

I am now having a problem with increasing the size of /home.

BDF shows: /dev/vg00/lvol5 32768 12104 20520 37% /home

umount /home
lvextend -L 400 /dev/vg00/lvol5

I get this error:

lvextend: "LogicalExtentsNumber" is not bigger than current setting.

I thought that 400MB was bigger than 32768kb. What am I doing wrong?

Thanks.
Patrick Wallek
Honored Contributor

Re: Change /home size.

Do an 'lvdisplay /dev/vg00/lvol5' and see what the current size is. It may be that the LV was extended at some point, but the file system was NOT.

If that is the case, then you just need to extend the file system via fsadm or extendfs.
Jeffrey F. Goldsmith
Super Advisor

Re: Change /home size.

I have figured out what my problem was! I had already done the lvextend two weeks ago when I first tried to extend /home. All I needed to do was extendfs command.

One other note. I purchased this server from HP last year (October) and it came with HP-UX 11.23 already installed. When they did the OS install they (HP) put /root in /home.

I want to thank everyone for their help. I need to assign points now!

Later.
Jeffrey F. Goldsmith
Super Advisor

Re: Change /home size.

Several people responded to my problem and gave me enought information to allow me to make the proper changes to my system.

Thanks again for all the help.