0

So mirroring is bad:

0:root@SERVER:/root # lslv -m hd2
hd2:/usr
LP    PP1  PV1               PP2  PV2               PP3  PV3
0001  0209 hdisk30           0322 hdisk32           
0002  0210 hdisk30           0323 hdisk33           
0003  0211 hdisk30           0323 hdisk32           
0004  0212 hdisk30           0324 hdisk33           
0005  0213 hdisk30           0324 hdisk32           
0006  0214 hdisk30           0325 hdisk33           
0007  0215 hdisk30           0325 hdisk32           
0008  0216 hdisk30           0326 hdisk33           
0009  0217 hdisk30           0326 hdisk32           
0010  0218 hdisk30           0327 hdisk33           
0011  0219 hdisk30           0327 hdisk32           
0012  0220 hdisk30           0328 hdisk33           
0013  0221 hdisk30           0328 hdisk32           
0014  0222 hdisk30           0329 hdisk33           
0015  0223 hdisk30           0329 hdisk32           
0016  0224 hdisk30           0330 hdisk33           
0017  0225 hdisk30           0330 hdisk32           
0018  0226 hdisk30           0331 hdisk33           
0019  0227 hdisk30           0331 hdisk32           
0020  0228 hdisk30           0332 hdisk33           
0021  0229 hdisk30           0332 hdisk32           
0022  0230 hdisk30           0333 hdisk33           
0023  0231 hdisk30           0333 hdisk32           
0024  0355 hdisk30           0338 hdisk32           
0025  0356 hdisk30           0339 hdisk32           
0026  0357 hdisk30           0340 hdisk32           
0027  0001 hdisk32           0307 hdisk8            
0028  0206 hdisk8            0305 hdisk43           
0029  0207 hdisk8            0306 hdisk43           
0:root@SERVER:/root # 

How can I fix this? I know that it's just a few steps, but I can't google it :\ [break the mirror, then move the pp from the wrong this to a good one then then "unbreak" the mirror? how?]

oslevel: 6100-05-01-1016 AIX

2

Firstly, why is your mirroring bad? I don't see anything specifically bad in the output you've listed.

However, the command you want is migratelp which allows you to move logical partitions anywhere you like.

If you want to break the mirror, just rmlvcopy and then use either migratelp or at that stage, migratepv to move stuff around. But I would just use migratelp.

  • on COPY1 there is a hdisk32 that is on a wrong side – LanceBaynes Dec 14 '11 at 16:22
  • If the disk failed, the mirror would continue to work, I'm not sure why you think it's bad. Untidy maybe, but not bad. Anyway, migratelp will allow you to tidy it up, as per my answer. Don't forget, AIX LVM will happily put mirror LP's on the same physical disk if you like, it's not wrong. – EightBitTony Dec 14 '11 at 16:58
  • 2
    Each LP appears to have two PV associated with it.There is no problems with your mirroring. – mattcaffeine Dec 14 '11 at 21:21
1

imho - the layout is not identical in style, so you should start by setting policies (looks like you had a single copy with max disks setting and then made your copy after adding disks 32 and 33 - and now you are running out of space everywhere (or hdisk8 would not have come into view).

imho 2 - and perhaps more important - there should be little need to reorganize hd2 - for performance reasons - as most of what you regularly, read frequently, use (executables, shared libraries) should be cached. Hence, I continue here asif this was a 'datavg' rather than rootvg.

imho 3 - there is no need for rootvg to be much larger than 16G. Applications should not be installed, by default, in rootvg. That was 'acceptable' in the late 80's and early 90's when AIX was also used as a graphic workstation. As a virtual machine much less so.

To do this well you should not think 'quick-fix' with a single command. First I would look for where the free space is in the volume group, or better - if I could add a new disk/LUN large enough to hold one copy and make a third copy to that disk using:

extendvg myvg hdiskYY hdiskZZ

chlv -e m -s y hd2      # set minimal but strict placement policies
mklvcopy -a e -e m -s y hd2 3 hdiskYY
rmlvcopy hd2 2 hdisk8 hdisk32 hdisk33 hdisk43 hdiskNN # where hdiskNN stands for all the other disks the second copy was on
mklvcopy -a e -e m -s y hd2 3 hdiskZZ
rmlvcopy hd2 2 hdisk8 hdisk30

As I go through this - my gut feeling is that your problem is with how your rootvg has been managed. More attention should be given to moving away things that are not 'core AIX' aka application related. This cleanup of hd2 (/usr) in extremely minor compared to what I feel you are actually revelaed about the history of this system.

0

I would:

  1. Build a third, clean mirror

  2. Remove the two original mirrors

  3. Add up with a second mirror again

It has been a long time I did LVs with AIX. Is there something similar to linux/lvm2 pvmove there?

-1

COMMAND LV LP COPYX HDISK

migratelp hd2/27/1 hdisk30

so it was only 1 command to put the LP on the COPY1 to the good hdisk.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.