ITEM: L5882L

Problem creating logical volume using partition map.


ENV: AIX 3.2.5 model 980b

DESC: Trying to backup mirrored LV using following instructions:

   make a record of the physical partitions which make up the
   logical volume by typing:

      \# lslv -m lv00

       LP     PP1  PV1             PP2  PV2
       0001   0012 hdisk1          0019 hdisk2
       0002   0013 hdisk1          0020 hdisk2
       0003   0014 hdisk1          0021 hdisk2
       0004   0015 hdisk1          0022 hdisk2
       0005   0016 hdisk1          0023 hdisk2

   Note that the 2nd and 3rd columns show the physical partitions
   used by the first copy (on hdisk1), and the 4th and 5th
   columns (which we will use) show the partitions used by the
   second copy. Note also that our filesystem contains 5
   logical partitions (comprised of 10 physical partitions).

   Using this information, we can construct a map file of the
   partitions used by the second copy of the logical volume for
   later use. Create a file, which we will call "/tmp/lv00map"
   using your preferred text editor. The following information
   should be entered (with no leading spaces or spaces within):

       ---------------BEGIN TEXT--------------
       ----------------END TEXT---------------

       ---------------BEGIN TEXT--------------
       ----------------END TEXT---------------
   Now, assuming that the copy is currently active and up-to-date,
   we will remove the second copy from the logical volume as follows:

      \# rmlvcopy lv00 1 hdisk2

   Specifying "hdisk2" in this command ensures that only the copy
   that exists on hdisk2 is removed.  By default, if you omit
   the disk name, the last copy created will be removed first.
   When this command completes, the physical partitions previously
   allocated to this logical volume copy are unallocated. They may
   now be allocated to another logical volume. For this reason, it
   is very important that no user be allowed to create or extend any
   logical volumes or filesystems at this time, as you run the risk
   of writing over our backup copy.

   Since we recorded in our map file, "/tmp/lv00map", the physical
   partitions previously used by the copy, we can use this map file
   to create a new logical volume using the same partitions. Doing
   so will not write over the actual data which resided inside the
   physical partitions:

*****   \# mklv -y templv -m /tmp/lv00map vg00 5             **********

   Note that we called out new logical volume "templv". We entered
   "vg00" as the name of the volume group, and "5" is the number
   of physical partitions specified in the map file.

   We can now mount the filesystem to another directory as follows:

    \# mount -V jfs -o log=/dev/LOGname /dev/templv /mnt

   where LOGname is the name of a jfs log logical volume in the
   volume group.

The mklv command fails with

  0516-423 allocp: Not enough entries in mapfile to fulfill allocation.


There is a known problem with allocp that causes this error.  Allocp is 
"picky" about the way the mapfile is organized.  The partitions must be in
order from lower to higher and, if multiple drives, the drives must 
appear in the same order from bottom to top.

EX1: The following mapfile would cause a problem, because the first set of
    disks are in a different order then the following ones.
 EX2: Changing the order of the first three lines to match the following ones
     should resolve the problem.
    hdisk1:77    \<--
    hdisk2:77    \<--
    hdisk0:77    \<--
Another possible workaround, when using mirroring, is to remove the lvcopies 
and recreate them.  This will create a new partition map for the logical 
volumes that allocp might like better.

Support Line: Problem creating logical volume using partition map. ITEM: L5882L
Dated: August 1994 Category: N/A
This HTML file was generated 99/06/24~13:30:40
Comments or suggestions? Contact us