Disk Enclosures
1748246 Members
3336 Online
108760 Solutions
New Discussion юеВ

Re: How to extend vg ?

 
Zlatko_1
Occasional Advisor

How to extend vg ?

Hi all !

I have a small problem with vg.

For a long time I've created a lv bigger than 130Gb (exactly:200Gb):

mknod /dev/vg01/group c 64 0x010000
pvcreate /dev/rdsk/c3t3d0
vgcreate -s 32 /dev/vg01 /dev/dsk/c3t3d0
vgextend /dev/vg01 /dev/dsk/c3t3d0
lvcreate -l 6250 -n lv_raid /dev/vg01
newfs -F vxfs /dev/vg01/rlv_raid

But now, is my raid 100% full, and I need to extend it. And the problem is I have very important files on it. So if someone can give me an advice how to do it safe and without lost of data.

I'm very grateful for any advice !

Bye !

6 REPLIES 6
Thierry Poels_1
Honored Contributor

Re: How to extend vg ?

hi,

you could add another LUN or another disk to VG01, then you can enlarge the LVOL without a problem.

good luck,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Zlatko_1
Occasional Advisor

Re: How to extend vg ?

Is it possible without another VG01 disk ?
Naveej.K.A
Honored Contributor

Re: How to extend vg ?

Hi,

If you got online JFS installed could do them without umounting them.

swlist |grep -v jfs

regds
Naveej
practice makes a man perfect!!!
Thierry Poels_1
Honored Contributor

Re: How to extend vg ?

hi,

you can only extend an LVOL in the same VG.

But you could create a new mount point (new LVOL --> new or other VG?) for a subdirectory of the current mount point.

regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Zlatko_1
Occasional Advisor

Re: How to extend vg ?

I give you more information, so you can better understand what I want.
I have one raid system (700Gb) and there is defined one vg on it (vg01->700Gb). There is, until now, only one lv (lv_raid) with 200Gb ( it's extended over default 130Gb! ).
I can not add any other physical disks.
Now I have to extend lv_raid to ~300Gb without to lose any data.

What is yours proposal ?
Thanks
Ashwani Kashyap
Honored Contributor

Re: How to extend vg ?

Ok first check if your VG , vg01 has enough space left on it .

#vgdisplay -v /dev/vg01 | more

Look for Free PE .
Multiply the number of free PE by then PE size (Mbytes ) .

That should give you the total amount of free space in MB in vg01 .

If you have atleast 100 Gb of sapce then you can increase you logcal volume . If not then you need to add another LUN to this VG .

assuming that if you have space then do the following :

#lvextend -L 322122 /dev/g01/lv_raid .

this should increase the size of your logical volume but not the file system .

Now check if you have online JFS :
#swlist | grep -i onlinejfs .
If it retirens something like HP OnlineJFS , then you have it .
Then do the following :
#fsadm -F vxfs -b 322122M /your_mount_point .
Thats it . Now check with bdf that you have the required space . Check also with lvdisplay and vgdisplay .

Now if you don't have online JFS then do the following .

Ensure that no processes is occupying the file system mounted on your lv_raid volume by shutting down all applications adn database .
unmount the filesystem mounted on /dev/vg01/lv_raid .
then do :
#extendfs -F vxfs /dev/vg01/rlv_raid .
On succesfull completion mount the logical volume back on the mount point .
check with bdf,lvdisplay,vgdisplay .
start your apps/database .

Note : This is all assuming you have JFS file system .