Encapsulating a disk fails with errors from the vxencap and vxslicer utilities

book

Article ID: 100029559

calendar_today

Updated On:

Resolution

Encapsulating a disk that does not have partition 2 identified as the BACKUP partition fails with errors that a file system is found in slice. Encapsulate a disk to bring it under Volume Manager control
Partition 2 is not identified with the BACKUP tag The identification of partition 2 has been changed from the default of 5, BACKUP. The identification of partition 2 a value other that 5, BACKUP

The error occurs because partition 2 does not contain the correct label identifying it as the BACKUP partition. The disk's label is the area set aside for storing information about the disks' controller, geometry, and partitions. Another term used to describe a disk label is the Volume Table of Contents (VTOC). The VTOC is stored on the first sector of the disk. To view the VTOC of a disk, use the format utility or review the output from the prtvtoc command. Below is an example from the output of the prtvtoc command:

 

NOTE : This output will vary from disk-to-disk and system-to-system based on the installation of Solaris and the layout of the slices.

Below is an example from the output of the prtvtoc command:

 

Syntax of the prtvtoc command
# /usr/sbin/prtvtoc /dev/rdsk/c#t#d#s2 

# /usr/sbin/prtvtoc /dev/dsk/c1t0d0s0

* /dev/dsk/c1t0d0s0 partition map

*

* Dimensions:

* 512 bytes/sector

* 848 sectors/track

* 24 tracks/cylinder

* 20352 sectors/cylinder

* 14089 cylinders

* 14087 accessible cylinders

*

* Flags:

* 1: unmountable

* 10: read-only

*

* First Sector Last

* Partition Tag Flags Sector Count Sector Mount Directory

 0 2 00 0 102411264 102411263 /

 1 3 01 102411264 32787072 135198335

 2 0 00 0 286698624 286698623

 5 0 00 135198336 151500288 286698623 /opt

In the above example, note that Partition 2 has an identification tag of 0, the first sector is 0 and the sector count is 286698624, which is the entire size of the disk. This is known as the BACKUP partition and is traditionally defined to represent the entire size of the disk. While there is no documentation that states partition 2 has to be configured with the BACKUP tag and it cannot be used to hold user data, there are various commands and applications that assume partition 2 is identified as BACKUP. These command and applications will not function correctly if the partition is configured with another identification tag. 

 

Volume Manager requires partition 2 to be identified as BACKUP and will not encapsulate a disk if partition 2 is configured with any other identification tag.


To resolve the error, using the above example, the identification tag for partition 2 needs to be changed from 0, UNASSIGNED, to 5, BACKUP. This change can be done using the Solaris format utility.

NOTE : Usage of the format utility can cause undesirable changes to the VTOC and should be used under the guidance of an experienced UNIX Administrator. Before making any changes to a disk via the format utility, create a backup of the existing configuration using the prtvtoc command. The backup should be copied to another file system on a different disk or to another host  in the event incorrect changes are made and they need to be reversed.

 

To change the identification tag of partition 2 from 0 to 5, follow the below instructions:

  1. # format c1t0d0
  2. From the format> prompt, type partition to select or define a partition table and press Enter
  3. From the partition> prompt, type print to display the current table and press Enter
  4. From the partition> prompt, type 2 to change the VTOC information about partition 2
  5. Enter the partition id tag as backup and press Enter
  6. Enter the partition permission flags of wm to make the partition permissions mountable, read and write and press Enter
  7. Enter the starting cylinder as 0 (zero) and press Enter
  8. Enter the partition size as the total size of the disk, 14089c and press Enter
  9. From the partition> prompt, type print to view the new VTOC settings that will be saved once the disk is labeled
  10. If the information that is printed in the new VTOC above is correct and the tag for partition 2 is now BACKUP, from the partition> prompt, type label to save the changes to the VTOC
  11. From the partition> prompt, type quit and press Enter
  12. From the format> prompt, type quit to exit the format utility

Now partition 2 is identified as BACKUP, the disk can be encapsulated and the errors will no longer occur.


Issue/Introduction

Encapsulating a disk fails with errors from the vxencap and vxslicer utilities