Skip to content


you are only as good as the last few weeks

Today is Friday! I am busy migrating a two node cluster from XIV to HDS SAN storage. Nothing could be easier, right? After HDS disks are zoned to the hosts WWPNs and cfgmgr takes them in and I establish what new disk comes from what HDS controller I do extend the volume group and execute the following command to get the third mirror (on the set of new disk delivered by the first HDS controller).

# mirrorvg -S -c 3 lawap_vg hdisk10 hdisk11 hdisk12 hdisk13
0516-404 allocp: This system cannot fulfill the allocation request.
There are not enough free partitions or not enough physical volumes
to keep strictness and satisfy allocation requests.  The command
should be retried with different allocation characteristics.
0516-1517 mklvcopy: Failed to create a valid partition allocation.
0516-842 mklvcopy: Unable to make logical partition copies for
logical volume.
0516-1199 mirrorvg: Failed to create logical partition copies
for logical volume u10_lv.
0516-1200 mirrorvg: Failed to mirror the volume group.

What? There is space for God’s sake. Do you see it?

# lsvg -p lawap_vg
lawap_vg:
PV_NAME   PV STATE    TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk3    active      799         400         80..00..00..160..160
hdisk5    active      15          0           00..00..00..00..00
hdisk4    active      15          0           00..00..00..00..00
hdisk7    active      799         400         65..00..15..160..160
hdisk10   active      249         249         50..50..49..50..50
hdisk11   active      249         249         50..50..49..50..50
hdisk12   active      249         249         50..50..49..50..50
hdisk13   active      249         249         50..50..49..50..50

The lslv shows that logical volumes are set to the minimum number of disks, and that they are relocatable. The chlv command comes to mind and I execute the following cludge just to be sure.

for lv in `lsvg -l lawap_vg | grep -v grep \
                    | grep jfs2 | awk '{print $1}'`
do
chlv -s n -e x  $lv
done

Next, the mirrorvg command is recalled from the shell history and it dies promptly generating as many error messages as before…..

“What is going on?” – I ask surprised. I look and read the man pages and I still cannot get it running. After a while when I am looking at the output of the lslv command while describing my predicament to my wife it suddenly hits me what I have forgotten! It is the UPPER BOUND parameter of each logical volume of this volume group! Yes Sir, this parameter value is currently smaller than the present number of disks this vg has!

I modify the previous cludge to change it to 8 to match the number of disks in the volume group.

# for lv in `lsvg -l lawap_vg | grep -v grep \
                       | grep jfs2 | awk '{print $1}'`
do
chlv -u 8 $lv
done

I am ready to do it again. This time mirroring works like it should and I smile for a while until I recognize that I have not adjusted the queue to the values HDS recommends for AIX….. Well, I will wait till mirroring is done, reduce the third mirror, remove the disks form the volume group, change their queue depths and back track back to the mirrorvg that now, I remember again how to make to execute.

Have a nice weekend!

Posted in Real life AIX.


3 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Jim Carstensen says

    We’ve hit into this before, good thing to get out there for folks.

    The other “why won’t it remirror?!” stumper we had a number of years ago was an older system running a heavy DB on local disk. (TSM pre DB2, segregated from the SAN.) It had RAID 1+0 through LVM, striping across the disks in an I/O drawer and mirroring to another I/O drawer back under AIX 5.3. Kept complaining about not enough physical volumes trying to remirror after replacing a bum disk. Finally found an APAR, with a local workaround of using a map file with the mklvcopy to recreate the striping manually.

    lsvg -M didn’t preserve the striping order, but lslv -m did. Corrected the format, updated to the new disks and the mklvcopy ran just fine with the map file.

  2. Dariusz Jastrzebski says

    Hi,

    You can use awk without grep command to find or exclude pattern, like so:
    A. to find a pattern (jfs2):

    lsvg -l lawap_vg | awk '/jfs2/ { print $1 }'

    B. to exclude a pattern (jfs2):

    lsvg -l lawap_vg | awk '!/jfs2/ { print $1 }'

    Command grep -v grep is unnecessary, because we don’t list processes.

    Greetings,

  3. MarkD:-) says

    Dzięki za radę!!!
    🙂



Some HTML is OK

or, reply to this post via trackback.

WordPress Anti Spam by WP-SpamShield



Copyright © 2016 - 2017 Waldemar Mark Duszyk. All Rights Reserved. Created by Blog Copyright.