1752794 Members
5965 Online
108789 Solutions
New Discussion юеВ

Re: vgextend

 
SOLVED
Go to solution
Sridhar R
Regular Advisor

vgextend


Hi,

My Requirement is to move two PVтАЩs belonging to two VGтАЩs respectively to a single VG.

To be more clear,

PV -> /dev/dsk/c2t0d0 -> resides in /dev/vg01
PV-> /dev/dsk/c2t0d1 -> resides in /dev/vg02

Currently,

/dev/vg03 -> is having /dev/dsk/c2t0d2.

I want to add the above two PVтАЩs to the vg03.

And for further info, all the 3 VGтАЩs contain only one lvol in it.

I am using the below command sequence.

#lvremove тАУf /dev/vg01/lv01
#vgexport тАУs тАУm /tmp/vg01tmp /dev/vg01
#vgreduce /dev/vg01 /dev/dsk/c2t0d0
#lvremove тАУf /dev/vg02/lv02
#vgexport тАУs тАУm /tmp/vg02tmp /dev/vg02
#vgreduce /dev/vg02 /dev/dsk/c2t0d1
#vgextend /dev/vg03 /dev/dsk/c2t0d0 /dev/dsk/c2t0d1
#

Just let me know whether this sequence of commands will do or not.
If not, tell me what I have missed or what is wrong.

(Note: Not to worry about the data, as all the file systems doesnтАЩt have any data)

Thanks in Advance!!

Sridhar

8 REPLIES 8
Jeeshan
Honored Contributor

Re: vgextend

Hi

>>#lvremove ├в f /dev/vg01/lv01
>>#vgexport ├в s ├в m /tmp/vg01tmp /dev/vg01
pvmove /dev/dsk/c2t0d2 /dev/dsk/c2t0d0
>>#vgreduce /dev/vg01 /dev/dsk/c2t0d0
>>#lvremove ├в f /dev/vg02/lv02

>>#lvremove ├в f /dev/vg02/lv02
>>#vgexport ├в s ├в m /tmp/vg02tmp /dev/vg02
pvmove /dev/dsk/c2t0d1 /dev/dsk/c2t0d2
>>#vgreduce /dev/vg02 /dev/dsk/c2t0d1

you can additionally reuce the pv using pvmove.
a warrior never quits
Jeeshan
Honored Contributor
Solution

Re: vgextend

Hi

>>#lvremove ├в f /dev/vg01/lv01
>>#vgexport ├в s ├в m /tmp/vg01tmp /dev/vg01
pvmove /dev/dsk/c2t0d2 /dev/dsk/c2t0d0
>>#vgreduce /dev/vg01 /dev/dsk/c2t0d0
>>#lvremove ├в f /dev/vg02/lv02

>>#lvremove ├в f /dev/vg02/lv02
>>#vgexport ├в s ├в m /tmp/vg02tmp /dev/vg02
pvmove /dev/dsk/c2t0d1 /dev/dsk/c2t0d2
>>#vgreduce /dev/vg02 /dev/dsk/c2t0d1

you can additionally reduce the pv using pvmove.
a warrior never quits
OFC_EDM
Respected Contributor

Re: vgextend

If you don't care about the data then play away.

You could also blow away vg03 and then recreate as vg01 using all 3 disks.

If you're not going to recreate from scratch. Then after you vgextend vg03 you will still need to extend the lvol using lvextend.

Are these hfs or vxfs filesystems? (check fstab)

Use extendfs or fsadm to extend the filesystem.

If you don't have online JFS you'll have to unmount mountpoint(s) on the disk before you extend.
The Devil is in the detail.
OFC_EDM
Respected Contributor

Re: vgextend

ahsan...after a pvmove he'll still have to extend the filesystem correct?
The Devil is in the detail.
Rasheed Tamton
Honored Contributor

Re: vgextend

Hi,

vgexport /dev/vg01
vgexport /dev/vg02
pvcreate -f /dev/rdsk/c2t0d0
pvcreate -f /dev/rdsk/c2t0d1
vgextend /dev/vg03 /dev/dsk/c2t0d0 /dev/dsk/c2t0d1

Regards,
Rasheed Tamton.
Jeeshan
Honored Contributor

Re: vgextend

Hi O'kevin

>>...after a pvmove he'll still have to extend the filesystem correct?

yes.
a warrior never quits
Sridhar R
Regular Advisor

Re: vgextend

Thanks for all the replies!
Sridhar R
Regular Advisor

Re: vgextend

Thanks!