Important Update: Cohesity Products Knowledge Base Articles
All Cohesity Knowledge Base Articles are now managed via the Cohesity Support Portal: https://support.cohesity.com/. The Knowledge Base articles available here will not reflect the latest information or may no longer be accessible.
Problem
To reinitialize a disk, while preserving the existing data, first determine the offset and length of the public region. Then, reinitialize the disk using vxdisksetup. Specifying the public region offset and length allows Veritas to preserve the existing data while allowing flexibility for changes to the private region.
Solution
| This article is a part of a set on troubleshooting failed, or failing, disks. Click here to start at the beginning: https://www.veritas.com/docs/000080622 |
Table of Contents
Introduction
1. Determine the disk format
2. Find the public region offset and length
3. Reinitialize the disk using vxdisksetup
Introduction
(Back to top)
Finding the offset and length of the public region can be done with vxdisk, or by examining the "diskinfo" file in a vxconfigbackup. By default, the vxconfigbackup files are stored under /etc/vx/cbr/bk. The location may be different if a manual backup was performed using the "-l" argument.
"Restoring the disk group configuration using vxconfigrestore"
https://www.veritas.com/docs/000087440
1. Determine the disk format
(Back to top)
From the vxdisk output, find the "info: format" property (Figure 1). Notice the value after the "format=" property.
Figure 1 - Vxdisk output with "info: format" emphasized
| Syntax: Run vxdisk list <disk> Example, with typical output: # vxdisk list disk_4 |
2. Find the public region offset and length
(Back to top)
If the disk format is "cdsdisk" or "simple," then take note of the following values in the vxdisk output (Figure 2):
- public: len
- public: offset
If the disk format is "sliced," then take note of the following values in the vxdisk output (Figure 3):
- public: len
- public: disk_offset
Specifying the public region offset and length allows Veritas to preserve the user data while allowing flexibility for changes to the private region. This is important in situations when a disk that contains an older, and smaller, private region is reinitialized by a newer version of Veritas. When the disk is reinitialized, the size of the private region may change. As long as the public region offset and length are specified, it will not overwrite, or change, the public region.
Figure 2 - Attributes to gather for CDS and simple disks
| Syntax: Run vxdisk list <disk> Example, with typical output: # vxdisk list disk_4 |
Figure 3 - Attributes to gather for sliced disks
Syntax: Run vxdisk list <disk> Example, with typical output: # vxdisk list disk_4 |
3. Reinitialize the disk using vxdisksetup
(Back to top)
Once the public region offset and length have been determined, use vxdisksetup to reinitialize the disk. This reinitialization process recreates the private region on the disk, but it does not affect the user data that resides within the public region. This allows the disk to be added back into the disk group.
Figure 4 - Using vxdisksetup to reinitialize a disk
Syntax: vxdisksetup -i <device> puboffset=<value> publen=<value> format=<format_type>
Note: For "puboffset," use the value for either "offset" or "disk_offset" (depending on the disk format) as discussed in Step 2.
The "format" argument is optional. If it is omitted, vxdisksetup assumes CDS. Example, with typical output: # vxdisksetup -i disk_4 puboffset=8192 publen=39833600
Warning: Use great care when running this command. Specifying incorrect values may result in data loss.
After reinitializing the disk, vxdisk now shows that the disk is online. # vxdisk -o alldgs list |