Veritas File System 5.1 SP1 Administrator"s Guide (5900-1499, April 2011)

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.
Encapsulating a volume involves the following actions:
Adding the volume to an existing volume set.
Adding the volume to the file system using fsvoladm.
Encapsulating a volume
The following example illustrates how to encapsulate a volume.
To encapsulate a volume
1
List the volumes:
# vxvset -g dg1 list myvset
VOLUME INDEX LENGTH STATE CONTEXT
vol1 0 102400 ACTIVE -
vol2 1 102400 ACTIVE -
The volume set has two volumes.
2
Create a third volume and copy the passwd file to the third volume:
# vxassist -g dg1 make dbvol 100m
# dd if=/etc/passwd of=/dev/vx/rdsk/rootdg/dbvol count=1
1+0 records in
1+0 records out
The third volume will be used to demonstrate how the volume can be accessed
as a file, as shown later.
3
Create a file system on the volume set:
# mkfs -F vxfs /dev/vx/rdsk/rootdg/myvset
version 7 layout
204800 sectors, 102400 blocks of size 1024,
log size 1024 blocks
largefiles supported
4
Mount the volume set:
# mount -F vxfs /dev/vx/dsk/rootdg/myvset /mnt1
Multi-volume file systems
Volume encapsulation
98