Receiving this error when trying to encapsulate with vxdiskadm: VxVM vxslicer ERROR V-5-1-565 Disk contains overlapping partitions.

book

Article ID: 100020968

calendar_today

Updated On:

Resolution

When trying to encapsulate with vxdiskadm option 2, the encapsulation will fail with the following error message:

VxVM ERROR V-5-2-338
The encapsulation operation failed with the following error:
VxVM vxencap ERROR V-5-2-213
It is not possible to encapsulate disk_0, for the following reason:



This is most likely due to data regions in different slices overlapping.  We can see this in prtvtoc:


# prtvtoc /dev/rdsk/c1t0d0s2

* /dev/rdsk/c1t0d0s2 partition map
*
*Dimensions:
*     512 bytes/sector
*     424 sectors/track
*      24 tracks/cylinder
*   10176 sectors/cylinder
*   14089 cylinders
*   14087 accessible cylinders
*
*Flags:
*   1:unmountable
*  10:read-only
*
*Unallocated space:
*      First    Sector    Last
*      Sector    Count    Sector
*    40968576    40704  41009279
*
*                          First    Sector    Last
*Partition  Tag  Flags    Sector    Count    Sector  Mount Directory
     0      2    00          0  40968576  40968575  /
     1      3    01  41009280  51164928  92174207
     2      5    00          0143349312143349311
     4      7    00   92174208  30721344122895551  /var
     5      0    00  122895552  20453760143349311  /opt
     6      5    00          0143349312 143349311


Notice how partition 6 overlaps with partition 2(the backup slice), and also has a duplicate tag.


Or here where partition 6 overlaps with partition 4(/var)

*
*                          First    Sector    Last
*Partition  Tag  Flags    Sector    Count    Sector  Mount Directory
     0      2    00          0  40968576  40968575  /
     1      3    01  41009280  51164928  92174207
     2      5    00          0143349312143349311
     4      7    00   92174208  30721344122895551  /var
     5      0    00  122895552  20453760143349311  /opt
     6      0    00   92174208  33560448125734655


To fix this, simply correct the overlap in the partitions in format.
You could also delete the offending slice all together with "vxpartrm".

Usage: vxpartrm /dev/rdsk/cXtXdXs2 slice


# /etc/vx/bin/vxpartrm /dev/rdsk/c1t0d0s2 6

# prtvtoc /dev/rdsk/c1t0d0s2
*/dev/rdsk/c1t0d0s2 partition map
*
*Dimensions:
*     512 bytes/sector
*     424 sectors/track
*      24 tracks/cylinder
*   10176 sectors/cylinder
*   14089 cylinders
*   14087 accessible cylinders
*
*Flags:
*   1:unmountable
*  10:read-only
*
*Unallocated space:
*      First    Sector    Last
*      Sector    Count    Sector
*    40968576    40704  41009279
*
*                          First    Sector    Last
*Partition  Tag  Flags    Sector    Count    Sector  Mount Directory
     0      2    00          0  40968576  40968575  /
     1      3    01  41009280  51164928  92174207
     2      5    00          0143349312143349311
     4      7    00   92174208  30721344122895551  /var
     5      0    00  122895552  20453760143349311   /opt


Once the offending slice is gone, encapsulation should complete as expected.