Operating System - HP-UX
1825766 Members
2103 Online
109687 Solutions
New Discussion

Re: Add space to VG temporarily

 
anidil99
Occasional Contributor

Add space to VG temporarily

 

Folks,

I need a quick recommendation or ways on how to temporarily add certain amount of space to a volume group.

 

Here is the scenario :

 

I have a VG called vgoradata with four luns each 75G

 

Now the DBA is requesting to add extra 100g to the VG for some activity.  However this extra space is provided on a temporary basis only and I should be able to takeway the  space after the DBA activity has been completed.

 

What is the best way to   approach this task?  Normally we have the storage folks grow the lun , and we grow LV & file system but I guess that cannot be done here because the space is only  temporary and I am not in favor of shrinking the filesystems or luns.

I am thinking of adding a new 100G lun to the VG , but I  don't know the procedure on how I can take it back later.

 

Appreciate any suggestions.

 

Thanks in advance.

 

 

2 REPLIES 2
Patrick Wallek
Honored Contributor

Re: Add space to VG temporarily

Add the new LUN to the system and make sure it is visible via 'ioscan -fnC disk'.  If you need to create the device files you can use 'insf -eC disk'.

 

Once you have the device file, add the disk to the vg:

 

# pvcreate /dev/rdsk/c?t?d?

# vgextend vgoradata /dev/dsk/c?t?d?

 

Now you can create a new LV using the new space.

 

# lvcreate -n tmplv /dev/vgoradata

 

# lvextend -L 102400 /dev/vgoradata/tmplv /dev/dsk/c?t?d?  

This is using the device file for the new disk above

 

# newfs -F vxfs -o largefiles /dev/vgoradata/rtmplv

 

# mount /dev/vgoradata/tmplv /mountpoint

 

Once you are done with the space you can do:

 

# umount /mountpoint

# lvremove /dev/vgoradata/tmplv

# vgreduce /dev/vgoradata /dev/dsk/c?t?d?

 

Torsten.
Acclaimed Contributor

Re: Add space to VG temporarily

Why not creating a new VG for the temp space?

 

Once finished, just remove this VG.


Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!