Friday, April 16, 2010

How to create mirrored lvm volumes in linux redhat / centos

Sponsored Links

How to create mirrored lvm volumes:

We can create mirrored lvm(how to configure lvm) using the command #lvcreate with -m option.
The syntax is as follows:

#lvcreate -L Size -m1 -n Name_LV Name_VG Mirror_1st_leg Mirror_2nd_leg Log_Device

-m1 means its a mirrored one type. So it will have one original[1st leg]how to configure lvm one mirror[2nd leg] and a logging device for sync.

#lvcreate -L 100M -m1 -n mlvm redhat /dev/sda5 /dev/sda6 /dev/sda7


[root@vm4 ~]# lvcreate -L 100M -m1 -n mlvm redhat /dev/sda5 /dev/sda6 /dev/sda7
/dev/cdrom: open failed: Read-only file system
Logical volume "mlvm" created

[root@vm4 ~]# lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
mlvm redhat mwi-a- 100.00M mlvm_mlog 100.00

For more details check the cluster_logical_volume.pdf in redhats docs.
Sponsored Links

No comments:

Post a Comment

Be nice. That's all.