 |
» |
|
|
 |
In addition to configuring the cluster, you create the appropriate
logical volume infrastructure to provide access to data from different
nodes. This is done with Logical Volume Manager (LVM), VERITAS Volume Manager
(VxVM), or VERITAS Cluster Volume Manager (CVM). You can also use
a mixture of volume types, depending on your needs. LVM and VxVM
configuration are done before cluster configuration, and CVM configuration
is done after cluster configuration. This section has information about configuring a cluster that
uses the VERITAS cluster file system (CFS) with VERITAS cluster
volume manager (CVM) 4.1. The next section (“Creating
the Storage Infrastructure and Filesystems with VERITAS Cluster
Volume Manager (CVM)”) has information about configuring the
VERITAS Cluster Volume Manager (CVM) with other filesystems, not
CFS. Both solutions use many of the same commands, but the processes
are in a slightly different order. Another difference is that when
you use CFS, Serviceguard creates packages to manage the disk groups
and mount points so you do not activate CFS disk groups or CFS mount
points in your application packages. Refer to the Serviceguard man pages for more information about
the commands cfscluster, cfsdgadm, cfsmntadm, cfsmount and cfsumount and cmgetpkgenv. Information is also in the documentation for HP Serviceguard
Storage Management Suite posted at http:// docs.hp.com. Preparing
the Cluster and the System Multi-node Package |  |
First, be sure the cluster is running: # cmviewcl If it is not, start it: # cmruncl If you have not initialized your disk groups, or
if you have an old install that needs to be re-initialized, use
the vxinstall command to initialize VxVM/CVM disk groups. “Initializing
the VERITAS Volume Manager ”. The VERITAS cluster volumes
are managed by a Serviceguard-supplied system multi-node
package which runs on all nodes at once, and cannot
failover. In CVM 4.1, which is required for the Cluster File System,
Serviceguard supplies the SG-CFS-pkg template. (In CVM 3.5, Serviceguard supplies the VxVM-CVM-pkg template) The CVM 4.1 package has the following responsibilities: Maintain VERITAS configuration files /etc/llttab, /etc/llthosts, /etc/gabtab Launch required services: cmvxd, cmvxpingd, vxfsckd Start/halt VERITAS processes in the proper order: llt, gab, vxfen, odm, cvm, cfs
 |  |  |  |  | NOTE: Do not edit system multi-node package configuration
files, such as VxVM-CVM-pkg.conf and SG-CFS-pkg.conf. Create and modify configuration using the cfs admin commands listed in Appendix A. |  |  |  |  |
Activate the SG-CFS-pkg and start up CVM with the cfscluster command; this creates SG-CFS-pkg, and also starts it. This example, for the cluster file system, uses a timeout
of 900 seconds; if your CFS cluster has many disk groups and/or
disk LUNs visible to the cluster nodes, you may need to a longer
timeout value. Use the -s option to start the CVM package in shared mode: # cfscluster config -t 900 -s Verify the system multi-node package is running
and CVM is up, using the cmviewcl or cfscluster command. Following is an example of using the cfscluster command. In the last line, you can see that CVM is up,
and that the mount point is not yet configured: # cfscluster status Node : ftsys9 Cluster Manager : up CVM state : up (MASTER) MOUNT POINT TYPE SHARED VOLUME DISK GROUP STATUS Node : ftsys10 Cluster Manager : up CVM state : up MOUNT POINT TYPE SHARED VOLUME DISK GROUP STATUS
|
 |  |  |  |  | NOTE: Because the CVM 4.1 system multi-node package automatically
starts up the VERITAS processess, do not edit
these files: /etc/llthosts /etc/llttab /etc/gabtab |  |  |  |  |
Creating
the Disk Groups |  |
Initialize the disk group from the master node. Find the master node using vxdctl or cfscluster status Initialize a new disk group, or import an existing
disk group, in shared mode, using the vxdg command. For a new disk
group use the init option: # vxdg -s init logdata c4t0d6 For an existing disk group,
use the import option: # vxdg -C -s import logdata
Verify the disk group. The state should be enabled
and shared: # vxdg list NAME STATE ID logdata enabled, shared, cds 11192287592.39.ftsys9 |
 |  |  |  |  | NOTE: If you want to create a cluster with CVM only - without
