Operating System - HP-UX
1833752 Members
2512 Online
110063 Solutions
New Discussion

move opt lv back into vg00?

 
Brian Street_1
Advisor

move opt lv back into vg00?

Hello everyone,

Has anyone ever moved the opt lv back into vg00 and onto the root disk after it has being a separate lv?

I'm wondering what kind of gotchas I might run into and whether or not I should just re-install instead.

I have a lot of 3rd party (open source, gnu, etc.) tools that I've installed on /opt and I want to move them to another filesystem and put opt back onto the root disk and into vg00.

Of course, this requires me reducing the size of /usr and /var to make room for /opt.

Thanks for any input,
Brian.
6 REPLIES 6
Martin Johnson
Honored Contributor

Re: move opt lv back into vg00?

Using ignite would probably be the easiest way to do it. After you have moved everything into the directories you want them, do an ignite backup. Do an ignite recover, but interrupt the recovery to resize /usr, /var and /opt to what you want them to be, then continue the recover.

HTH
Marty
James R. Ferguson
Acclaimed Contributor

Re: move opt lv back into vg00?

Hi Brian:

If you have to shrink '/usr' and '/var' to make room for '/opt', I *wouldn't* unless they are grossly oversized.

If you want a "standard" vg00 then buy a larger physical disk; make an Ignite recovery tape; and cold-install to the new, larger disk.

Another approach is to create a small '/opt' in vg00 and move "back" the non-third-party material to it. For the third-party applications that consume the space you don't have, create a separate logical volume and filesystem on a non-vg00 volume group and symbolically link those third-pary directories in '/opt' to it.

Regards!

...JRF...



Brian Street_1
Advisor

Re: move opt lv back into vg00?

James,

I initially installed everything onto the root disk but then it was decided that all of the 3rd party tools should also reside in opt which meant it was going to get quite a bit larger - so I moved it out of vg00 and onto a separate disk.

The /var and /usr are pretty large (each a bit over 6G and neither at 40% capacity) and so to go back to the default sizes of 4G each is/should be plenty large.

Brian.
Brian Street_1
Advisor

Re: move opt lv back into vg00?

Martin,

Your solution certainly seems like an easy way to do what I want.

Is your idea of using ignite the same thing as a make_recovery tape?

Brian.
John Dvorchak
Honored Contributor

Re: move opt lv back into vg00?

James the biggest problem that I see is in reducing /usr and /var. The only way I know of safely doing this is to cpio the data somewhere else and from single user mode reduce the lv's and then restore all of the data from the scrath/holding area.

By far the easiest way is to make and Ignite tape or two and boot from the Ignite tape in an advanced session and reset your filesystems sizes.

Good luck
If it has wheels or a skirt, you can't afford it.
James R. Ferguson
Acclaimed Contributor

Re: move opt lv back into vg00?

Hi (again) Brian:

Given your last post, I agree that a redraft of the vg00 logical volume sizes is in order. Since shrinking a filesystem invariably means backing up its data; 'lvreduce'ing the filesystem (or 'lvremove'ing it and 'lvcreate'ing it again); followed by a 'newfs' and a data reload (!), I'd certainly opt (no pun instended!) to use an Ignite recovery tape to cold-install. Choose the advanced installation mode and you will be able to resize your vg00 logical volumes to your specifications.

Regards!

...JRF...