Operating System - HP-UX
1850490 Members
2439 Online
104054 Solutions
New Discussion

Re: Mirroring lvcreate -D distributed file system

 
SOLVED
Go to solution
Andrew Dutton
Frequent Advisor

Mirroring lvcreate -D distributed file system

Sorry if I am a little new... but I have been trying to figure this out for two days now. I need to mirror my drives and I would like at least to have some abilty for striping, true striping is not available and mirroring (which I read about here on the forums) so I created them distrubted with teh -D option.

Now I am trying to mirror and I just can't get it to work. It just keeps saying:

isqpro01:# lvextend -m 1 /dev/vg02/lvol1
lvextend: Not enough free physical extents available.
Logical volume "/dev/vg02/lvol1" could not be extended.
Failure possibly caused by PVG-Strict or Distributed allocation policies.


Now I have 3 disks that are -D created, all part of vg02, and they are part of the pvgdb PVG group.

cat /etc/lvmpvg
VG /dev/vg02
PVG pvgdb
/dev/dsk/c4t8d0
/dev/dsk/c4t10d0
/dev/dsk/c4t12d0

I tried adding my other disks just to vg02 and no PVG... then to a different PVG... and even had them part of the same PVG and always the same error. I know I am missing someting very easy so any help would be appreciated!
thanks
15 REPLIES 15
Andrew Dutton
Frequent Advisor

Re: Mirroring lvcreate -D distributed file system

opps more info... 11.0 on a N4000 with two 2100s... each with 4 70gb drives. 3 of the drives in 1 2100 is a file system, wanting to mirror to the other 2100.
thanks again
Sundar_7
Honored Contributor

Re: Mirroring lvcreate -D distributed file system

There is no way you can mirror this LV without creating the new PVG with some disks on that PVG.

-D also requires PVG-Strict allocation. I understand your LV is distributed across all the 3 disks ?

If yes then u need 3 more disks, added to the VG as a seperate PVG and then try the lvextend.

Post the lvdisplay -v
Learn What to do ,How to do and more importantly When to do ?
Sundar_7
Honored Contributor

Re: Mirroring lvcreate -D distributed file system

Add the disks in the second 2100s to the VG - edit /etc/lvmpvg and create a new PVG listing the second 2100s disks. now try lvextend
Learn What to do ,How to do and more importantly When to do ?
Patrick Wallek
Honored Contributor

Re: Mirroring lvcreate -D distributed file system

YOu need to add all 3 new disks to VG02. You then need to create another PVG with the new disks.

When you try to create your mirror you need to first change the mirror allocation policy to PVG-strict.

# lvchange -s g /dev/vg02/lvol1

Then you can create your mirror to the new PVG.
# lvcreate -m 1 /dev/vg02/lvol1 pvgdb1
Andrew Dutton
Frequent Advisor

Re: Mirroring lvcreate -D distributed file system

I did that first Sundar (and I do have 3 disks waiting) so I will try it again... I did it through SAM though... what I did was add three disks, told them to go into a new PVG... but from some reason it didn't update /etc/lvmpvg? so I added it manually... do you think I should use command line instead?

here is lvdisplay -v
--- Logical volumes ---
LV Name /dev/vg02/lvol1
VG Name /dev/vg02
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 60000
Current LE 15000
Allocated PE 15000
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation PVG-strict/distributed
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c4t12d0 5000 5000
/dev/dsk/c4t10d0 5000 5000
/dev/dsk/c4t8d0 5000 5000

--- Logical extents ---
LE PV1 PE1 Status 1
00000 /dev/dsk/c4t8d0 00000 current
then a bunch of currents....
Patrick Wallek
Honored Contributor

Re: Mirroring lvcreate -D distributed file system

Yes I would definitely do command line in this situation. SAM does not play well with distributed striped LVs. It never has.

Manually edit your /etc/lvmpvg and then follow my instructions above and you should be set.
Andrew Dutton
Frequent Advisor

Re: Mirroring lvcreate -D distributed file system

