VERITAS File System 4.1 Administrator's Guide

Multi-Volume File Systems
Volume Encapsulation
Chapter 9 147
Volume Encapsulation
Multi-volume support enables the ability to encapsulate an existing raw volume and make the
volume contents appear as a file in the file system. There are two steps required to achieve
this:
Add the volume to an existing volume set.
Add the volume to the file system using fsvoladm.
As an example:
Assume that the following volume set and new volume exist. The vxvset list command
gives you the following output:
# vxvset list myvset
VOLUME INDEX LENGTH STATE CONTEXT
vol1 0 102400 ACTIVE -
vol2 1 102400 ACTIVE -
The volume set has two volumes. Create a third volume as part of the passwd file and write it
to the volume.This is to demonstrate how you can access the volume as a file as shown below:
# vxassist make dbvol 100m
# dd if=/etc/passwd of=/dev/vx/rdsk/rootdg/dbvol count=1
1+0 records in
1+0 records out
Create a file system on the volume set and mount it. The new volume is added to the volume
set:
# mkfs -F vxfs /dev/vx/rdsk/rootdg/myvset
version 6 layout
204800 sectors, 102400 blocks of size 1024, log size 1024 blocks
largefiles not supported
# mount -F vxfs /dev/vx/dsk/rootdg/myvset /mnt1
# vxvset addvol myvset dbvol
The final step is to call fsvoladm to perform the encapsulation:
# fsvoladm encapsulate /mnt1/dbfile dbvol 100m