1833018 Members
1968 Online
110048 Solutions
New Discussion

Re: How to extend /

 
Amit  Jadhav
Occasional Contributor

How to extend /

Hi,

I am working on HP-UX 10.20;
I want to extend my / file system which is "hfs".
How to go about it?

Thanx for help in advance.

Amit.
14 REPLIES 14
Venu_2
Regular Advisor

Re: How to extend /

Hi,

Say data is the filesystem to be extended

1. umount /data
2. lvextend -L XXX /dev/vg00/rdata

XXX - Total capacity of filesystem to be achieved in MB

3. extendfs /dev/vg00/rdata
4. mount /dev/vg00/data /data

hope this helps you

regards

venu
Ruediger Noack
Valued Contributor

Re: How to extend /

Hi,

to extend your /-Filesystem I think you have to use Ignite-UX
1. create a install tape
make_recovery -A
2. boot from this tape
3. break the automatic install procedure and
go to interactive mode
4. in interactive mode modify your VG/FS
layout

Good luck
Ruediger
Rick Garland
Honored Contributor

Re: How to extend /

Short of doing a reinstall, you will need to use ignite.

With hfs as filesystems, not much choice but to umount the filesystems to run extendfs. But you can't umount the / filesystem. Check out ignite - it is on the Apps CD and does not require a codeword.

Rachel Schumacher
New Member

Re: How to extend /

Hi

I posted the same question. Pls receive the Brian's and Rick's reply:


Brian M. Fisher June 14, 2000 17:37 PM GMT [ unassigned ]

--------------------------------------------------------------------------------
The easiest way to make any changes to the root volume group is with Ignite's make_recovery
1) make_recovery -A
2) boot from recovery tape
3) interupt boot sequence & change volume group parameters
4) Let ignite finish & reboot.

See HP document#A5779615
http://us-support2.external.hp.com/cki/bin/doc.pl/

