Veritas Encapsulation is the concept of bringing rootdisk under veritas control.We can perform this at any moment, as it preserves the existing data.
Similar to ufs we cannot grow or shrink rootvol and swapvol.We can encapsulate our rootdisk in sliced format and have to leave atleast 2 spare slices for public and private regions.
Now let's go with practical ,
root@mysrv1 #
root@mysrv1 # bash
root@mysrv1 #
root@mysrv1 # df -kh
Filesystem size used avail capacity Mounted on
/dev/dsk/c1t0d0s0 30G 23G 6.3G 79% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 29G 1.7M 29G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
sharefs 0K 0K 0K 0% /etc/dfs/sharetab
/platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap2.so.1
30G 23G 6.3G 79% /platform/sun4u-us3/lib/libc_psr.so.1
/platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap2.so.1
30G 23G 6.3G 79% /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1
fd 0K 0K 0K 0% /dev/fd
swap 29G 32K 29G 1% /tmp
swap 29G 40K 29G 1% /var/run
swap 29G 0K 29G 0% /dev/vx/dmp
swap 29G 0K 29G 0% /dev/vx/rdmp
root@mysrv1 #
From above output, we know that currently rootdisk is in normal c#t#d# format.
Let's check in /etc/vfstab also.....
root@mysrv1 # cat /etc/vfstab
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c1t0d0s1 - - swap - no -
/dev/dsk/c1t0d0s0 /dev/rdsk/c1t0d0s0 / ufs 1 no -
/devices - /devices devfs - no -
sharefs - /etc/dfs/sharetab sharefs - no -
ctfs - /system/contract ctfs - no -
objfs - /system/object objfs - no -
swap - /tmp tmpfs - yes -
#/dev/dsk/c1t0d0s1 - - swap - no -
root@mysrv1 #
Now we can proceed with our steps for encapsulation.....
root@mysrv1 # vxdiskadm
Volume Manager Support Operations
Menu: VolumeManager/Disk
1 Add or initialize one or more disks
2 Encapsulate one or more disks
3 Remove a disk
4 Remove a disk for replacement
5 Replace a failed or removed disk
6 Mirror volumes on a disk
7 Move volumes from a disk
8 Enable access to (import) a disk group
9 Remove access to (deport) a disk group
10 Enable (online) a disk device
11 Disable (offline) a disk device
12 Mark a disk as a spare for a disk group
13 Turn off the spare flag on a disk
14 Unrelocate subdisks back to a disk
15 Exclude a disk from hot-relocation use
16 Make a disk available for hot-relocation use
17 Prevent multipathing/Suppress devices from VxVM's view
18 Allow multipathing/Unsuppress devices from VxVM's view
19 List currently suppressed/non-multipathed devices
20 Change the disk naming scheme
21 Get the newly connected/zoned disks in VxVM view
22 Change/Display the default disk layouts
23 Mark a disk as allocator-reserved for a disk group
24 Turn off the allocator-reserved flag on a disk
list List disk information
? Display help about menu
?? Display help about the menuing system
q Exit from menus
Select an operation to perform: 2
Encapsulate one or more disks
Menu: VolumeManager/Disk/Encapsulate
Use this operation to convert one or more disks to use the Volume Manager.
This adds the disks to a disk group and replaces existing partitions
with volumes. Disk encapsulation requires a reboot for the changes
to take effect.
More than one disk or pattern may be entered at the prompt. Here are
some disk selection examples:
all: all disks
c3 c4t2: all disks on both controller 3 and controller 4, target 2
c3t4d2: a single disk (in the c#t#d# naming scheme)
xyz_0 : a single disk (in the enclosure based naming scheme)
xyz_ : all disks on the enclosure whose name is xyz
Select disk devices to encapsulate:
[<pattern-list>,all,list,q,?] list
DEVICE DISK GROUP STATUS
c1t0d0 - - online invalid
c1t1d0 - - error
Select disk devices to encapsulate:
[<pattern-list>,all,list,q,?] c1t0d0
Here is the disk selected. Output format: [Device_Name]
c1t0d0
Continue operation? [y,n,q,?] (default: y)
You can choose to add this disk to an existing disk group or to
a new disk group. To create a new disk group, select a disk group
name that does not yet exist.
Which disk group [<group>,list,q,?] rootdg
Create a new group named rootdg? [y,n,q,?] (default: y)
Use a default disk name for the disk? [y,n,q,?] (default: y)
A new disk group will be created named rootdg and the selected
disks will be encapsulated and added to this disk group with
default disk names.
c1t0d0
Continue with operation? [y,n,q,?] (default: y)
The following disk has been selected for encapsulation.
Output format: [Device_Name]
c1t0d0
Continue with encapsulation? [y,n,q,?] (default: y)
A new disk group rootdg will be created and the disk device c1t0d0 will
be encapsulated and added to the disk group with the disk name rootdg01.
Enter desired private region length
[<privlen>,q,?] (default: 65536)
The c1t0d0 disk has been configured for encapsulation.
The first stage of encapsulation has completed successfully. You
should now reboot your system at the earliest possible opportunity.
The encapsulation will require two or three reboots which will happen
automatically after the next reboot. To reboot execute the command:
shutdown -g0 -y -i6
This will update the /etc/vfstab file so that volume devices are
used to mount the file systems on this disk device. You will need
to update any other references such as backup scripts, databases,
or manually created swap devices.
Encapsulate other disks? [y,n,q,?] (default: n)
Volume Manager Support Operations
Menu: VolumeManager/Disk
1 Add or initialize one or more disks
2 Encapsulate one or more disks
3 Remove a disk
4 Remove a disk for replacement
5 Replace a failed or removed disk
6 Mirror volumes on a disk
7 Move volumes from a disk
8 Enable access to (import) a disk group
9 Remove access to (deport) a disk group
10 Enable (online) a disk device
11 Disable (offline) a disk device
12 Mark a disk as a spare for a disk group
13 Turn off the spare flag on a disk
14 Unrelocate subdisks back to a disk
15 Exclude a disk from hot-relocation use
16 Make a disk available for hot-relocation use
17 Prevent multipathing/Suppress devices from VxVM's view
18 Allow multipathing/Unsuppress devices from VxVM's view
19 List currently suppressed/non-multipathed devices
20 Change the disk naming scheme
21 Get the newly connected/zoned disks in VxVM view
22 Change/Display the default disk layouts
23 Mark a disk as allocator-reserved for a disk group
24 Turn off the allocator-reserved flag on a disk
list List disk information
? Display help about menu
?? Display help about the menuing system
q Exit from menus
Select an operation to perform: q
Goodbye.
root@mysrv1 #
root@mysrv1 #
By this we performed veritas encapsulation on our rootdisk....A reboot is needed to reflect these changes.
root@mysrv1 #
root@mysrv1 # reboot -- -v
login as: root
Using keyboard-interactive authentication.
Password:
Access denied
Using keyboard-interactive authentication.
Password:
Last login: Fri Aug 22 11:49:35 2014 from 10.20.10.50
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
You have new mail.
Sourcing //.profile-EIS.....
root@mysrv1 #
root@mysrv1 #
We successfully rebooted after encapsulating the rootdisk, now observe the changes.....
root@mysrv1 #
root@mysrv1 # df -kh
Filesystem size used avail capacity Mounted on
/dev/vx/dsk/bootdg/rootvol
30G 23G 6.3G 79% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 29G 1.6M 29G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
sharefs 0K 0K 0K 0% /etc/dfs/sharetab
/platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap2.so.1
30G 23G 6.3G 79% /platform/sun4u-us3/lib/libc_psr.so.1
/platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap2.so.1
30G 23G 6.3G 79% /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1
fd 0K 0K 0K 0% /dev/fd
swap 29G 40K 29G 1% /tmp
swap 29G 40K 29G 1% /var/run
swap 29G 0K 29G 0% /dev/vx/dmp
swap 29G 0K 29G 0% /dev/vx/rdmp
root@mysrv1 #
root@mysrv1 #
root@mysrv1 # cat /etc/vfstab
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/vx/dsk/bootdg/swapvol - - swap - no -
/dev/vx/dsk/bootdg/rootvol /dev/vx/rdsk/bootdg/rootvol / ufs 1 no -
/devices - /devices devfs - no -
sharefs - /etc/dfs/sharetab sharefs - no -
ctfs - /system/contract ctfs - no -
objfs - /system/object objfs - no -
swap - /tmp tmpfs - yes -
#/dev/dsk/c1t0d0s1 - - swap - no -
#NOTE: volume rootvol (/) encapsulated partition c1t0d0s0
#NOTE: volume swapvol (swap) encapsulated partition c1t0d0s1
root@mysrv1 #
root@mysrv1 # swap -l
swapfile dev swaplo blocks free
/dev/vx/dsk/bootdg/swapvol 323,26000 16 33560432 33560432
root@mysrv1 #
root@mysrv1 #
root@mysrv1 # vxdg list
NAME STATE ID
rootdg enabled 1408688804.6.mysrv1
root@mysrv1 #
root@mysrv1 #
root@mysrv1 # vxprint -ht
Disk group: rootdg
dg rootdg default default 26000 1408688804.6.mysrv1
dm rootdg01 c1t0d0s2 auto 81407 286617216 -
v rootvol - ENABLED ACTIVE 62928384 ROUND - root
pl rootvol-01 rootvol ENABLED ACTIVE 62928384 CONCAT - RW
sd rootdg01-B0 rootvol-01 rootdg01 286617215 1 0 c1t0d0 ENA
sd rootdg01-02 rootvol-01 rootdg01 0 62928383 1 c1t0d0 ENA
v swapvol - ENABLED ACTIVE 33560448 ROUND - swap
pl swapvol-01 swapvol ENABLED ACTIVE 33560448 CONCAT - RW
sd rootdg01-01 swapvol-01 rootdg01 62928383 33560448 0 c1t0d0 ENA
root@mysrv1 #
#############################################
Similarly if we want to achieve mirroring for rootvol, simply we need to add the 2nd disk to our diskgroup "rootdg".
# vxdisksetup -i c1t1d0 format=sliced
# vxdg -g rootdg adddisk rootmirror=c1t1d0
# vxdiskadm
...... output truncated ....
-----
-----
4 Remove a disk for replacement
5 Replace a failed or removed disk
6 Mirror volumes on a disk
7 Move volumes from a disk
-----
-----
Select an operation to perform: 6
Mirror volumes on a disk
Menu: VolumeManager/Disk/Mirror
This operation can be used to mirror volumes on a disk. These
volumes can be be mirrored onto another disk or onto any
available disk space. Volumes will not be mirrored if they are
already mirrored. Also, volumes that are comprised of more than
one subdisk will not be mirrored.
Mirroring volumes from the boot disk will produce a disk that
can be used as an alternate boot disk.
At the prompt below, supply the name of the disk containing the
volumes to be mirrored.
Enter disk name [,list,q,?] list
Enter disk name [,list,q,?] rootdisk
Enter destination disk [,list,q,?] (default: any) rootmirror
Continue with operation? [y,n,q,?] (default: y) y
VxVM vxmirror INFO V-5-2-22 Mirror volume swapvol ...
VxVM vxmirror INFO V-5-2-22 Mirror volume rootvol ...
VxVM INFO V-5-2-674 Mirroring of disk rootdisk is complete.
Mirror volumes on another disk? [y,n,q,?] (default: n)n
root@mysrv1 #
root@mysrv1 #
#############################################
Now whenever we want to unencapsulate the disk, it is too simple and can achieved by a single command.
root@mysrv1 #
root@mysrv1 # vxunroot
VxVM vxunroot NOTICE V-5-2-1564
This operation will convert the following file systems from
volumes to regular partitions:
rootvol swapvol
VxVM vxunroot INFO V-5-2-2011
Replacing volumes in root disk to partitions will require a system
reboot. If you choose to continue with this operation, system
configuration will be updated to discontinue use of the volume
manager for your root and swap devices.
Do you wish to do this now [y,n,q,?] (default: y)
VxVM vxunroot INFO V-5-2-287 Restoring kernel configuration...
VxVM vxunroot INFO V-5-2-78
A shutdown is now required to install the new kernel.
You can choose to shutdown now, or you can shutdown later, at your
convenience.
Do you wish to shutdown now [y,n,q,?] (default: n)
VxVM vxunroot INFO V-5-2-258
Please shutdown before you perform any additional volume manager
or disk reconfiguration. To shutdown your system cd to / and type
shutdown -g0 -y -i6
root@mysrv1 #
root@mysrv1 #
root@mysrv1 # reboot -- -v --------- Now just a reboot to reflect this....
login as: root
Using keyboard-interactive authentication.
Password:
Last login: Fri Aug 22 12:09:00 2014 from 10.20.10.50
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
You have new mail.
Sourcing //.profile-EIS.....
root@mysrv1 #
We unencapsulated our rootdisk and so we brought our rootdisk back to c#t#d# format.
root@mysrv1 #
root@mysrv1 # df -kh
Filesystem size used avail capacity Mounted on
/dev/dsk/c1t0d0s0 30G 23G 6.2G 79% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 29G 1.7M 29G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
sharefs 0K 0K 0K 0% /etc/dfs/sharetab
/platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap2.so.1
30G 23G 6.2G 79% /platform/sun4u-us3/lib/libc_psr.so.1
/platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap2.so.1
30G 23G 6.2G 79% /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1
fd 0K 0K 0K 0% /dev/fd
swap 29G 32K 29G 1% /tmp
swap 29G 40K 29G 1% /var/run
swap 29G 0K 29G 0% /dev/vx/dmp
swap 29G 0K 29G 0% /dev/vx/rdmp
root@mysrv1 #
root@mysrv1 # vxdg list -------- DG will be destroyed automatically
NAME STATE ID
root@mysrv1 #
root@mysrv1 # swap -l
swapfile dev swaplo blocks free
/dev/dsk/c1t0d0s1 118,9 16 33560432 33560432
root@mysrv1 #
No need edit the entries in vfstab manually...
Changes will be reflected in /etc/vfstab file automatically....
root@mysrv1 # cat /etc/vfstab
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c1t0d0s1 - - swap - no -
/dev/dsk/c1t0d0s0 /dev/rdsk/c1t0d0s0 / ufs 1 no -
/devices - /devices devfs - no -
sharefs - /etc/dfs/sharetab sharefs - no -
ctfs - /system/contract ctfs - no -
objfs - /system/object objfs - no -
swap - /tmp tmpfs - yes -
#/dev/dsk/c1t0d0s1 - - swap - no -
root@mysrv1 #
################################################################################
Similar to ufs we cannot grow or shrink rootvol and swapvol.We can encapsulate our rootdisk in sliced format and have to leave atleast 2 spare slices for public and private regions.
Now let's go with practical ,
root@mysrv1 #
root@mysrv1 # bash
root@mysrv1 #
root@mysrv1 # df -kh
Filesystem size used avail capacity Mounted on
/dev/dsk/c1t0d0s0 30G 23G 6.3G 79% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 29G 1.7M 29G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
sharefs 0K 0K 0K 0% /etc/dfs/sharetab
/platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap2.so.1
30G 23G 6.3G 79% /platform/sun4u-us3/lib/libc_psr.so.1
/platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap2.so.1
30G 23G 6.3G 79% /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1
fd 0K 0K 0K 0% /dev/fd
swap 29G 32K 29G 1% /tmp
swap 29G 40K 29G 1% /var/run
swap 29G 0K 29G 0% /dev/vx/dmp
swap 29G 0K 29G 0% /dev/vx/rdmp
root@mysrv1 #
From above output, we know that currently rootdisk is in normal c#t#d# format.
Let's check in /etc/vfstab also.....
root@mysrv1 # cat /etc/vfstab
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c1t0d0s1 - - swap - no -
/dev/dsk/c1t0d0s0 /dev/rdsk/c1t0d0s0 / ufs 1 no -
/devices - /devices devfs - no -
sharefs - /etc/dfs/sharetab sharefs - no -
ctfs - /system/contract ctfs - no -
objfs - /system/object objfs - no -
swap - /tmp tmpfs - yes -
#/dev/dsk/c1t0d0s1 - - swap - no -
root@mysrv1 #
Now we can proceed with our steps for encapsulation.....
root@mysrv1 # vxdiskadm
Volume Manager Support Operations
Menu: VolumeManager/Disk
1 Add or initialize one or more disks
2 Encapsulate one or more disks
3 Remove a disk
4 Remove a disk for replacement
5 Replace a failed or removed disk
6 Mirror volumes on a disk
7 Move volumes from a disk
8 Enable access to (import) a disk group
9 Remove access to (deport) a disk group
10 Enable (online) a disk device
11 Disable (offline) a disk device
12 Mark a disk as a spare for a disk group
13 Turn off the spare flag on a disk
14 Unrelocate subdisks back to a disk
15 Exclude a disk from hot-relocation use
16 Make a disk available for hot-relocation use
17 Prevent multipathing/Suppress devices from VxVM's view
18 Allow multipathing/Unsuppress devices from VxVM's view
19 List currently suppressed/non-multipathed devices
20 Change the disk naming scheme
21 Get the newly connected/zoned disks in VxVM view
22 Change/Display the default disk layouts
23 Mark a disk as allocator-reserved for a disk group
24 Turn off the allocator-reserved flag on a disk
list List disk information
? Display help about menu
?? Display help about the menuing system
q Exit from menus
Select an operation to perform: 2
Encapsulate one or more disks
Menu: VolumeManager/Disk/Encapsulate
Use this operation to convert one or more disks to use the Volume Manager.
This adds the disks to a disk group and replaces existing partitions
with volumes. Disk encapsulation requires a reboot for the changes
to take effect.
More than one disk or pattern may be entered at the prompt. Here are
some disk selection examples:
all: all disks
c3 c4t2: all disks on both controller 3 and controller 4, target 2
c3t4d2: a single disk (in the c#t#d# naming scheme)
xyz_0 : a single disk (in the enclosure based naming scheme)
xyz_ : all disks on the enclosure whose name is xyz
Select disk devices to encapsulate:
[<pattern-list>,all,list,q,?] list
DEVICE DISK GROUP STATUS
c1t0d0 - - online invalid
c1t1d0 - - error
Select disk devices to encapsulate:
[<pattern-list>,all,list,q,?] c1t0d0
Here is the disk selected. Output format: [Device_Name]
c1t0d0
Continue operation? [y,n,q,?] (default: y)
You can choose to add this disk to an existing disk group or to
a new disk group. To create a new disk group, select a disk group
name that does not yet exist.
Which disk group [<group>,list,q,?] rootdg
Create a new group named rootdg? [y,n,q,?] (default: y)
Use a default disk name for the disk? [y,n,q,?] (default: y)
A new disk group will be created named rootdg and the selected
disks will be encapsulated and added to this disk group with
default disk names.
c1t0d0
Continue with operation? [y,n,q,?] (default: y)
The following disk has been selected for encapsulation.
Output format: [Device_Name]
c1t0d0
Continue with encapsulation? [y,n,q,?] (default: y)
A new disk group rootdg will be created and the disk device c1t0d0 will
be encapsulated and added to the disk group with the disk name rootdg01.
Enter desired private region length
[<privlen>,q,?] (default: 65536)
The c1t0d0 disk has been configured for encapsulation.
The first stage of encapsulation has completed successfully. You
should now reboot your system at the earliest possible opportunity.
The encapsulation will require two or three reboots which will happen
automatically after the next reboot. To reboot execute the command:
shutdown -g0 -y -i6
This will update the /etc/vfstab file so that volume devices are
used to mount the file systems on this disk device. You will need
to update any other references such as backup scripts, databases,
or manually created swap devices.
Encapsulate other disks? [y,n,q,?] (default: n)
Volume Manager Support Operations
Menu: VolumeManager/Disk
1 Add or initialize one or more disks
2 Encapsulate one or more disks
3 Remove a disk
4 Remove a disk for replacement
5 Replace a failed or removed disk
6 Mirror volumes on a disk
7 Move volumes from a disk
8 Enable access to (import) a disk group
9 Remove access to (deport) a disk group
10 Enable (online) a disk device
11 Disable (offline) a disk device
12 Mark a disk as a spare for a disk group
13 Turn off the spare flag on a disk
14 Unrelocate subdisks back to a disk
15 Exclude a disk from hot-relocation use
16 Make a disk available for hot-relocation use
17 Prevent multipathing/Suppress devices from VxVM's view
18 Allow multipathing/Unsuppress devices from VxVM's view
19 List currently suppressed/non-multipathed devices
20 Change the disk naming scheme
21 Get the newly connected/zoned disks in VxVM view
22 Change/Display the default disk layouts
23 Mark a disk as allocator-reserved for a disk group
24 Turn off the allocator-reserved flag on a disk
list List disk information
? Display help about menu
?? Display help about the menuing system
q Exit from menus
Select an operation to perform: q
Goodbye.
root@mysrv1 #
root@mysrv1 #
By this we performed veritas encapsulation on our rootdisk....A reboot is needed to reflect these changes.
root@mysrv1 #
root@mysrv1 # reboot -- -v
login as: root
Using keyboard-interactive authentication.
Password:
Access denied
Using keyboard-interactive authentication.
Password:
Last login: Fri Aug 22 11:49:35 2014 from 10.20.10.50
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
You have new mail.
Sourcing //.profile-EIS.....
root@mysrv1 #
root@mysrv1 #
We successfully rebooted after encapsulating the rootdisk, now observe the changes.....
root@mysrv1 #
root@mysrv1 # df -kh
Filesystem size used avail capacity Mounted on
/dev/vx/dsk/bootdg/rootvol
30G 23G 6.3G 79% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 29G 1.6M 29G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
sharefs 0K 0K 0K 0% /etc/dfs/sharetab
/platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap2.so.1
30G 23G 6.3G 79% /platform/sun4u-us3/lib/libc_psr.so.1
/platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap2.so.1
30G 23G 6.3G 79% /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1
fd 0K 0K 0K 0% /dev/fd
swap 29G 40K 29G 1% /tmp
swap 29G 40K 29G 1% /var/run
swap 29G 0K 29G 0% /dev/vx/dmp
swap 29G 0K 29G 0% /dev/vx/rdmp
root@mysrv1 #
root@mysrv1 #
root@mysrv1 # cat /etc/vfstab
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/vx/dsk/bootdg/swapvol - - swap - no -
/dev/vx/dsk/bootdg/rootvol /dev/vx/rdsk/bootdg/rootvol / ufs 1 no -
/devices - /devices devfs - no -
sharefs - /etc/dfs/sharetab sharefs - no -
ctfs - /system/contract ctfs - no -
objfs - /system/object objfs - no -
swap - /tmp tmpfs - yes -
#/dev/dsk/c1t0d0s1 - - swap - no -
#NOTE: volume rootvol (/) encapsulated partition c1t0d0s0
#NOTE: volume swapvol (swap) encapsulated partition c1t0d0s1
root@mysrv1 #
root@mysrv1 # swap -l
swapfile dev swaplo blocks free
/dev/vx/dsk/bootdg/swapvol 323,26000 16 33560432 33560432
root@mysrv1 #
root@mysrv1 #
root@mysrv1 # vxdg list
NAME STATE ID
rootdg enabled 1408688804.6.mysrv1
root@mysrv1 #
root@mysrv1 #
root@mysrv1 # vxprint -ht
Disk group: rootdg
dg rootdg default default 26000 1408688804.6.mysrv1
dm rootdg01 c1t0d0s2 auto 81407 286617216 -
v rootvol - ENABLED ACTIVE 62928384 ROUND - root
pl rootvol-01 rootvol ENABLED ACTIVE 62928384 CONCAT - RW
sd rootdg01-B0 rootvol-01 rootdg01 286617215 1 0 c1t0d0 ENA
sd rootdg01-02 rootvol-01 rootdg01 0 62928383 1 c1t0d0 ENA
v swapvol - ENABLED ACTIVE 33560448 ROUND - swap
pl swapvol-01 swapvol ENABLED ACTIVE 33560448 CONCAT - RW
sd rootdg01-01 swapvol-01 rootdg01 62928383 33560448 0 c1t0d0 ENA
root@mysrv1 #
#############################################
Similarly if we want to achieve mirroring for rootvol, simply we need to add the 2nd disk to our diskgroup "rootdg".
# vxdisksetup -i c1t1d0 format=sliced
# vxdg -g rootdg adddisk rootmirror=c1t1d0
# vxdiskadm
...... output truncated ....
-----
-----
4 Remove a disk for replacement
5 Replace a failed or removed disk
6 Mirror volumes on a disk
7 Move volumes from a disk
-----
-----
Select an operation to perform: 6
Mirror volumes on a disk
Menu: VolumeManager/Disk/Mirror
This operation can be used to mirror volumes on a disk. These
volumes can be be mirrored onto another disk or onto any
available disk space. Volumes will not be mirrored if they are
already mirrored. Also, volumes that are comprised of more than
one subdisk will not be mirrored.
Mirroring volumes from the boot disk will produce a disk that
can be used as an alternate boot disk.
At the prompt below, supply the name of the disk containing the
volumes to be mirrored.
Enter disk name [,list,q,?] list
Enter disk name [,list,q,?] rootdisk
Enter destination disk [,list,q,?] (default: any) rootmirror
Continue with operation? [y,n,q,?] (default: y) y
VxVM vxmirror INFO V-5-2-22 Mirror volume swapvol ...
VxVM vxmirror INFO V-5-2-22 Mirror volume rootvol ...
VxVM INFO V-5-2-674 Mirroring of disk rootdisk is complete.
Mirror volumes on another disk? [y,n,q,?] (default: n)n
root@mysrv1 #
root@mysrv1 #
#############################################
Now whenever we want to unencapsulate the disk, it is too simple and can achieved by a single command.
root@mysrv1 #
root@mysrv1 # vxunroot
VxVM vxunroot NOTICE V-5-2-1564
This operation will convert the following file systems from
volumes to regular partitions:
rootvol swapvol
VxVM vxunroot INFO V-5-2-2011
Replacing volumes in root disk to partitions will require a system
reboot. If you choose to continue with this operation, system
configuration will be updated to discontinue use of the volume
manager for your root and swap devices.
Do you wish to do this now [y,n,q,?] (default: y)
VxVM vxunroot INFO V-5-2-287 Restoring kernel configuration...
VxVM vxunroot INFO V-5-2-78
A shutdown is now required to install the new kernel.
You can choose to shutdown now, or you can shutdown later, at your
convenience.
Do you wish to shutdown now [y,n,q,?] (default: n)
VxVM vxunroot INFO V-5-2-258
Please shutdown before you perform any additional volume manager
or disk reconfiguration. To shutdown your system cd to / and type
shutdown -g0 -y -i6
root@mysrv1 #
root@mysrv1 #
root@mysrv1 # reboot -- -v --------- Now just a reboot to reflect this....
login as: root
Using keyboard-interactive authentication.
Password:
Last login: Fri Aug 22 12:09:00 2014 from 10.20.10.50
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
You have new mail.
Sourcing //.profile-EIS.....
root@mysrv1 #
We unencapsulated our rootdisk and so we brought our rootdisk back to c#t#d# format.
root@mysrv1 #
root@mysrv1 # df -kh
Filesystem size used avail capacity Mounted on
/dev/dsk/c1t0d0s0 30G 23G 6.2G 79% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 29G 1.7M 29G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
sharefs 0K 0K 0K 0% /etc/dfs/sharetab
/platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap2.so.1
30G 23G 6.2G 79% /platform/sun4u-us3/lib/libc_psr.so.1
/platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap2.so.1
30G 23G 6.2G 79% /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1
fd 0K 0K 0K 0% /dev/fd
swap 29G 32K 29G 1% /tmp
swap 29G 40K 29G 1% /var/run
swap 29G 0K 29G 0% /dev/vx/dmp
swap 29G 0K 29G 0% /dev/vx/rdmp
root@mysrv1 #
root@mysrv1 # vxdg list -------- DG will be destroyed automatically
NAME STATE ID
root@mysrv1 #
root@mysrv1 # swap -l
swapfile dev swaplo blocks free
/dev/dsk/c1t0d0s1 118,9 16 33560432 33560432
root@mysrv1 #
No need edit the entries in vfstab manually...
Changes will be reflected in /etc/vfstab file automatically....
root@mysrv1 # cat /etc/vfstab
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c1t0d0s1 - - swap - no -
/dev/dsk/c1t0d0s0 /dev/rdsk/c1t0d0s0 / ufs 1 no -
/devices - /devices devfs - no -
sharefs - /etc/dfs/sharetab sharefs - no -
ctfs - /system/contract ctfs - no -
objfs - /system/object objfs - no -
swap - /tmp tmpfs - yes -
#/dev/dsk/c1t0d0s1 - - swap - no -
root@mysrv1 #
################################################################################