Operating System - HP-UX
1834481 Members
3702 Online
110067 Solutions
New Discussion

Need to add space to an existing volume

 
SOLVED
Go to solution
Jay Richardson
Advisor

Need to add space to an existing volume

I am an extreme HP-UX novice. I need the steps to add space to an existing volume group asap.

I've read through some of the forum entries but still a little hazy on some things. What I have done so far is:
Created the LUN on our VA7110 and can see the disk with an ioscan (has alternate link)
Created the device file using insf -e
Performed pvcreate -f /dev/rdsk/c35t1d1
Performed pvcreate -f /dev/rdsk/c33t1d1

I've also done a vgdisplay -v /dev/vg_kana:
VG Name /dev/vg_kana
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 1
Open LV 1
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 12799
VGDA 4
PE Size (Mbytes) 4
Total PE 16636
Alloc PE 16636
Free PE 0
Total PVG 1
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg_kana/fs_kana
LV Status available/syncd
LV Size (Mbytes) 66544
Current LE 16636
Allocated PE 16636
Used PV 2


--- Physical volumes ---
PV Name /dev/dsk/c6t0d1
PV Name /dev/dsk/c35t0d1 Alternate Link
PV Name /dev/dsk/c26t0d1 Alternate Link
PV Name /dev/dsk/c33t0d1 Alternate Link
PV Status available
Total PE 12797
Free PE 0
Autoswitch On

PV Name /dev/dsk/c26t0d6
PV Name /dev/dsk/c35t0d6 Alternate Link
PV Status available
Total PE 3839
Free PE 0
Autoswitch On


--- Physical volume groups ---
PVG Name pvg01
PV Name /dev/dsk/c6t0d1
PV Name /dev/dsk/c35t0d1
PV Name /dev/dsk/c26t0d1
PV Name /dev/dsk/c33t0d1

I need to know where I go from here.

Thank you in advance.
10 REPLIES 10
Peter Godron
Honored Contributor

Re: Need to add space to an existing volume

Jay,
if you are a complete novice, I would recommend using sam and then inspecting the sam.log to trace what was done!

Seems the safest way of learning about HPUX.

man vgextend
Pete Randall
Outstanding Contributor

Re: Need to add space to an existing volume

Jay,

You next need to extend the VG, using vgextend. After that, you'll want to extend one or more logical volumes with lvextend and finally the file systems occupying those logical volumes with extendfs.

See the associated man pages for details.


Pete

Pete
baiju_3
Esteemed Contributor

Re: Need to add space to an existing volume

Hi Jay,

If you have multiple paths pvcreate is only required on the Primary .

Now you can extend the VG by vgextend .

vgextend /dev/vg_kana /dev/dsk/c?t?d disk2 disk 3 etc ...

disk2 , disk3 are the alternate links to the same PV , these ctd numbers you can find out using ioscan -Fn .

Do vgdisplay /dev/vg_kana

Check for the free PEs .Multiply free PE*PE size to calculate total free size in MB.

Add Logical volume using ,

lvcreate -C y -r n -n lvol_name -L size_in_MB /dev/vg_kana

create file system using

nesfs -F vxfs -o largefiles /dev/vg_kana/rlvol_name.

Make the mount point
mkdir /mount_point

Mount file system
Mount /dev/vg_kana/lvol_name /mount_point

Set the appropriate permission for the FS by

chown user:group /mount_point

Add the entry in /etc/fstab for mounting these file system during system reboot.

Regards,
bl.






Good things Just Got better (Plz,not stolen from advertisement -:) )
baiju_3
Esteemed Contributor

Re: Need to add space to an existing volume

Sorry , spelling mistake.

create file system using

newfs -F vxfs -o largefiles /dev/vg_kana/rlvol_name.

thx.
Good things Just Got better (Plz,not stolen from advertisement -:) )
James George_1
Trusted Contributor

Re: Need to add space to an existing volume

Hi,

First add these disks to the VG by

# vgextend dev/vg_kana /dev/dsk/c35t1d1 /dev/dsk/c33t1d1

then extend your LV. Decide how much additional space u need and add that to your existing 66544 MB .
# lvextend -L (your new size) /dev/vg_kana/fs_kana

# fsadm -F vxfs -b (your new size)m /FSmountpoint.

Good luck.

James
forum is for techies .....heaven is for those who are born again !!
Jay Richardson
Advisor

Re: Need to add space to an existing volume

Thank you everyone for your quick resplies.

In the original post the vgdisplay shows Free PE=0

Meaning no physical extents are available, correct?

Peter Godron
Honored Contributor
Solution

Re: Need to add space to an existing volume

Correct, PE=0 means no Physical Extents left
Jay Richardson
Advisor

Re: Need to add space to an existing volume

Rats! This is turning into a crash course. Hoping to avoid the "crash" part.
James R. Ferguson
Acclaimed Contributor

Re: Need to add space to an existing volume

Hi Jay:

You could gain some background and perspective with chapter-6 of the "Managing Systems and Workgroups" guide:

http://docs.hp.com/en/B2355-90950/B2355-90950.pdf

A quick read might help.

Regards!

...JRF...
Deoncia Grayson_1
Honored Contributor

Re: Need to add space to an existing volume

In order to extend this volume group, you will have to add more disks to this by doing

vgextend vg_kana /dev/dsk/c?t? /dev/dsk/c?t?d?

If no one ever took risks, Michelangelo would have painted the Sistine floor. -Neil Simon