Encapsulating a volume
| Article:HOWTO59507 | | | Created: 2011-10-13 | | | Updated: 2011-10-13 | | | Article URL http://www.symantec.com/docs/HOWTO59507 |
The following example illustrates how to encapsulate a volume.
To encapsulate a volume
# vxvset -g dg1 list myvset VOLUME INDEX LENGTH STATE CONTEXT vol1 0 102400 ACTIVE - vol2 1 102400 ACTIVE -
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.
Create a file system on the volume set:
# mkfs -V vxfs /dev/vx/rdsk/rootdg/myvset version 7 layout 204800 sectors, 102400 blocks of size 1024, log size 1024 blocks largefiles supported
# mkfs -F vxfs /dev/vx/rdsk/rootdg/myvset version 7 layout 204800 sectors, 102400 blocks of size 1024, log size 1024 blocks largefiles supported
# mkfs -t vxfs /dev/vx/rdsk/rootdg/myvset version 7 layout 204800 sectors, 102400 blocks of size 1024, log size 1024 blocks largefiles supported
# mount -V vxfs /dev/vx/dsk/rootdg/myvset /mnt1
# mount -F vxfs /dev/vx/dsk/rootdg/myvset /mnt1
# mount -t vxfs /dev/vx/dsk/rootdg/myvset /mnt1
# mount -F vxfs /dev/vx/dsk/rootdg/myvset /mnt1
Add the new volume to the volume set:
# vxvset -g dg1 addvol myvset dbvol
# fsvoladm encapsulate /mnt1/dbfile dbvol 100m # ls -l /mnt1/dbfile -rw------- 1 root other 104857600 May 22 11:30 /mnt1/dbfile
Examine the contents of
dbfileto see that it can be accessed as a file:# head -2 /mnt1/dbfile root:x:0:1:Super-User:/:/sbin/sh daemon:x:1:1::/:
The passwd file that was written to the raw volume is now visible in the new file.
|
|
Legacy ID
uxrt-51sp1_v40221843_v63475671
Article URL http://www.symantec.com/docs/HOWTO59507
Terms of use for this information are found in Legal Notices









Thank you.