AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
  • 1.  Behavior when extending a mirror lv

    Posted Sat January 03, 2009 11:22 PM

    Originally posted by: dingdingfish


    say i have a AIX connect to two storage from different vendor, AIX & EMC.
    at first, i place it in a AIX hdisk, and use mklvcopy and specify hdisk to place it in a EMC hdisk.
    what i want to do is, if i extend this mirror-ed lv, what's the behavior. if i want to make one copy in IBM, and one copy in EMC, how to do this?
    after RTFM, i found there's also a hdisk option in extendlv, but how to specify the hdisk?
    like below?
    extendlv .... IBM EMC IBM EMC
    or extendlv .... IBM IBM IBM ... EMC EMC EMC ...


  • 2.  Re: Behavior when extending a mirror lv

    Posted Sun January 04, 2009 04:19 AM

    Originally posted by: SystemAdmin


    Hi, you would decide if the lv should reside in the same vg or in a different vg and how the disks are assigned to the volume groups.
    To make a lv mirrored copy, the disks should be assign to the same vg and then you can make a mirror copy of the lv or if the lv resides in different vg, and you would like to copy the lv, then cplv is one way of doing it.
    Please see man page for cplv.


  • 3.  Re: Behavior when extending a mirror lv

    Posted Sun January 04, 2009 09:18 AM

    Originally posted by: SystemAdmin


    I actually encounter this problem quite frequently, in which there are there are two different types of DASD that a single LV is mirrored across. However, keep in mind that I personally think that this is not necessarily a good thing for performance, because you will be at the speed of the slower DASD device, especially during write operations on mirrored and synced LVs. But here is an example of how I do this and how I expand LVs that use IBM and other vendor drives in the same volume group.

    let's say hdisk1 is IBM and hdisk2 is another vendor disk. In order to get 100% control over how the LPs are distributed across the disks I use map files.

    1. Create the LV

    mercury:/> mklv -c 2 -m lv_map.txt -t'raw' -y'test_lv' appvg 4
    test_lv

    The map file for the operation above looks like this

    mercury:/> cat lv_map.txt
    hdisk3:1
    hdisk3:2
    hdisk3:3
    hdisk3:4
    hdisk2:1
    hdisk2:2
    hdisk2:3
    hdisk2:4

    mercury:/> lslv -m test_lv
    test_lv:N/A
    LP PP1 PV1 v PP2 PV2 PP3 PV3
    0001 0001 hdisk3 0001 hdisk2
    0002 0002 hdisk3 0002 hdisk2
    0003 0003 hdisk3 0003 hdisk2
    0004 0004 hdisk3 0004 hdisk2
    You see that I specified every hdisk for each LP. So, now if I want to extend the LV and make sure that I keep my distribution accross the DASD correct. Let me show you how this would be extended without a map file.

    mercury:/> lslv -m test_lv
    test_lv:N/A
    LP PP1 PV1 PP2 PV2 PP3 PV3
    0001 0001 hdisk2 0001 hdisk3
    0002 0002 hdisk2 0002 hdisk3
    0003 0003 hdisk2 0003 hdisk3
    0004 0004 hdisk2 0004 hdisk3
    0005 0005 hdisk3 0005 hdisk2
    0006 0006 hdisk3 0006 hdisk2
    The primary copy of the 2 LP extendlv is suddnely on the wrong disk. So in order to assure that the secondary copy remains on the other vendor disk, I again extend the LV with a a specific map file.
    mercury:/> cat lv_map_add.txt
    hdisk2:5
    hdisk2:6
    hdisk3:5
    hdisk3:6

    mercury:/> extendlv -m lv_map_add.txt test_lv 2
    mercury:/> lslv -m test_lv
    test_lv:N/A
    LP PP1 PV1 PP2 PV2 PP3 PV3
    0001 0001 hdisk2 0001 hdisk3
    0002 0002 hdisk2 0002 hdisk3
    0003 0003 hdisk2 0003 hdisk3
    0004 0004 hdisk2 0004 hdisk3
    0005 0005 hdisk2 0005 hdisk3
    0006 0006 hdisk2 0006 hdisk3
    I normally use a little shell script I wrote to create the map files with. Of course this will also work with an LV that has 3 copies.


  • 4.  Re: Behavior when extending a mirror lv

    Posted Sun January 04, 2009 09:10 PM

    Originally posted by: dingdingfish


    Yes, this is just what i want, and really thanks to your very detailed explanation.
    i know most disk array have RAID protect, Hotspare protect, and dual controller, and reclaim can Non-disruptive upgrade. but for very important system, i can connect two storage system, so for any maintenance task, i can even shutdown one storage and don't affect the hosts.
    again thanks.