CFS, stop here. Then, in your application package’s configuration
file, add the dependency triplet, with DEPENDENCY_CONDITION set
to SG-DG-pkg-id#=UP and LOCATION set to SAME_NODE. For more information
about the DEPENDENCY parameter, see “Package
Configuration File Parameters ”. |  |  |  |  |
Creating
the Disk Group Cluster Packages |  |
Use the cfsdgadm command to create the package SG-CFS-DG-ID#, where ID# is an automatically incremented number, assigned
by Serviceguard when it creates the package. In this example, the SG-CFS-DG-ID# package will be generated to control the disk group logdata, in shared write mode: # cfsdgadm add logdata all=sw With VERITAS CFS, you can verify the package creation
with the cmviewcl command, or with the cfsdgadm display command. An example of cfsdgadm output is is shown below: #cfsdgadm display Node Name : ftsys9 (MASTER) DISK GROUP ACTIVATION MODE logdata off (sw) Node Name : ftsys10 DISK GROUP ACTIVATION MODE logdata off (sw) |
Activate the disk group and Start up the Package # cfsdgadm activate logdata To verify, you can use cfsdgadm or cmviewcl This example shows the cfsdgadm output: # cfsdgadm display -v logdata NODE NAME ACTIVATION MODE ftsys9 sw (sw) MOUNT POINT SHARED VOLUME TYPE ftsys10 sw (sw) MOUNT POINT SHARED VOLUME TYPE |
To view the package name that is monitoring a disk
group, use the cfsdgadm show_package command: # cfsdgadm show_package logdata
Creating
Volumes |  |
Make log_files volume on the logdata disk group: # vxassist -g logdata make log_files 1024m
Use the vxprint command to verify: # vxprint log_files disk group: logdata TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0 v log_files fsgen ENABLED 1048576 - ACTIVE - - pl log_files-01 fsgen ENABLED 1048576 - ACTIVE - - sd ct4t0d6-01 fsgen ENABLED 1048576 - ACTIVE - -
|
Create
a Filesystem and Mount Point Package |  |
Create a filesystem: # newfs -F vxfs /dev/vx/rdsk/logdata/log_files version 6 layout 1-048576 sectors, 1048576 blocks of size 1024, log size 16384 blocks largefiles supported |
Create the cluster mount point: # cfsmntadm add logdata log_files /tmp/logdata/log_files all=rw Package name “SG-CFS-MP-1” is generated to control the resource. |
You do not need to create the directory. The command creates
one on each of the nodes, during the mount.  |  |  |  |  | CAUTION: Once you create the disk group and mount point packages,
it is critical that you administer the cluster with the cfs commands, including cfsdgadm, cfsmntadm, cfsmount, and cfsumount. These non-cfs commands could cause conflicts with subsequent command operations
on the file system or Serviceguard packages. Use of these other
forms of mount will not create an appropriate multi-node package which
means that the cluster packages are not aware of the file system
changes. |  |  |  |  |
 |  |  |  |  | NOTE: Please note that the disk group and mount point multi-node packages
