Operating System - HP-UX
1831356 Members
2928 Online
110024 Solutions
New Discussion

Adding disk to a mirrored lvol

 
Tina Stevnhoved
Occasional Contributor

Adding disk to a mirrored lvol

Hi,

I think my problem is similar to the one from Grace yesterday, but I need some more details to solve my problem.

I have a mirrored lvol (one mirror) and I have 2 disks I want to add, one for more dataspace and and one for mirror.

My allocation policy i strict.

Do I have to change the allocation policy before adding the disks?
Do I need to break the mirror before adding the disks?
Which commands do I have to run in which order to do it right?

Regards

Tina Stevnhoved
tiste@wmdata.com
3 REPLIES 3
Mark Grant
Honored Contributor

Re: Adding disk to a mirrored lvol

The strict allocation policy will ensure that the mirror is not on the same physical volume as the data so all you have to do is vgextend the volume group to get the disks in (after pvcreate of course) and then lvextend the logical volume to cover one of the new disks and the other disk will become the mirror of the new extents.
Never preceed any demonstration with anything more predictive than "watch this"
Stefan Farrelly
Honored Contributor

Re: Adding disk to a mirrored lvol

No problem.

1. add the 2 new disks to your VG.
2. when you lvextend your mirrored lvol specify the disk for data and the mirror on the lvextend command, and it will put the data on the first one and the mirror on the second, eg;

lvextend /dev/vg00/lvol5 /dev/dsk/c0t6d0 /dev/dsk/c0t8d0

and it will put the data on c0t6d0 and the mirror on c0t8d0
Im from Palmerston North, New Zealand, but somehow ended up in London...
Nico Schockaert
Trusted Contributor

Re: Adding disk to a mirrored lvol

Hello,

I should switch from strict to group (-s g). Be sure you have defined the volume group into /etc/lvmpvg, something like :
VG /dev/vg01
PVG PVG0
/dev/dsk/c2t0d0
PVG PVG1
/dev/dsk/c3t0d0
Add the two disks with vgextend (see answer before) and add the two new disks into /etc/lvmpvg. As such, you are not only sure that the mirror is on an other disk, but also on an other disk-group.

Hope this helps,
Nico