cancel
Showing results for 
Search instead for 
Did you mean: 

How to Un-Encapsulate the Mirrored (second disk) of vxvm root mirror?

mrmurdock
Not applicable

3-Node V880 Sun CLuster 3.1u4 system with VXVM 4.1 patched up to 117080-07. All three nodes are identical as far as root disk layout. Solaris 10 with Kernel 137137-09.

Configuration: Disk 0 = 72gb and Disk 1 = 72gb. They are all UFS filesystems. The FS layout is

s0=/ (rootvol)

s1=swap (swapvol)

s3=/global (s3globalvol...maybe, not sure)

s4=/usr2 (usr2)

s5=/oracle (oracle)

 

Problem: Lost the Primary boot disk

Part of the manual un-ecapsulation method (TECH DOC 18432) is to convert the Mirrored Disk back to c#t#d# format. HOWEVER, on the secondary disk (mirored), the "vxdiskadm" menu to mirror all volumes, does not put the original vtoc onto the mirrored Disk (disk 1).

To unencapsulate , how do I get the vtoc back to original layout without wiping out the data contained in the PRIV and Public areas of the disk. I believe the priv data is like on slice 3 and the public is on slice 7 (thats just where  vxvm put them). 

 

 

1 REPLY 1

mikebounds
Level 6
Partner Accredited

You used to to be able to use vxmksdpart - this utility was undocumented in 4.1, so if it still exists, it will still probably be undocumented (in 4.1 it was in /usr/lib/vxvm/bin)

To use:

vxmksdpart subdisk-name slice-number tag mount_flag

which I think is just a front end to fmthard where the starting_sector and size_in_sectors is worked out from the subdisk you give.

The fmthard manpage gives the valid tags and flags which are:

 

tag
The partition tag: a decimal number. The following are reserved codes: 0 (V_UNASSIGNED), 1 (V_BOOT), 2 (V_ROOT), 3 (V_SWAP), 4 (V_USR), 5 (V_BACKUP), 6 (V_STAND), 7 (V_VAR), and 8 (V_HOME).
 
flag
The flag allows a partition to be flagged as unmountable or read only, the masks being: V_UNMNT 0x01, and V_RONLY 0x10. For mountable partitions use 0x00.

 

 

Examples:
For swap: vxmksdpart rootdisk-02 1 0x03 0x01
For var:  vxmksdpart rootdisk-03 6 0x07 0x00

From what I remember, you don't normally need to use mksdpart for root as this is normally already there on the label, but you can use prtvtoc to check.  If root is already there and mksdpart is no longer available you could use fmthard by deducting starting_sector and size_in_sectors from exisiting root partition.

Mike