1835921 Members
2348 Online
110088 Solutions
New Discussion

Mirror Procedure

 
SOLVED
Go to solution
hahmedma
Advisor

Mirror Procedure

Dear all,

 

     i have a question how i can create the mirror for the logical volume on 2 diffrent disks??!!

 

thanks

2 REPLIES 2
Matti_Kurkela
Honored Contributor
Solution

Re: Mirror Procedure

You should:

  • have the MirrorDisk product installed
  • have 2 different disks included as PVs in your Volume Group (you can have more than two if necessary)
  • have enough free extents for the mirror on the PVs that don't already contain parts of the LV to be mirrored

The default allocation policy ("strict", lvcreate/lvchange -s y) for a LV will automatically make sure that each extent of the mirror copy will not be placed on the same PV as the corresponding original extent.

 

If your original VG already occupies two or more disks (including a LV that is located on two or more disks), you may want to configure PVGs (Physical Volume Groups) and set the LV allocation policy to PVG-strict (lvchange -s g) to have better control of where the mirror copies of the extents will end up. See "man lvmpvg" for more information.

 

(For example, if you have in your VG two small disks A and B, and add a single larger disk C for the purpose of mirroring both original disks, you might want to configure PVGs so that A and B belong to one PVG and C to another, and switch the LVs to PVG-strict mode; this way the mirror logic will automatically build mirrors only A <-> C and B <-> C, instead of mirroring any extents A <-> B even if there would be enough free space to do that.)

 

If you need to mirror the system volume group (vg00), you should keep in mind that the bootloader is located outside the LVM-controlled area of the disk and needs to be duplicated separately. Google for HP whitepaper titled "When Good Disks go Bad" to find detailed step-by-step instructions for mirroring, including the extra steps required when mirroring a system disk. Duplicating the bootloader requires special steps at the beginning of the mirroring procedure: if you don't do them at that time, they cannot be done later without destroying and rebuilding the entire mirror.

 

MK
hahmedma
Advisor

Re: Mirror Procedure

thanks