Operating System - HP-UX
1752815 Members
5891 Online
108789 Solutions
New Discussion юеВ

Extending Volume group + increase /usr

 

Extending Volume group + increase /usr

Hello,

I've read many articles on extending volume groups from this list. I'd just like some reassurance. Here is what I have:
# bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 204800 32947 161118 17% /
/dev/vg00/lvol1 299157 39536 229705 15% /stand
/dev/vg00/lvol8 2609152 1281922 1248108 51% /var
/dev/vg00/lvol7 1007616 846609 150994 85% /usr
/dev/vg00/ud52 11960320 671932 10935672 6% /usr/ud52
/dev/vg00/lvol4 204800 120183 79844 60% /tmp
/dev/vg01/lvol1 36843520 5401784 31198000 15% /roi
/dev/vg00/lvol6 376832 256001 113557 69% /opt
/dev/vg00/lvol5 20480 2628 16979 13% /home
/dev/dsk/c3t2d0 80920 80920 0 100% /SD_CDROM

-----------------------------
I'd like to make /usr/ud52 1 gig in size and move the remaining disk space to /usr (For an IBM Redback installation)

Also,

We do not have online journal fs installed so there is no way I can do this remotely ?

Thank you.


# vgdisplay
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 9
Open LV 9
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4350
VGDA 4
PE Size (Mbytes) 4
Total PE 4589
Alloc PE 4587
Free PE 2
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 1
Open LV 1
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 9000
VGDA 2
PE Size (Mbytes) 4
Total PE 8998
Alloc PE 8995
Free PE 3
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0


10 REPLIES 10
Pete Randall
Outstanding Contributor

Re: Extending Volume group + increase /usr

Matthew,

Without Online JFS, you'll need to do this in single user mode because you need to be able to unmount the file systems. Shrinking /usr/ud52 should be relatively straight forward - you're basically going to have to redefine it at the size you want and restore the contents. The process for /usr would be similar but it would probably be easier to accomplish it with an Ignite make_tape_recovery restore and rebuild of vg00. You can obtain Ignite here:
http://www.software.hp.com/products/IUX/index.html


Pete

Pete
Tim Sanko
Trusted Contributor

Re: Extending Volume group + increase /usr

Can you telnet to this server's console?

If you make an ignite server, you can do this remotely if you have webconsoles configured, or a KVM with network interface.

What do you have?

Tim
G. Vrijhoeven
Honored Contributor

Re: Extending Volume group + increase /usr

Hi,

You best and quickest bet is to make an ignite tape ( entire vg00 ) and restore it.

Boot from the tape and go to advanced installation and go to the lvm tab and adjust the sizes to the size you like.

HTH,

Gideon
doug mielke
Respected Contributor

Re: Extending Volume group + increase /usr

A stunt that may help is to edit /etc/fstab and comment out the /usr entry.

Then shutdown -r to reboot the system.

all /usr functions will be missing. (telnet, lvextend)

However, if you were to copy the relevent files ( everything in /usr) to another volume, then make a link from /usr directory to it (/sbin/ln) then maybe things like lvextend would work.

I've never tried this, but it might be fun to try. And if it keeps you off of a plane, it might be worth the effort.
Todd McDaniel_1
Honored Contributor

Re: Extending Volume group + increase /usr

It is best to run a defrag on ud52 to reorg the data and free up extents on the end of the extent list to be used for the addition to /usr...

Then lvreduce and lvextend your 2 LVs and extendfs on /usr to activate the new space...

Unfortunately you will have to go to single to do the LVM work...
Unix, the other white meat.
doug mielke
Respected Contributor

Re: Extending Volume group + increase /usr

...while I have links on my mind, why don't you put your ibm installation where ever you have room, and link it to /usr

Re: Extending Volume group + increase /usr


I also have a call into the vendor now regarding the symlink. That was my first thought. Anyways, thanks for all of the quick responses guys. I just try to avoid this sort of thing if at all possible.
Sridhar Bhaskarla
Honored Contributor

Re: Extending Volume group + increase /usr

Hi Mathew,

Looking at your configuration, you have enough space in /var to temporarily store /usr/ud52. Bring down your application. Create a directory under /var/ud52. Copy the contents from /usr/ud52 to /var/ud52. Make sure everything got copied. Once it is done, umount /usr/ud52 and lvremove it. Reboot (not shutdown) the box into single user mode and extend /usr using lvextend and extendfs (using the commands from /sbin). Mount /usr and make sure it is of correct size. Bring the system into multi user mode. Create ud52 logical volume with a lower size and mount it back. Copy the contents back from /var/ud52 and start the application. If your application starts automatically at boottime, you can do the creation of the filesystem and copying in the single user mode itself.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Suresh Patoria
Super Advisor

Re: Extending Volume group + increase /usr

Hi,

To do all the activity you can do via remote console

Do the following procedure

1)Take the backup of /usr/ud52

Note:While reducing your logical volume u will loose the data of your logical volume. So, make
at least two backup copy

2)umount the /usr/ud52
#umount /usr/ud52

3)Reduce the logical volume
lvreduce -L 1024 /dev/vg00/ud52

4)create the file system
#newfs -F vxfs /dev/vg00/rud52

5)mount the logical volume
#mount -F vxfs /dev/vg00/ud52 /usr/ud52

6)Restore your data
usig tar or fbackup

check everything working fine or not

Now you extend the /usr file system

1)restart the server in single user mode

Interrupt and boot pri , say N IPL to boot

To start in single mode use the

hpux -is

1) check the /usr file system mounted or not
If it is mounted then pls umount
#umount /usr
If it not then fine

2)type the following command
-->unset HISTFILE

3)type the following command
-->exec sh
NOTE:now you will able to use the command after umouning /usr

4)extend the file system
#lvextend -L <> /dev/vg00/lvol7
say if you to increase 1Gb then

#lvextend -L 2048 /dev/vg00/lvol7

#extendfs /dev/vg00/rlvol7

5)mount the file system

mount -F vxfs /dev/vg00/lvol7 /usr

check the file system

6)restart the server

Thanx