1830355 Members
2246 Online
110001 Solutions
New Discussion

lvextend

 
SOLVED
Go to solution
bossuyt_2
Occasional Advisor

lvextend

I want to extend File System /tmp or /usr or / var or / ( created with HP-UX 10.20 in LVM )
For instance /tmp is under /dev/vg00/lvol1)
These FS are always mounted
I try under ISL but the same problem.
I try with a CD boot but no command vgextend to do .

Is it possible to increase these FS ! !

Thanks . .
9 REPLIES 9
Christopher McCray_1
Honored Contributor

Re: lvextend

for /tmp you need to be sure that no one or no applications are accessing this file system before extending it, but can b done in multi-user mode. The others have to be done from single-user mode.

Chris
It wasn't me!!!!
linuxfan
Honored Contributor

Re: lvextend

Hi,

If you have online-JFS you could do it multi-user mode relatively easy.

Even otherwise, since you can shutdown the machine the easiest way would be to take it to single user mode.

At the ISL prompt, boot into single user mode
ISL>hpux -is

Once you are in single user mode,
lvextend -L /dev/vg00/lvol_for_var
extendfs -F vxfs /dev/vg00/rlvol_for_var

Do the same for /tmp and /usr as well.
You cannot increase the size of /. The easiest way would be to create a make_recovery tape and then reinstall the OS but interrupt the install and redefine your file system sizes.

-HTH
Ramesh
They think they know but don't. At least I know I don't know - Socrates
James R. Ferguson
Acclaimed Contributor

Re: lvextend

Hi:

Yes, it is indeed possible to 'lvextend' these filesystems. In the absence of Online JFS, the easiest way is to boot-up into single user mode and use /sbin/lvextend (which is intended for this situation).

Regards!

...JRF...
Sanjay_6
Honored Contributor

Re: lvextend

Hi,

This is if you don't have online JFS as already pointed out to you earliar.

Like Ramesh have already told, you interrupt the boot preocess, do "bo pri" to boot thru the primary path, Select "Y" to interact with IPL and boot hpux into single user mode at the IPL prompt like Ramesh said.

IPL>hpux -is

This will boot the system in single user mode. use lvextend and extendfs for the filesystems you want to extend but do note that the executable is in /usr/sbin which might not be available to you in single user mode. Only "/" and "/stand" gets mounted, so you may have to mount /usr to extend the filesystems. Mount the /usr filesystem using the lvol for /usr
mount -F vxfs /dev/vg00/lvol_for_usr /usr

After that you can do lvextend and extendfs for the filesystem like /tmp, /var..etc.

To increase the size of "/" filesystem, take a ignite backup using make_recovery and with the interactive option, reinstall the OS and resize the "/" filesystem. No other choice over here.

Thanks
Lee Tae-kyung
Regular Advisor
Solution

Re: lvextend

 
I think I am a specialist in IT Korea^^. I am a programmer and SE and DBA
Ravi_8
Honored Contributor

Re: lvextend

Hi, Bossuyt
don't try to increase / filesystem, others can be increased, getinto single user mode as told by ramesh upadyayula when you get the #prompt
#mount -a
note down the corresponding /dev/vgxx/lvolx for tmp/usr/var.
#umount tmp/usr/var
#lvextend -L aaa /dev/vgxx/lvolx
#extend -F vxfs/hfs /dev/vgxx/rlvolx


#mount /dev/vgxx/lvolx /tmp/usr/var
repeat for the filesystems you wanted to increase.
never give up
Santosh Nair_1
Honored Contributor

Re: lvextend

Just a followup on Ravi's posting...

Instead of mounting everything and umount it, you can just look through /etc/fstab. Unfortunately, you'll have resort to cat because vi, more and grep are in /usr which is not mounted in single user mode.
Once you've determined the LVs for /tmp, /usr and /var, extend the LV using the lvextend command:

lvextend -L nnn /dev/vgxx/lvxx

where nnn is the new size, vgxx and lvxx are the VG and LV for that is being extended.

Next, extend the filesystem using the extendfs command:

extendfs -F vxfs /dev/vgxx/lvxx

(if the filesystem is hfs, then change the vxfs to hfs in the command above).

Mount the filesystems. Make sure the filesystems have been increases as you instructed and then boot into multiuser mode using the init command:

init 3

Hope this helps.

-Santosh
Life is what's happening while you're busy making other plans
Ravi_8
Honored Contributor

Re: lvextend

Hi,santhosh
why i do mount -a is, after mounting all if we use bdf we can get an idea by how much MB increase will suffice. where by cat fstab you don't get it.
never give up
Wodisch
Honored Contributor

Re: lvextend

Hello Bossuyt,

the "pvmove" actually mirrors the lvol to be moved to the
other disk and reduces it from the old one.
Hence, if you can add another disk to your volume group
vg00 (temporarily, at least) or if you already have an
empty one in there, you could try to get by without
re-installation (i.e. make_tape_recovery) by pvmoving
the lvols "behind" lvol3 (that's your root-fs, isn't it?)
to the other disk. Then you have free space following
the root-fs's lvol. Now you boot from the Core OS/Install
CDROM, get a shell, and try the "extendfs" for that lvol
on the boot disk.
Reboot single-user, and "pvmove" the other lvols back
to your boot disk, hence allocating them "after" your
now extended root-fs-lvol.

THIS IS DANGEROUS, so build a "make_tape_recovery"
tape before!!!

HTH,
Wodisch