1753964 Members
7434 Online
108811 Solutions
New Discussion юеВ

increasing / (root)

 
daniel smith_3
Frequent Advisor

increasing / (root)

I want to try and increase the size of /(root) without totally reinstalling my system. The system is a K580 test system running 11.0 and can be blown up if I mess things up. Can someone point me to some manuals or give me some basics pointers. I read something about using ignite-ux to make_recovery and doing a complete reinstall using recovery tape. does this work?
thanks!
8 REPLIES 8
Pete Randall
Outstanding Contributor

Re: increasing / (root)

Daniel,

The issue is that /, /stand and swap have to be contiguous. The only way to expand is to free up some space immediately behind those three areas or to decrease one of them.

The much easier approach is to make an Ignite backup using make_tape_recovery and use that to re-build your system, expanding the logical volumes you desire in the process. Ignite is available here:

http://www.software.hp.com/products/IUX/index.html


Pete

Pete
Sridhar Bhaskarla
Honored Contributor

Re: increasing / (root)

Hi,

Yes. It works. The command is make_tape_recoery. You can download ignite/ux from this location

http://www.software.hp.com/products/IUX/download.html

All you have to do is to create a make_tape_recovery tape and restore the system. After booting from the tape, it will bring up install screen and you can interact with it and change the filesystems you want.

I suggest you this procedure.


1. If your boot disks are mirrored, reduce the mirrors on the alternate disk and take it out of vg00.

2. Create the tape using the following command

make_tape_recovery -v -x inc_entire=vg00 -i -a /dev/rmt/0mn


3. Put the make_tape_recovery tape in and boot the system through it. It should bring up install window. Change the filesystems sizes. Select the the path of the alternate disk in the window as the boot disk. This way if something happens, you can alwasy boot from the other disk as it is untouched.

The otherway, you could try booting the system in LVM maintenance mode, move the LV next to root lv to the mirror disk after reducing it's mirror, extend the root filesystem and move the LV back. But using make_tape_recovery process is easy to use and is safe.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Steven E. Protter
Exalted Contributor

Re: increasing / (root)

As usual, Shridar's instructions are excellent.

I would only add that if you wish to use an existing vg00 tape or a tape not made with the -i option, you will see, at the console a prompt just after the kernel loads to hit a key to go into interactive mode.

That works quite well.

If this happens to be a production server, I recommend a trial run or two on a sandbox. There are some tricks if you are mirrored or spreading a volume across the two root disks.

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
daniel smith_3
Frequent Advisor

Re: increasing / (root)

thanks all for you replies! I will let you know how it turns out!
Bharat Katkar
Honored Contributor

Re: increasing / (root)

Hi Daneil,
What i would do:

1. Install Ignite UX
2. Use make_tape recovery
# make_recovery -ACv -d
Creates backup of VG00 on tape.
3. Reboot the system with this recovery tape.
4. Alter File System size as required and continue with restore.
Simple as that.
Regards,
You need to know a lot to actually know how little you know
Bill Hassell
Honored Contributor

Re: increasing / (root)

Actually, I would rethink your plan to increase /. Unless your / lvol is only 50-75 megs, you have plenty of space. A typical 11.0 root filesystem needs about 40-50 megs. If you need a lot more space, then you (or bad applications) have stored things in the wrong place. There are only 3 directories in / that are needed by HP-UX:

/sbin
/etc
/dev

That's it. Here are some typical sizes:

du -ks /sbin /etc /dev
23210 /sbin
8605 /etc
18 /dev

Is /dev enormous? Someone stored a file there--never store anything in /dev. The only things in /dev are devicefiles and directories. Find the culprits like this:

find /dev -type f

/etc might be very large so analyze where the space is used:

du -kx /etc | sort -rn | head -20

Look inside the biggest directories to see if something does not belong there. Same with /sbin. Nothing goes in /sbin except commands and start/stop scripts.

Is your / directory full of files? Worse: is / the $HOME for root? Find all the files and move them. A good location is /root. Now that assumes that someone with root privileges has not stored some important file in /. In a production machine, moving unknown files can result in annoying problems so be aware of the files you are moving. /root will still be part of / but at least the root 'droppings' will be in a single location and the root users will be less likely blow everything away accidently because root's HOME is /. Once all the files are moved (don't forget the . (dot) files), use vipw to edit /etc/passwd and change root's HOME to /root.

What you have left should be some 'lost' directories that occupy /. Applications always go into /opt or /usr/local and /usr/contrib, and data files should never be stored in /. You can move these files to a more appropriate place and create a symbolic link (ln -s) in case the applications are too dumb to be configurable.

Massively large databse systems with terabytes of storage need just 40-50 megs in /. There is no simple way to extend /. You must either take the system offline and perform some complex single user mode commands or create an Ignite/UX tape, save your current VG00 and then restore it (essentially a re-install). If you have mirroring, you will still need to do some additional configs. If you've never dome this before (and the system is critical), I would cleanup / rather than trying to extend it.


Bill Hassell, sysadmin
Shaikh Imran
Honored Contributor

Re: increasing / (root)

Hi,
Dear Daniel smith,

If you go the answer please assign points.

You have assigned approx 50 % points to
all your questions.
This is from your profile.
[ I have assigned points to 34 of 66 responses to my questions. ]

P.S.
No points here please.

Thanks & Regards,




I'll sleep when i am dead.
Geoff Wild
Honored Contributor

Re: increasing / (root)

Best to use ignite to do this:

http://docs.hp.com/hpux/onlinedocs/B2355-90837/B2355-90837.html

Basically, create a make_tape_recovery, then boot that tape - then interactivly, change the size of the / partition.

See the section "System Recovery " in above doc.

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.