Operating System - HP-UX
1752579 Members
3989 Online
108788 Solutions
New Discussion юеВ

Extending the Root FileSystem(VXFS)?

 
SOLVED
Go to solution
Julio Cesar Perez_1
Occasional Contributor

Extending the Root FileSystem(VXFS)?

I am trying to extend the root "/" filesystem from 140Mb to 500Mb on an HP D230-1way (loaded with 11.00). I have entered the system in Single User Mode and have unmounted all the file sytems. The only one still mounted is the root FS (FS is in use). I used the command:
# lvextend -L 500 /dev/vg00/lvol4

I get the message:

lvextend: Not enough free physical extents available.
Logical Volume "/dev/vg00/lvol4" could not be extended.
Failure possibly caused by contiguous allocation policy.
Failure possibly caused by strict allocation policy.

I have tried using the command LVCHANGE to change the "contiguous and strict" variables, but this message comes up:

Can not change to non-contiguous allocation policy.
Logical Volume "/dev/vg00/lvol4" must be contiguous.

Can anyone help?
11 REPLIES 11
Kofi ARTHIABAH
Honored Contributor
Solution

Re: Extending the Root FileSystem(VXFS)?

In order to extend the root you would:
1. Create an ignite image of your system
2. boot with the ignite image, and select advanced install when prompted, you can then go ahead and create a new / file system of the size you require.

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

and you can follow the thread:
http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0xe4a483667c40d4118feb0090279cd0f9,00.html
nothing wrong with me that a few lines of code cannot fix!
Antoanetta Naghiu
Esteemed Contributor

Re: Extending the Root FileSystem(VXFS)?

Kofi gave you the best solution for extending root.
There are a few others but even more dificult or not supported by HP.
You could not extend / because probably you do not have space contiguous. You can check that with lvdisplay -v /dev/vg00/lvol4 look what is the last PE used. Run the same command in lvol5. Is the first extend just the next one after the last one from lvol4?
See
http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0x05547e990647d4118fee0090279cd0f9,00.html
for a way to make contiguous space for root. TRake care, it is not supported. If you want to play, ensure you have good backups (if possible Ignite tape as well and a recovery strategy in place).
For more in this topic, do a search in the forum for increase root (e.g.
http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0xc1a583667c40d4118feb0090279cd0f9,00.html
http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0x6d5cc5ea0230d411ade80090279cd0f9,00.html and so on.)
Lawrence Mahan
Frequent Advisor

Re: Extending the Root FileSystem(VXFS)?

On systems where I needed to add space to root I cheated by finding a directory under root (or sub directories in non file system directories) and making them into mount points. You have to vary carefull when doing this. It is best to be in single user mode with all other vg00 file systems mounted so that you have your full command set. Make the mount point under another name and move (not copy) all info from one directory to another. Then unmount the new mount point. modify the /etc/fstab and remount. Avoid directories like /bin, /sbin, /etc, or others with unix commands. Directories like /usr, /opt, /tmp, or /var are good canadates if you did not create the system already with this mount points.
Vince Inman
Frequent Advisor

Re: Extending the Root FileSystem(VXFS)?

If you are running 11.00 with LVM then the "/" logical volume should be lvol3 and not lvol4. Is this a basic installation or do we have some special considerations that are not being identified?.

Also, "/" should not need to be extended. The less data that you have in your root filesystem the better. I concur with the individual who suggested to create a new mountpoint for whatever it is you need the space for as this is the tidiest way to manage the filesystem(s).
Bill Hassell
Honored Contributor

Re: Extending the Root FileSystem(VXFS)?

 


Bill Hassell, sysadmin
Bill Hassell
Honored Contributor

Re: Extending the Root FileSystem(VXFS)?

One note to the mounpoint script mentioned previously: ITRC software removes the backslash character so the lines:

MNTPNT=$(/usr/bin/bdf $DIR
| /usr/bin/grep -v ^Filesystem

each have a backslash. Or you can write them out as one long line:

MNTPNT=$(/usr/bin/bdf $DIR | /usr/bin/grep -v ^Filesystem | /usr/bin/awk '{print $NF}')

The reason for the backslashes is to put each of the pipe connections on a separate line for readability.


Bill Hassell, sysadmin
Mark Mitchell
Trusted Contributor

Re: Extending the Root FileSystem(VXFS)?

Something that I did was that I had 2 18 gig drives mirrored for the Root volume. I simply split the mirror, changed one disk and tested it by booting from it and ect. Then I just had to reapply the mirror in the opposite direction.
Insu Kim
Honored Contributor

Re: Extending the Root FileSystem(VXFS)?

Use Ignite software to extend root file system as everyone said.

The reason is that root volume group must be a contiguous logical volume and can't have bad block relocation enabled from lvlnboot(1m).
Never say "no" first.
Stefan Farrelly
Honored Contributor

Re: Extending the Root FileSystem(VXFS)?


There is an awful amount of replies to this question but by far the easiest option is to simply use the pvmove command. All you need is a spare disk you can use as a new boot disk (eg. break vg00 mirror if you have one and use that)
pvcreate -B it, mkboot it, add it to vg00, pvmove lvol1 to it, then lvol2, then lvol3 (/), now extend lvol3 to the desired 500MB, now move the rest of VG00's lvols, and reboot off the new disk. Done.
Im from Palmerston North, New Zealand, but somehow ended up in London...