VERITAS Storage Foundation 4.1 Cluster File System HP Serviceguard Storage Management Suite Extracts, December 2005

Creating a Dynamic (Shared) Volume
38 Installation and Administration Guide
Command Line Examples
You can also create shared volumes, create shared disk groups, and mount cluster file
systems from the command line or using a script as shown in the examples below.
Creating a Shared Disk Group from the Command Line
You can use the following script to create a new shared disk group, for example, “cfsdg,”
and add the disks to it. Fill in the name of your shared disk group, shared_dg_name,
and the list of devices and controllers, shared_device_list. If you want to create more
disk groups, you must run this script for each.
#!/usr/bin/sh -x
#
export PATH=$PATH:/usr/sbin
#
# Name of the Shared disk group
#
shared_dg_name="cfsdg"
#
# List of shared devices to be part of the shared disk group
#
shared_device_list="c2t0d0 c2t1d0 c2t2d0 c2t3d0 c2t4d0
c1t6d0 c1t8d0 c3t4d0"
first="yes"
count=0
for i in $shared_device_list; do
/etc/vx/bin/vxdisksetup $i
vxdisk online $i
vxdisk -f init $i
count=‘expr $count + 1‘
if [ $first = "yes" ]; then
vxdg -s init $shared_dg_name $shared_dg_name$count=$i
first="no"
else
vxdg -g $shared_dg_name adddisk $shared_dg_name$count=$i
fi
done