Operating System - HP-UX
1850528 Members
2819 Online
104054 Solutions
New Discussion

Re: extend logical volume

 
G.Anand
New Member

extend logical volume

Hi,

I am new to hp unix. I need to extend /opt file system to 1600 MB now in 800 MB. let me know i can extend lv through SAM without single user mode.
10 REPLIES 10
Pete Randall
Outstanding Contributor

Re: extend logical volume

The issue you're going to face is that /opt needs to be unmounted in order to extend it. Unmounting such a busy file system is nearly impossible. That's why the easiest way is to go to single user mode.


Pete

Pete
Bharat Katkar
Honored Contributor

Re: extend logical volume

Hi,
Have a look at the link below. That will guide you properly.

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=51908

Regards,
You need to know a lot to actually know how little you know
G.Anand
New Member

Re: extend logical volume

hi,

then my option is boot through single user mode then lvextend, umount the file system and extendvs. is it correct?

Pete Randall
Outstanding Contributor

Re: extend logical volume

That's right - in single user mode, run lvextend, then unmount and run extendfs. There's an example in the lvextend man page.


Pete

Pete
Thayanidhi
Honored Contributor

Re: extend logical volume

If you have Online JFS, and /opt is vxfs, then yes.

Post your swlist,bdf, vgdisplay -v

TT
Attitude (not aptitude) determines altitude.
Cheryl Griffin
Honored Contributor

Re: extend logical volume

If you have OnlineJFS installed then you do not need to unmount the filesystem in order to extend it.

http://www.docs.hp.com/hpux/onlinedocs/B2355-90672/00/00/48-con.html (see lvextend, fsadm)
"Downtime is a Crime."
RAJESH GANGADHARAN
Regular Advisor

Re: extend logical volume

Check whether you got Online JFS by
swlist -l product |grep Online

If you got Online JFS
extend the LV using lvextend and extend filesystem using fsadm.
Let the choices you make today be the choices you can live with tomorrow.
Kyri Pilavakis
Frequent Advisor

Re: extend logical volume

Online JFS... Luxury for some of us!!!
Please see attached file which I hope will help.
Bosses don't undestand..HP does
Petr Simik_1
Valued Contributor

Re: extend logical volume

1.check where is /opt mountd
#bdf /opt
-> %/dev/vg01/lvol3 /opt

2.kill users using this volume group
#fuser -ku /dev/vg01/lvol3


4. Increase the size of a file system existing on a logical volume.
First, increase the size of the logical volume.
#lvextend -L 1600 /dev/vg01/lvol3
Unmount the file system.
#umount /dev/vg01/lvol3
Extend the file system to occupy the entire (larger) logical volume.
#extendfs /dev/vg01/rlvol3
Remount the file system.
#mount /dev/vg01/lvol3 /opt
Jerry Zhang
Frequent Advisor

Re: extend logical volume

First, you need Online JFS, which is part of Enterprise Operating Environment, or a separate product if you have regular HPUX 11i Operating Environment.

$ swlist |grep HPUX11i

will tell you that.

Second, you have to have enough PE in the volume group. To find out, type

$ vgdisplay -v vg00 |more

Find Free PE. Default size for a PE is 4MB. If there is no enough free PE, then you need to add more disk or LUN into vg00.

If you have both (Online JFS and free PE), you can expand /opt online by

# lvextend -L 1600 /dev/vg00/lvolxxx
# fsadm -F vxfs -b 1600000 /opt

where -b is in block of KB (not MB).

Good luck

- Jerry