Patrick, I got it successfully changed but getting a usage statement from lvcreate:

# lvcreate -m 1 /dev/vg02/lvol1 pvgdb1
Usage: lvcreate
[-A Autobackup]
[-d Schedule]
[-i Stripes -I StripeSize]
{-l LogicalExtentsNumber |
-L LogicalVolumeSize}
[-m MirrorCopies]
[-n LogicalVolumeName]
[-p Permission]
[-r Relocate]
[-s Strict]
[-C Contiguous]
[-D Distributed]
[-M MirrorWriteCache]
[-c MirrorConsistency]
VolumeGroupName
"pvgdb1": Too many arguments

Ill try to play with it a bit... I put it in the /etc/lvmgvg file... and it looks right.
Sundar_7
Honored Contributor
Solution

Re: Mirroring lvcreate -D distributed file system


# pvcreate /dev/rdsk/c5t1d0

# pvcreate /dev/rdsk/c5t2d0

# pvcreate /dev/rdsk/c5t3d0

# vgextend /dev/vg02 /dev/dsk/c5t1d0 /dev/dsk/c5td2d0 /dev/dsk/c5t3d0

# vi /etc/lvmpvg
VG /dev/vg02
PVG pvgdb
/dev/dsk/c4t8d0
/dev/dsk/c4t10d0
/dev/dsk/c4t12d0
PVG DB_MIRROR
/dev/dsk/c5t1d0
/dev/dsk/c5t2d0
/dev/dsk/c5t3d0
#

# lvextend -m 1 /dev/vg02/lvol1
Learn What to do ,How to do and more importantly When to do ?
Sundar_7
Honored Contributor

Re: Mirroring lvcreate -D distributed file system

why is that u r using lvcreate.

use lvextend and you dont have to give the PVG name as the arguement.
Learn What to do ,How to do and more importantly When to do ?
Patrick Wallek
Honored Contributor

Re: Mirroring lvcreate -D distributed file system

My mistage. You need to use lvextend.

# lvextend -m 1 /dev/vg02/lvol1 pvgdb1

Using the PVG name may not be required, but by using that when extending, you know exactly where your extend is going.
Tim D Fulford
Honored Contributor

Re: Mirroring lvcreate -D distributed file system

I usually do this stuff at creation time..

# pvcreate /dev/rdsk/...
# vgcrete -g pri /dev/vg02 /dev/dsk/...
# vgextend -g mir /dev/vg02 /dev/dsk/...
# lvcreate -m 1 -D y -s g -n -L vg02

The "vgcreate -g pri" creates the /etc/lvmpvg file with a group called pri, and similarly "vgextend -g mir" adds to the lvmpvg with a group called mir.

The above lvcreate will creat the mirrored LV instantly. If yopu do not do this at lvreate time it will take a while to sync the disks..

Regards

Tim
-
Andrew Dutton
Frequent Advisor

Re: Mirroring lvcreate -D distributed file system

You all are just great! And you won't belive what I did wrong... this whole time when I was editing the lvmpvg file I wsa doing the wrong syntax... I just did a yy/p and pasted the VG statement AGAIN! so it iwas
VG...
PVG...
disks
VG...
PVG...
disks

i figured it out when I did the lvextend -g PVGNAME /dev/vg02 disks....

Now the mirror is starting to mirror the volumes... whew what a sucker I am :-)

thanks again!

Sundar_7
Honored Contributor

Re: Mirroring lvcreate -D distributed file system

How about assigning points Andrew ? :-)
Learn What to do ,How to do and more importantly When to do ?
Andrew Dutton
Frequent Advisor

Re: Mirroring lvcreate -D distributed file system

LoL my first post here... I didn't know I could even assign points. Sorry about that and will do :-)
Sundar_7
Honored Contributor

Re: Mirroring lvcreate -D distributed file system

http://forums1.itrc.hp.com/service/forums/helptips.do?#33
Learn What to do ,How to do and more importantly When to do ?