extend logical volume

 
Marvin Diaz_1
Advisor

extend logical volume

Hi All,

Can anybody give me the exact procedure on how to extend a logical drive using single user-mode. I want to extent the /, var, stand, usr, opt.

thanks,
Marvin
8 REPLIES 8
Rita C Workman
Honored Contributor

Re: extend logical volume

You should not extend /stand or / .... the others you can extend. The reason being these MUST remain in contiguous order on disk. I recommend extend /usr first and then the rest, that way if you want to use some utilities under /usr you can then mount it ...

In single user mode:

lvextend -l xxx /dev/vg00/lvol#
extendfs -F vxfs /dev/vg00/rlvol#

The small 'l' is for extents..if you prefer to use the value in Mb then use the large 'L'.


Once done you can just run
init3 (if three is where you come up to)
and the system will finish coming up...

Rgrds,
Rita
Patrick Wallek
Honored Contributor

Re: extend logical volume

If you absolutely MUST extend all of those (basically your entire VG00 LVOLs), your best bet is to use Ignite/UX.

Download and install Ignite/UX:
http://www.software.hp.com/producs/IUX/

Once that is done, create a make_tape_recovery tape (or 2 to be on the safe side):

# /opt/ignite/bin/make_tape_recovery -I -a /dev/rmt/?mn -v -m tar -x inc_entire=vg00

Once you have created the tapes, reboot the system, interrupt the boot sequence, and boot from the tape. With the '-I' option included, you will automatically come up to a menu and you can then go through the Ignite/UX interface and resize your VG00 logical volumes as you desire.

If you have other logical volumes on your system, they should be imported automatically after Ignite finishes reloading your system.

Note that you will need a few hours to do this as this is basically reinstalling your system from scratch. Also if you have your boot drive mirrored, you will have to manually redo the mirroring when you are finished.
Rajeev  Shukla
Honored Contributor

Re: extend logical volume

Hi Marvin,

/var, /usr etc can be extended easily in single user mode, but the difficulty lies in /stand, / and swap, because they need to be contiguous. To do that you'll have to move stuff to other area on the disk and then back.
So the easiest way i suggest is to take a complete backup of VG00 using fbackup and take a Ignite Backup (entire VG00).
Then boot the system through the ignite tape and change the layout (you can change the LVOL Sizes there) and then restore the ignite backup.
That will safely extend your filesystem.
Ravi_8
Honored Contributor

Re: extend logical volume

Hi, Marvin

/ and /stand can't be increased as they are contiguous.

You need to have ignite and a tape drive installed.

#make_tape_recovery -A /dev/rmt/0m -I -v -x inc_entire=vg00 which will back up vg00.

then use the tape to boot the machine and choose advanced installation, which will allow you to increase any file systems
never give up
Sunil Sharma_1
Honored Contributor

Re: extend logical volume

Hi,

1.You can not extend any logical drive using single user command in HP logical Volume manager. If you are using Veritas Volume Manager you can do it with single command (vxresize).
2. As other says you can not extend stand and root FS. you have to use ignite to do it.

Sunil

*** Dream as if you'll live forever. Live as if you'll die today ***
Jakes Louw
Trusted Contributor

Re: extend logical volume

In one of the older HP-UX 9.x manuals, there was a process to use your root mirror disks to resize your root filesystems.
The process was basically similar to using your root mirror disks to do an upgrade.

- backup root filesystems
- split mirrors
- destroy old mirror disks
- rebuild to new sizes (don't forget mkboot, lvlnboot, etc) using similar filesystem names (eg: lvol1m)
- mount onto new mountpoints (/optnew, /varnew)
- restore required filesystems into new filesystems
- boot from old mirror disks to test

Don't forget that your fstab will need to be different on the new root disk.
Trying is the first step to failure - Homer Simpson
Fabio Ettore
Honored Contributor

Re: extend logical volume

Hi,

VIKBRC00010528 - Sys Adm: Using Ignite-UX to extend /stand or / filesystem?

It is about /stand and / filesystems.

For /usr, /opt and /var, in single user mode

# lvextend -L /dev/vg00/lvolx
# extendfs /dev/vg00/lvolx

I hope this helps you.

Best regards,
Ettore
WISH? IMPROVEMENT!
Fabio Ettore
Honored Contributor

Re: extend logical volume

sorry...
extendfs needs raw device file:

# extendfs /dev/vg00/rlvolx

Best regards,
Ettore
WISH? IMPROVEMENT!