Creating a Dynamic (Shared) Volume
To create a dynamic volume, on the CVM master node
-
Right-click a dynamic disk group in the tree view of the VEA right pane and select New Volume from the context menu. The Create Volume wizard appears.
You can also select the command from the Actions menu or click the New Volume tool on the toolbar (the third tool from the left side of the toolbar).
Note
The Activation Mode must be set to SW (shared write).
-
Click Next to continue. The screen for selecting attributes comes up. Enter a Group name for the volume from the pull-down list.
-
Type in the Volume Name. This is a Volume Manager-specific name that is used in some Volume Manager commands. It is different from the volume label for the file system.
-
Specify the volume size, or select Maxsize. The Maxsize button works differently, depending on whether a disk is selected.
If you do not have a disk selected when you start the Create Volume wizard, no figure displays in the volume size box. If you then click on a volume type and also click the Maxsize button, a size appears in the volume size box that represents the maximum volume for that layout for all disks in the dynamic group.
If you do have a disk selected when you start the Create Volume wizard, a size is shown in the volume size box that represents the maximum concatenated (simple or spanned) volume size on the selected disk. If you then click the Maxsize button, a new number appears in the volume size box that represents the maximum size for a spanned volume that spans all the disks in the dynamic group. You can also click another volume layout and then click the Maxsize button to get the maximum size for that layout that involves unallocated space on all disks in the dynamic group.
-
Select the Concatenated volume type.
Note
You can choose any type for shared volumes except RAID-5.
Click the thumbnail above to view full-sized image.
-
Select one or more shared disks in the Select disks to use for volume screen.
The default setting is for Volume Manager to assign the disks for you. To manually select the disks, click the Manually select disks to create volume radio button. If you select disks manually, the disks that you select will be displayed in the right pane when you click Next.
-
You can create a file system at this time by clicking the Cluster Mount box under Mount File System Details.
-
Check your selections in the final screen and click Finish to create the volume. By clicking the Previous button, you can go back and make changes before you click Finish.
Notes
|
---|
Deleting a volume using VEA does not remove the CFS entries from the main.cf configuration file for that volume. After deleting a volume using VEA, select the file system and Remove Cluster Mount.
The main.cf configuration file is not updated when VEA is used to change volume or disk group names using the Rename and Disk Group Split and Join actions.
If you select disks manually, you can specify that the volume is to be mirrored or striped across controllers, trays, targets, or enclosures. You can also select ordered allocation. Ordered allocation uses the specified storage to first concatenate disks, then to form columns, and finally to form mirrors.
| |
|
Concatenated
A concatenated volume consists of one or more regions of the specified disks. You have the option of placing a file system on the new volume or mirroring the volume. You can create a regular concatenated volume or a concatenated pro volume. A concatenated pro volume is layered and mirrored.
Layout:
|
Choose Concatenated or Concatenated Pro for the volume layout.
|
Options:
| - To mirror the volume, select Mirrored. In the Total Number of Mirrors field, enter the total number of mirrors for the volume.
Note Concatenated pro volumes are mirrored by default.
- To enable logging for a mirrored volume, select Enable Logging.
- To place a cluster file system on the volume, click Mount File System Detail, specify the VxFS file system type, and add the name of the cluster mount.
- To clear the volume before enabling it for general use, select Initialize Zero.
- To prevent the creation of a layered volume, select No Layered Volumes. In cases where a layered volume layout is appropriate, VxVM can create a layered volume when a non-layered layout is specified. This option ensures that the volume has a non-layered layout. If a layered (Pro) layout is selected, this option is ignored.
|
Notes
|
---|
If no disks are assigned, VxVM uses available space on disks in the selected disk group.
The data in a concatenated volume is not protected against disk failure unless the volume is mirrored. At least one additional disk is required to mirror a concatenated volume.
Concatenated pro volumes are mirrored by default, so a concatenated pro volume requires more disks than an unmirrored concatenated volume.
You cannot use a concatenated pro volume for a root volume.
You cannot use a concatenated pro volume for a swap volume.
| |
|
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
Creating a Shared Volume from the Command Line
Create a shared volume on the CVM master. In this example, the volume is 20 MB in size:
# vxassist -g cfsdg make vol1 20M
Activate the shared disk group for shared write access on all nodes:
# vxdg -g cfsdg set activation=sw
Then check the configuration:
# vxprint
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
v vol1 fsgen ENABLED 40960 - ACTIVE - -
pl vol1 -01 vol1 ENABLED 41760 - ACTIVE - -
sd cfsdg vol1-01 ENABLED 41760 0 - - -
Creating a Cluster File System from the Command Line
On any cluster node, create a file system on the shared storage volume:
# mkfs -F vxfs /dev/vx/rdsk/cfsdg/vol1
If you do not specify size, the complete volume is used for the file system.
Mounting a Cluster File System in Shared Mode from the Command Line
To mount the file system on all nodes in the cluster, enter.
# cfsmntadm add cfsdg vol1 /mnt all=rw
# cfsmount /mnt
See the cfsmount(1M) and cfsmntadm(1M) for information on adding and mounting a shared file system.
|