Operating System - HP-UX
1828851 Members
2354 Online
109985 Solutions
New Discussion

extending root - some thoughts

 
SOLVED
Go to solution
Tim Malnati
Honored Contributor

extending root - some thoughts

I'm fully aware of the motherhood stating that you can't extend the root file system where it is required to be contiguous. But what about these two scenarios:

/dev/vg00/lvol3 is usually root and /dev/vg00/lvol4 is usually /home. Moving /home to another area is no big deal. Now the first question; if the contiguous extents are available adjacent to the root file system (on the upper end), why can't root be extended with Online JFS in this situation? Obviously you can't unmount root, but why can't Online JFS get the job done (or can it)?

The other scenario... Plenty of contiguous room exists in /dev/vg00 and a new contiguous file system is created and mounted with a new name. All data is copied to this new file system, devices are created, mountpoint directories added and appropriate changes are made to the new fstab, lvlnboot, etc. If you reboot will you come up under the new file system? If there is a kernel transfer issue, can you build a new one pointing to this new logical volume?

OK, all of this may be a bit theoretical, but I guess 'inquiring minds want to know'. If I had exclusive use of a test box, I would probably try it some time, but that's not in the cards at the moment. So... any thoughts?
5 REPLIES 5
Alan Riggs
Honored Contributor

Re: extending root - some thoughts

Both of those scenarios should be successful. If you move extents to clear space after the root volume, then you can extend the lvol contiguously. If you have online JFS, then you can extend the filesystem without dropping to lvm maintenance mode or a recovery shell.

There is no issue with kernel transfer in creating a new / lvol/filesystem. The kernel filesystem is /stand.
John Palmer
Honored Contributor
Solution

Re: extending root - some thoughts

Tim,

In theory I see no problems with your first scenario (other than that /home is usually small and I don't have Online JFS).

The second scenario also sounds feasible except for a nagging doubt about how far down the disk that the root volume can be.

The solution that I adopt though is simply to create a new root volume group on a spare disk (maybe by freeing up the root mirror), setting up the boot information, creating a new set of root volumes (opportunities here for changing filesystem type and resizing) and then copying all volumes using cpio.

This can all normally be achieved as well as a reboot from the new disk in under an hour and is the reason that I never personally bother with Ignite.

The technique can also be used for disaster recovery:-

Install HP-UX purely in order to recover your system from backup.

Use the 'create new root disk' technique above ( I keep scripts for this in my root volume) but instead of copying the vanilla HP-UX, restore the root volumes from backup tape ( I use dump/vxdump).

Boot the recovered system which has all software/patches installed and needs very little reconfiguration.

Regards,
John
James R. Ferguson
Acclaimed Contributor

Re: extending root - some thoughts

Hi Tim!

That's a very creative idea! I wonder too if it would work. It sure seems straightforward and logical enough. I don't have a platform to try this on at the moment either. I hope someone does; tries; and posts the results. I'm going to put this on my "play" list in the meantime.

On five of my seven servers (all currently 10.20) I have /home as lvol4 as you would expect. I personally cold-installed these for various reasons. On the remaining two servers, one has /tmp as lvol4; the other has /opt as lvol4. I don't think either of these cases would be a show-stopper either.

Warm regards to all!

...JRF...
Tim Malnati
Honored Contributor

Re: extending root - some thoughts

I was sort of hoping that someone had actually tried to do this, but for now it seems that there is a good possibility that they may work. The thread has been around long enough that some of the others in the forum would have probably responded if something negative was known.

Alan, I know that the kernel is contained in /stand. I was wondering if the root file system vg/lvol location was compiled into the kernel at some point (maybe a potential show stopper?).

John, I was wondering about the physical lvol location as well. But then I also thought that the HPUX boot loader is totally different than what is used under MS systems and may not have the same location limitations. Your method of creating a new root volume has some interesting possibilities in some situations. Could you reply and attach a copy of your scripts?

I'm not the type of individual that likes to entertain limitations when dealing with computer system administration. I'm not a real fan of coming in at midnight on a weekend either. Management is also very touchy these days when dealing with availability issues. The root file system size situation is just another impact. After thinking about this further, I believe that HP could potentially allow us to get this accomplished online with a little bit of added functionality to the Mirrordisk product. I also believe adding functionality has more to do with selling an OS than HP realizes, particularly if online availability is improved in any way.
John Palmer
Honored Contributor

Re: extending root - some thoughts

Tim,

Example scripts for creating a new bootable disk attached.

Regards,
John