Use lvcreart -m to make a mirror
When I use lvcreate -l 4 --mirrors 1 -n mirror1 /dev/vg1 want to create mirror LV, I got four LV:
ACTIVE '/dev/vg1/mirror1' [16.00 MB] inherit ACTIVE '/dev/vg1/mirror1_mlog' [4.00 MB] inherit ACTIVE '/dev/vg1/mirror1_mimage_0' [16.00 MB] inherit ACTIVE '/dev/vg1/mirror1_mimage_1' [16.00 MB] inherit
I think the LV mirror1 is the origin LV, mirror1_mlog is log, the two others should be images LV, so why there are two images(in my opinion, it should be only one), and I how to use then? Can I mount it? Thanks.
Fang,Dongyu
begin:vcard
fn:Dongyu Fang
n:Fang;Dongyu
version:2.1
end:vcard
Quoted 9 lines · Fang,Dongyu
When I use
lvcreate -l 4 --mirrors 1 -n mirror1 /dev/vg1want to create mirror LV, I got four LV:ACTIVE '/dev/vg1/mirror1' [16.00 MB] inherit ACTIVE '/dev/vg1/mirror1_mlog' [4.00 MB] inherit ACTIVE '/dev/vg1/mirror1_mimage_0' [16.00 MB] inherit ACTIVE '/dev/vg1/mirror1_mimage_1' [16.00 MB] inheritI think the LV mirror1 is the origin LV,
mirror1_mlogis log, the two others should be images LV, so why there are twoimages(in my opinion, it should be only one), and I how to use then? Can I mount it?
/dev/vg1/mirror1 is the device you mount, the _mimage_ are internal devices for LVM. You have the "original" (mimage_0) and the mirror (mimage_1).
The later revisions of LVM will hide these from the lvscan & lvs commands.
Signature · 1 line
patrick
Thanks your replay.
How can I mount the "original" (mimage_0) or the "mirror" (mimage_1) single? Because I want to verify it write/read data in both LV indeed.
And how can I remove the mirror relation between the two LV(let the "original" and "mirror" become two singe LV)? (I use lvconvert -m 0 vg1/mirror1 then LVs become one.)
Fang,Dongyu
Quoted 15 lines · Patrick Caulfield
Quoted 11 lines · Fang,Dongyu
When I use
lvcreate -l 4 --mirrors 1 -n mirror1 /dev/vg1want to create mirror LV, I got four LV:ACTIVE '/dev/vg1/mirror1' [16.00 MB] inherit ACTIVE '/dev/vg1/mirror1_mlog' [4.00 MB] inherit ACTIVE '/dev/vg1/mirror1_mimage_0' [16.00 MB] inherit ACTIVE '/dev/vg1/mirror1_mimage_1' [16.00 MB] inheritI think the LV mirror1 is the origin LV,
mirror1_mlogis log, the two others should be images LV, so why there are twoimages(in my opinion, it should be only one), and I how to use then? Can I mount it?
Quoted 6 lines
/dev/vg1/mirror1is the device you mount, the _mimage_ are internal devices for LVM. You have the "original" (mimage_0) and the mirror (mimage_1).The later revisions of LVM will hide these from the lvscan & lvs commands.
begin:vcard
fn:Dongyu Fang
n:Fang;Dongyu
version:2.1
end:vcard
Quoted 4 lines · Fang,Dongyu
Thanks your replay.
How can I mount the "original" (mimage_0) or the "mirror" (mimage_1) single?
Because I want to verify it write/read data in both LV indeed.
Because of internal cacheing I don't know whether that's a sensible thing to do.
Quoted 3 lines
And how can I remove the mirror relation between the two LV(let the
"original" and "mirror" become two singe LV)? (I use `lvconvert -m 0
vg1/mirror1` then LVs become one.)
With current RPMs you currently can't. The code is in CVS but it needs lots of testing.
Signature · 1 line
patrick
The attached script (originally from Jun'ichi Nomura) is what I've been using to validate mirror volumes. You might be able to pull out things for use in your tests. It uses device mapper and is design to attack a specific bug.
brassow
Quoted 24 lines · Patrick Caulfield
Quoted 4 lines · Fang,Dongyu
Thanks your replay.
How can I mount the "original" (mimage_0) or the "mirror" (mimage_1) single?
Because I want to verify it write/read data in both LV indeed.Because of internal cacheing I don't know whether that's a sensible thing to do.
Quoted 3 lines
And how can I remove the mirror relation between the two LV(let the
"original" and "mirror" become two singe LV)? (I use `lvconvert -m 0
vg1/mirror1` then LVs become one.)With current RPMs you currently can't. The code is in CVS but it needs lots of testing.
Signature · 7 lines
patrick _______________________________________________ linux-lvm mailing list [email protected] https://www.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/