How to unencapsulate the rootdisk using the vxunroot script
book
Article ID: 100034262
calendar_today
Updated On:
Resolution
There may be occasions when there will be a need to access the /opt file system via Solaris rather than via its volume. If this is the case, an underlying partition will have to be created so that Solaris can access the data via its slice on its respective disk. This can be achieved using a VERITAS Volume Manager tool called vxmksdpart and mapping a subdisk of the volume to a partition.
1. Determine the partition available for /opt with the prtvtoc command:
# prtvtoc /dev/dsk/c0t0d0s2
/dev/dsk/c0t0d0s2 partition map
Dimensions:
512 bytes/sector
63 sectors/track
16 tracks/cylinder
1008 sectors/cylinder
16708 cylinders
16706 accessible cylinders
Flags:
1: unmountable
10: read-only
Unallocated space:
First Sector Last
Sector Count Sector
8192016 4286775280 4294967295
16839648 4286321680 8194031
10957968 5881680 16839647
First Sector Last
Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 0 8192016 8192015
1 3 01 8196048 713664 8909711
2 5 00 0 16839648 16839647
3 4 00 8909712 2048256 10957967
6 14 01 0 16839648 16839647
7 15 01 8194032 2016 8196047
2. Looking at the partition column reveals that partitions 4 and 5 are free
3. Determine the subdisk name with the
vxprint command of the volume:
#vxprint -htg rootdg opt Disk group: rootdg V NAME USETYPE KSTATE STATE LENGTH READPOL PREFPLEX PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE v opt fsgen ENABLED ACTIVE 5880672 ROUND - pl opt-01 opt ENABLED ACTIVE 5880672 CONCAT - RW sd rootdisk-03 opt-01 rootdisk 10957967 5880672 0 c0t0d0 ENA <-----------------------
4. rootdisk-03 is the subdisk name (subdisk=sd)
5. Add the partition ("5" in this case, along with tag "0x09" and flag "0x00") with the
vxmksdpart command. Consult the man page on the
prtvtoc command for more information on what the tag and flag options are
#/usr/lib/vxvm/bin/vxmksdpart -g< diskgroup> Note:
and are hexadecimal
#/usr/lib/vxvm/bin/vxmksdpart -g rootdg rootdisk-03 5 0x09 0x00
6. Check to see if the partition was made with the prtvtoc command:
# prtvtoc /dev/dsk/c0t0d0s2
/dev/dsk/c0t0d0s2 partition map
Dimensions:
512 bytes/sector
63 sectors/track
16 tracks/cylinder
1008 sectors/cylinder
16708 cylinders
16706 accessible cylinders
Flags:
1: unmountable
10: read-only
Unallocated space:
First Sector Last
Sector Count Sector
8192016 4286775280 4294967295
16839648 4286321680 8194031
16838640 1008 16839647
First Sector Last
Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 0 8192016 8192015
1 3 01 8196048 713664 8909711
2 5 00 0 16839648 16839647
3 4 00 8909712 2048256 10957967
5 9 00 10957968 5880672 16838639 <------ new partition for opt
6 14 01 0 16839648 16839647
7 15 01 8194032 2016 8196047
Upon the next reboot, the new slice should be available as long as relevant changes have been made to /etc/vfstab. Alternatively, it can be mounted without a reboot as long as the opt volume is first taken offline, i.e. the volume stopped and the file system unmounted.
Issue/Introduction
How to add an underlying partition for /opt within VERITAS Volume Manager (tm)
Was this article helpful?
thumb_up
Yes
thumb_down
No