Friday, July 23, 2021

Move logical partition using “migratelp” command to preserve cross site mirroring

 

Lets first understand what is cross site mirroring and why it necessary??

Answer: In cross site mirroring disks are coming from two different site. If on AIX LPAR there is logical volume “backuplv” which having 2 disk hdisk0 and hdisk1. Because of some disaster at “Disk-Mirror site 1” we lost hdisk0 availability, then we can access same data which is present on hdisk0 from other site disk “hdisk1”.

 

Disk-Mirror site 1- hdisk0, hdisk2

Disk-Mirro-site 2- hdisk1

Each site have unique identifier. AIX admin can identify Lun/disk from correct site by engaging storage admin and providing them your requirement that you need disk from cross site for file system.

 

Generally production environment have cross site mirroring, for development and test environment filesystem have only single copy of logical partition.

 

Here I am going to discuss 1 scenario where, we need had issue for “cross-site” mirroring. This incident was occurred because of admin mistake.

 

Issue description:

“backuplv”  data copy 1 and data copy 2 pointing to same site disk. To solve this issue admin need to use “migratelp” .

 

LV name : backuplv

File system name : /backup

PV- hdisk0 hdisk1 hdisk 2 

VG – backupvg

#lslv  -m  backuplv

LP    PP1      PV1               PP2  PV2               PP3  PV3

0001   0001    hdisk0          0010   hdisk1

0002   0002    hdisk0          0011   hdisk1         

0003   0003    hdisk0          0012   hdisk2                

0004   0004    hdisk0          0013   hdisk2

 

From above output we can observe that, LP 03 and 04 data copy 1 and 2 belongs to Disk-Mirror site 1- hdisk0, hdisk2. Here we need to move these LP 2nd copy to hdisk1.

This will preserve cross site mirroring. AIX admin can move LP 03 and 04  2nd copy to free PP's on hdisk1 using following command.

 

#Migratelp backuplv/03/2 hdisk1/12  

-        Move 2nd mirror copy of LP 03 of logical volume backuplv to hdisk1 PP 12.

#Migratelp backuplv/04/2 hdisk1/13  

-        Move 2nd mirror copy of LP 04 of logical volume backuplv to hdisk1 PP 13.

 

After migratelp output of #lslv -m backuplv

 

Output:

 

#lslv  -m  backuplv

LP    PP1      PV1               PP2  PV2               PP3  PV3

0001   0001    hdisk0          0010   hdisk1

0002   0002    hdisk0     0011   hdisk1                 

0003   0003    hdisk0     0012   hdisk1                          

0004   0004    hdisk0     0013   hdisk1

 

Here we have moved 2nd copy of backuplv to correct site, to preserve cross site mirroring.

 

So if in future any issue while accessing Disk-Mirror site 1, then same data will be accessible from other site disk hdisk1. If cross site mirroring not preserved in production environment it will cause application and database outage, if that file system having critical data on it.

 

 

 

 

Why PP from same disk mirror site got allocated to “backuplv”

 

Answer:

 

Some time admin just use “chfs” command to increase file system size, without extending LP from Disk-Mirror site 1 and Disk-Mirror site 2.

 

 

 

 

Good practice :

 

Identify disk from Disk-Mirror site 1 and Disk-Mirror site 2

Select those disk (hdisk0 and hdisk1)

Extend desired LP for backuplv

Increase file system size.

 

 

 

Thanks  !!!!

 

 

 

 

 

 

 

 

 

 

 

 

                   

 

No comments:

Post a Comment