Brian
<*(((>< er
Rick Garland June 14, 2000 17:40 PM GMT [ unassigned ]

--------------------------------------------------------------------------------
Use ignite

Can be obtained from the Apps CD without a codeword or from the following URL:
http://www.software.hp.com/products/IUX/index.html

When you are talking the root disk, certain filesystems can be extended but the root filesystem needs to be contigious and it makes it tough to extend. Short of reinstalling, this would be the best solution.
system admin tasks
Dan_4
Advisor

Re: How to extend /

Just a quick comment. The above posters are correct in recommending Ignite for extending /. This is the only HP supported and recommended way to increase any of "/", "/stand", or primary swap/dump.

Make sure you have the latest version of Ignite. The older versions did not keep all your setting sif you used the interactive install option like you have to. There is probably documentation about this procedure on the Ignite web page listed above.
Alan Riggs
Honored Contributor

Re: How to extend /

An alternative method, if you do not want the extended downtime required by the Ignite procedure, requires a second disk. If you have a mirrored root, simply reduce the mirror.

1 Make the disk bootable (pvcreate -B)
2 Create logical volumes and filesystems of desred size.
3 use lvlnboot commands ot designate new swap, dump, boot and root lvols on teh new disk
3 mount new filesystems under a mountpoint (ex: /newroot /newroot/var . . .)
4 copy data to new filesystems. (ex find / -xdev -depth | cpio -pdumx /newroot)
5 reboot off of new disk

note: this will have the side effect of renaming your root VG. If this is a problem for you, then you will need to remove and rebuild your vg00 lvols and copy data back again. Ignite is easier. But if you cannot afford the downtime for a tape/networl re-installation, then this will do the job as well.
Emmanuel Eyer
Frequent Advisor

Re: How to extend /

Sorry, but Alan's post has a BIG side effect.

I also though this would be fine. I did it. I then spent a couple of hours to get all the way back... Sigh.

The problem is /stand/rootconf. It is a binary file containing the absolute address of the root filesystem. If you move the root filesystem, /stand/rootconf gets wrong. This makes your system unbootable in LVM maintenance mode. Just too bad to be afforded, eh?

If anybody know how to hack rootconf, let me know!!!!

Hope it helps. Emmanuel
Antoanetta Naghiu
Esteemed Contributor

Re: How to extend /

You can extend / file system even HP does not support it.
As it already told, you need to boot in lvm maintenance mode, and you need to have / contiguous.
So, check with lvdisplay lvol3 and lvol4. If the first physical extend of lvol4 is just the next one after the last one from lvol3 (e.g. last PE in lvol3 is 0599 and the first in lvol4 is 0600) that means you need to free up contiguous space.
Usually, lvol4 is /home, so you have to create a new fs for /home, move the stuff from /home in the new file system, create a new mount point in the /etc/fstab and destroy the old lvol4.
Make a copy of /etc/fstab (e.g. cp /etc/fstab /etc/fstab.good), vi /etc/fstab and delete the line that contains the mount point for /.
Boot in maintenance mode, lvextend lvol3, extendfs.
Have ready a few superblock numbers (pickup a few prior to start from /etc/sbtab) just in case you need to run fsck -b superblock number.
After you check with fsck that your fs is ok, remove the current copy of /etc/fstab and rename the fstab.good to fstab. To do that you may need to boot from the support cdrom, load rm and mv command to be able to get your correct copy of fstab in place.
If you are using mirroring, of course, first you have to split the mirror.
It is working!
Good luck!!!
Antoanetta Naghiu
Esteemed Contributor

Re: How to extend /

You can extend / file system even HP does not support it.
As it already told, you need to boot in lvm maintenance mode, and you need to have / contiguous.
So, check with lvdisplay lvol3 and lvol4. If the first physical extend of lvol4 is just the next one after the last one from lvol3 (e.g. last PE in lvol3 is 0599 and the first in lvol4 is 0600) that means you need to free up contiguous space.
Usually, lvol4 is /home, so you have to create a new fs for /home, move the stuff from /home in the new file system, create a new mount point in the /etc/fstab and destroy the old lvol4.
Make a copy of /etc/fstab (e.g. cp /etc/fstab /etc/fstab.good), vi /etc/fstab and delete the line that contains the mount point for /.
Boot in maintenance mode, lvextend lvol3, extendfs.
Have ready a few superblock numbers (pickup a few prior to start from /etc/sbtab) just in case you need to run fsck -b superblock number.
After you check with fsck that your fs is ok, remove the current copy of /etc/fstab and rename the fstab.good to fstab. To do that you may need to boot from the support cdrom, load rm and mv command to be able to get your correct copy of fstab in place.
If you are using mirroring, of course, first you have to split the mirror.
It is working!
Good luck!!!
John Palmer
Honored Contributor

Re: How to extend /

For Emmanuel,

Document Id KBAN00000228 gives details on fixing /stand/rootconf (lvlnboot -c). man lvlnboot indicates that this is run during a non LVM maintenance boot by ioinitrc anyway.
So having created you new boot disk (takes under an hour) and done a normal boot, /stand/rootconf should be ok. I have used this technique on numerous occasions without any problem and also use it for disaster recovery.

Hope this helps.
John
Alan Riggs
Honored Contributor

Re: How to extend /

Emmanuel,
John is correct. Simply rebooting the system off of your new root drive will establish /stand/rootconf correctly. The lvlnboot -c option also works.
I have rebuilt many root drives with this procedure and have never had a problem. It is always necessary to boot off of a rebuilt root VG in order to test, of course.
Jason Luginbuhl
Frequent Advisor

Re: How to extend /

Just to throw something out there:
Has anyone ever tried something like the following:

1) add an additional disk to vg00
2) then use pvmove to move the extents of lvol4 off the root disk to this additional disk.
3) lvextend lvol3--this should grab the contiguous extents that lvol4 vacated.
4) Use fsadm -b to extend the / filesytem. Of course, this step requires that / be vxfs and that you have OnlineJFS.
5) pvmove the lvol4 extents back onto the root disk (assuming there is room at the end of the disk)
6) vgremove the other disk

In theory, I'm thinking this might could work as it would seem to eliminate both the problem of not being able to unmount / and that / must be contiguous; however, the method is dependent on / being vxfs and having the OnlineJFS product.
"Unfortunately you can't out-program stupidity"
Dave Wherry
Esteemed Contributor

Re: How to extend /

It sounds like Jason's approach may have some potential. One other thing though, HP has recommended that you do an fsck after any pvmove activity. So add that in.

Still, for my money my preference is the make_recovery method. I've done it in about 3 hours on K2xx systems where the logical volumes in vg00 are all about 10-20% larger than the defaults. I always give a little extra room. A couple of things I like about this method is you also have the chance to resize any of your logical volumes. There's usually more than one that is tight on space. Secondly, you have a full backup of vg00 in case anything goes wrong. Before any of the other methods I would do a full backup any way. Just do it in one stroke.
Rita C Workman
Honored Contributor

Re: How to extend /

If your question is How to I extend the root file syste '/'....well the answer is don't. ! ! ! !
The root ( / ) must be contiguous. So unless you want to move everything elsewhere and then extend / and be certain that it is absolutely, positively on contiguous space on your disk...
The best way to extend / is to do it at the initial ignite. Quicker than the move and shuffle approach above would be to back it all up and re-ignite the box to the new size you want and then put it all back...
At least that's my understanding, for what it's worth ! You may want to check this out for yourself. !