User Tools

Site Tools


aix:mirroring_problem

After a crash of the server, during a migratelp operation, one logical volume is in a wrong state, one PP has 3 copie while the other have only 2:

[root@cltest1]/root# lsvg -l RG1vg
RG1vg:
LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT
datalv           jfs2       5       10      8    open/syncd    /oracle/data1
0516-1147 : Warning - logical volume data1lv may be partially mirrored.
data1lv       jfs2       1300    2601    9    open/syncd    /oracle/data1/data


[root@cltest1]/root# lslv -m data1lv | more
data1lv:/oracle/data1/data
LP    PP1  PV1               PP2  PV2               PP3  PV3
0001  0082 hdisk11           0082 hdisk19           
0002  0082 hdisk12           0082 hdisk20           
..........
1216  0365 hdisk11           0344 hdisk18           
1217  0341 hdisk11           0367 hdisk19           
1218  0369 hdisk12           0370 hdisk12           0341 hdisk19           
1219  0344 hdisk12           0370 hdisk20           
1220  0344 hdisk20           0369 hdisk13           
.......

Here you'll find IBM procedure to solve this trouble:

Please find bellow the procedure to remove a PP from an LV:

Very Important: MAKE a backup of the VG!

Run:

1.Create a mapfile of the PPs:
# lquerylv -L `getlvodm -l <lv name>` -r > /tmp/mapfile
(The created file contains a listing of the following form:
<pvid> <pp> <lp>)
.
2. Edit /tmp/mapfile and take out all entries that must NOT! be deleted
(i.e. the entries of the complete mirror)

3. unassign the PPs that are listed in /tmp/mapfile
# lreducelv -l `getlvodm -l <LV name>` -s <size> /tmp/mapfile
(<size> is the number of lines in /tmp/mapfile:
# SIZE=`wc -l /tmp/mapfile`)
.
4. make an update on the LVCB:
# putlvcb -c 1 lvname
.
5. # savebase
(For saving the changes to the ODM.)

Please let me know if you need any assistance or have any questions.

Some usefull commands concerning the subject:

[root@cltest1]/root# synclvodm RG1vg
[root@cltest1]/root# syncvg -v RG1vg  
[root@cltest1]/root# lextendlv -l `getlvodm -l lv01 ` -s 1  /tmp/mapfile
[root@cltest1]/root# reorgvg RG1vg 
aix/mirroring_problem.txt · Last modified: 2021/01/01 21:21 (external edit)