do not monitor the health of the disk group
and mount point. They check that the packages that depend on them
have access to the disk groups and mount points.
If the dependent application package loses access and cannot read
and write to the disk, it will fail; however that will not cause
the DG or MP multi-node package to fail. |  |  |  |  |
Verify with cmviewcl or cfsmntadm display. This example uses the cfsmntadm command: # cfsmntadm display Cluster Configuration for Node: ftsys9 MOUNT POINT TYPE SHARED VOLUME DISK GROUP STATUS /tmp/logdata/log_files regular log_files logdata NOT MOUNTED Cluster Configuration for Node: ftsys10 MOUNT POINT TYPE SHARED VOLUME DISK GROUP STATUS /tmp/logdata/log_files regular log_files logdata NOT MOUNTED |
Mount the filesystem: # cfsmount /tmp/logdata/log_files This starts up the multi-node package and mounts a cluster-wide filesystem. Verify that multi-node package is running and filesystem
is mounted: #cmviewcl CLUSTER STATUS cfs_cluster up NODE STATUS STATE ftsys9 up running ftsys10 up running MULTI_NODE_PACKAGES PACKAGE STATUS STATE AUTO_RUN SYSTEM SG-CFS-pkg up running enabled yes SG-CFS-DG-1 up running enabled no SG-CFS-MP-1 up running enabled no
|
# ftsys9/etc/cmcluster/cfs> bdf |
Filesystem kbytes used avail %used Mounted on /dev/vx/dsk/logdata/log_files 10485 17338 966793 2% tmp/logdata/log_files
|
# ftsys10/etc/cmcluster/cfs> bdf |
Filesystem kbytes used avail %used Mounted on /dev/vx/dsk/logdata/log_files 10485 17338 966793 2% tmp/logdata/log_files |
To view the package name that is monitoring a mount
point, use the cfsmntadm show_package command: # cfsmntadm show_package /tmp/logdata/log_files After creating your mount point packages for the
cluster file system, you can configure your application package
to depend on the mount points. In the ASCII configuration file,
specify the dependency triplet, specifying DEPENDENCY_CONDITION SG-mp-pkg-#=UP and DEPENDENCY_LOCATION SAME_NODE. For more information
about the DEPENDENCY parameter, see “Package
Configuration File Parameters ”.  |  |  |  |  | NOTE: Unlike LVM volume groups, CVM disk groups are not entered
in the cluster configuration file, they are
entered in the package configuration file only. |  |  |  |  |
Creating
Checkpoint and Snapshot Packages for CFS |  |
The storage checkpoints and snapshots are two additional mount
point package types. They can be associated with the cluster via
the cfsmntadm(1m) command. Mount
Point Packages for Storage CheckpointsThe VERITAS File System provides a unique storage checkpoint
facility which quickly creates a persistent image of a filesystem
at an exact point in time. Storage checkpoints significantly reduce
I/O overhead by identifying and maintaining only the filesystem
blocks that have changed since the last storage checkpoint or backup.
This is done by a copy-on-write technique. Unlike a disk-based mirroring
technology, which requires a separate storage space, this VERITAS
technology minimizes the use of disk space by creating a storage
checkpoint within the same free space available to the filesystem. For more information about the technique, see the VERITAS
File System Administrator’s Guide appropriate to your version
of CFS. posted at http://docs.hp.com. See “Online Backup.” The following example illustrates how to create a storage
checkpoint of the /cfs/mnt2 filesystem. Start with a cluster-mounted file system. Create a checkpoint of /tmp/logdata/log_files named check2. It is recommended that the file system already be part
of a mount point package that is mounted. # cfsmntadm display Cluster Configuration for Node: ftsys9 MOUNT POINT TYPE SHARED VOLUME DISK GROUP STATUS /tmp/logdata/log_files regular log_files logdata MOUNTED Cluster Configuration for Node: ftsys10 MOUNT POINT TYPE SHARED VOLUME DISK GROUP STATUS /tmp/logdata/log_files regular log_files logdata MOUNTED |
# fsckptadm -n create check2 /tmp/logdata/log_files Associate it with the cluster and mount it. # cfsmntadm add ckpt check2 /tmp/logdata/log_files \ /tmp/check_logfiles all=rw Package name "SG-CFS-CK-2" was generated to control the resource Mount point "/tmp/check_logfiles" was associated to the cluster |
# cfsmount /tmp/check_logfiles Verify. # cmviewcl CLUSTER STATUS cfs-cluster up NODE STATUS STATE ftsys9 up running ftsys10 up running MULTI_NODE_PACKAGES PACKAGE STATUS STATE AUTO_RUN SYSTEM SG-CFS-pkg up running enabled yes SG-CFS-DG-1 up running enabled no SG-CFS-MP-1 up running enabled no SG-CFS-CK-1 up running disabled no
|
/tmp/check_logfiles now contains a point in time view of /tmp/logdata/log_files, and it is persistent. # bdf Filesystem kbytes used avail %used Mounted on/dev/vg00/lvol3 544768 352240 180540 66% //dev/vg00/lvol1 307157 80196 196245 29% /stand/dev/vg00/lvol5 1101824 678124 398216 63% /var/dev/vg00/lvol7 2621440 1702848 861206 66% /usr/dev/vg00/lvol4 4096 707 3235 18% /tmp/dev/vg00/lvol6 2367488 1718101 608857 74% /opt/dev/vghome/varopt 4194304 258655 3689698 7% /var/opt/dev/vghome/home 2097152 17167 1949993 1% /home/tmp/logdata/log_files 102400 1898 94228 2% /tmp/logdata/log_files/tmp/logdata/log_files:check2 102400 1898 94228 2% /tmp/check_logfiles |
Mount
Point Packages for Snapshot ImagesA snapshot is a frozen image of an active file system that
does not change when the contents of target file system changes.
On cluster file systems, snapshots can be created on any node in
the cluster, and backup operations can be performed from that node.
The snapshot of a cluster file system is accessible only on the
node where it is created; the snapshot file system itself cannot
be cluster mounted. For details on creating snapshots on cluster file systems,
see the VERITAS Storage Foundation Cluster File System
Installation and Administration Guide posted at http://docs.hp.com:. The following example illustrates how to create a snapshot
of the /tmp/logdata/log_files file system. Create local storage on which to place
the snapshot. # vxdg init dg1 c4t1d0 # vxassist -g dg1 make vol1 100m # vxvol -g dg1 startall Associate it with the cluster. # cfsmntadm add snapshot dev=/dev/vx/dsk/dg1/vol1 \ /tmp/logdata/log_files /local/snap1 ftsys9=ro Package name SG-CFS-SN-1 was generated to control the resource. Mount
point /local/snap1 was associated to the cluster. # cfsmount /local/snap1 # cmviewcl CLUSTER STATUS cfs-cluster up NODE STATUS STATE ftsys9 up running ftsys10 up running MULTI_NODE_PACKAGES PACKAGE STATUS STATE AUTO_RUN SYSTEM SG-CFS-pkg up running enabled yes SG-CFS-DG-1 up running enabled no SG-CFS-MP-1 up running enabled no SG-CFS-SN-1 up running disabled no
| The snapshot file system /local/snap1 is now mounted and provides a point in time view of /tmp/logdata/log_files.# bdf Filesystem kbytes used avail %used Mounted on /dev/vg00/lvol3 544768 352233 180547 66% / /dev/vg00/lvol1 307157 80196 196245 29% /stand /dev/vg00/lvol5 1101824 678426 397916 63% /var /dev/vg00/lvol7 2621440 1702848 861206 66% /usr /dev/vg00/lvol4 4096 707 3235 18% /tmp /dev/vg00/lvol6 2367488 1718101 608857 74% /opt /dev/vghome/varopt 4194304 258609 3689741 7% /var/opt /dev/vghome/home 2097152 17167 1949993 1% /home /dev/vx/dsk/logdata/log_files 102400 1765 94353 2% /tmp/logdata/log_files /dev/vx/dsk/dg1/vol1 102400 1765 94346 2% /local/snap1 |
|