#!/bin/sh
# $Id: quiesce,v 2.1.6.1 2002/06/12 18:24:36 ptle Exp $
#ident "$Source: /project/vras-cvs/src/common/cmd/vras/samples/sample_vxfs_snapshot/quiesce,v $"
#
#
# Copyright (c) 2002 VERITAS Software Corporation.  ALL RIGHTS RESERVED.
#
# UNPUBLISHED -- RIGHTS RESERVED UNDER THE COPYRIGHT
# LAWS OF THE UNITED STATES.  USE OF A COPYRIGHT NOTICE
# IS PRECAUTIONARY ONLY AND DOES NOT IMPLY PUBLICATION
# OR DISCLOSURE.
#
# THIS SOFTWARE CONTAINS CONFIDENTIAL INFORMATION AND
# TRADE SECRETS OF VERITAS SOFTWARE.  USE, DISCLOSURE,
# OR REPRODUCTION IS PROHIBITED WITHOUT THE PRIOR
# EXPRESS WRITTEN PERMISSION OF VERITAS SOFTWARE.
#
#               RESTRICTED RIGHTS LEGEND
# USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT IS
# SUBJECT TO RESTRICTIONS AS SET FORTH IN SUBPARAGRAPH
# (C) (1) (ii) OF THE RIGHTS IN TECHNICAL DATA AND
# COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013.
#               VERITAS SOFTWARE
# 1600 PLYMOUTH STREET, MOUNTAIN VIEW, CA 94043
#

# --------------------------------------------------------------------
#
# quiesce
#
# This script is called when user runs vradmin ibc command with 
# "sample_vxfs_snapshot" as the taskname in the ibc command as follows:
#
#   vradmin -g <diskgroup> ibc <rvg_name> sample_vxfs_snapshot [<sechost>] ...
# 
# This script:
#   is executed by the vradmin ibc command on the Primary host
#   is used to make the Primary volumes consistent at application level
#   is given the following parameters in the listed orders:
#      DG_NAME     name of diskgroup in which the RVG resides.
#      RVG_NAME    name of the RVG.
#      TASK_NAME   the task name used in the ibc command line. In this
#                  sample, it is sample_vxfs_snapshot.
#      RLINK_LIST  space-seperated list of RLinks envolving in the ibc
#                  command of the Primary RVG.
#   must be executable by the root user
#   should exit with 0 upon successful completion
#
# Note: the parameters are always given by the vradmin ibc command.
# They are available for use in this script, and it's perfectly fine
# if they are not used anywhere in this script.
#
# --------------------------------------------------------------------


# --------------------------------------------------------------------
# main script starts here
# --------------------------------------------------------------------

DG_NAME=$1
RVG_NAME=$2
TASK_NAME=$3
shift 3
RLINK_LIST=$*

#
# Make the Primary volumes consistent at application level.
#
# In this case, since application using the Primary volumes is vxfs
# (VERITAS FileSystem), nothing needs to be done here. Before injecting
# the IBC message to the update stream, VVR ensures that the Primary
# volumes are consistent at application level.
#
# If you are running other type of filesystems, you might need to 
# freeze the file systems and then do a "sync" to flush the previously 
# unwritten file system buffers to the data volumes.
#

exit 0

