How to create a storage checkpoint on a clustered (shared) file system

book

Article ID: 100016135

calendar_today

Updated On:

Resolution

To generate the storage checkpoint:

1. Confirm that a valid license exists:

# /sbin/vxlictest -n "VERITAS FlashSnap" -f "VXCKPT#VERITAS File System"
VXCKPT#VERITAS File System feature is licensed

VERITAS Storage Checkpoint is also licensed only with VERITAS Edition products.

2. Ensure that a shared disk group (sharedg),  which contains an unmounted  volume (vol01) with a VERITAS File System (tm) file system, and the VERITAS Cluster Volume Manager service group exist as part of the cluster environment:

# vxprint -htg sharedg
DG NAME         NCONFIG      NLOG     MINORS   GROUP-ID
DM NAME         DEVICE       TYPE     PRIVLEN  PUBLEN   STATE
V  NAME         RVG          KSTATE   STATE    LENGTH   READPOL   PREFPLEX UTYPE
PL NAME         VOLUME       KSTATE   STATE    LENGTH   LAYOUT    NCOL/WID MODE
SD NAME         PLEX         DISK     DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE

dg sharedg      default      default  15000    1065851423.1117.munchee
dm shardg01     c1t10d0s2    sliced   3791     17914356 -

v  vol01        -            ENABLED  ACTIVE   2097152  SELECT    -        fsgen
pl vol01-01     vol01        ENABLED  ACTIVE   2097924  CONCAT    -        RW
sd shardg01-01  vol01-01     shardg01 0        2097924  0         c1t10d0  ENA

# vxdisk -o alldgs list
DEVICE       TYPE      DISK         GROUP        STATUS
c0t0d0s4     sliced    rootdg       rootdg       online
c1t10d0s2    sliced    shardg01     sharedg      online shared

# fstyp /dev/vx/rdsk/sharedg/vol01
vxfs

# df -kl
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c0t0d0s0    4031320 1166325 2824682    30%    /
/dev/dsk/c0t0d0s3    1984458 1418186  506739    74%    /var
swap                  620264   23176  597088     4%    /tmp

# cat  /etc/VRTSvcs/conf/config/main.cf
include "types.cf"
include "CFSTypes.cf"
include "CVMTypes.cf"

cluster foxtel (
       UserNames = { admin = "cDRpdxPmHpzS." }
       Administrators = { admin }
       CounterInterval = 5
       )
system anurag (
       )
system munchee (
       )
group cvm (
       SystemList = { anurag = 0, munchee = 1 }
       AutoFailOver = 0
       Parallel = 1
       AutoStartList = { anurag, munchee }
       )
       CFSQlogckd qlogckd (
               Critical = 0
               )

       CFSfsckd vxfsckd (
               ActivationMode @anurag = { sharedg = sw }
               ActivationMode @munchee = { sharedg = sw }
               )

       CVMCluster cvm_clus (
               Critical = 0
               CVMClustName = foxtel
               CVMNodeId = { anurag = 0, munchee = 1 }
               CVMTransport = gab
               CVMTimeout = 300
               )

       vxfsckd requires qlogckd

Note: The Cluster Volume Manager service group  can be generated using  /opt/VRTS/bin/cfscluster config.

# hastatus -sum

-- SYSTEM STATE
-- System               State                Frozen

A  anurag               RUNNING              0
A  munchee              RUNNING              0

-- GROUP STATE
-- Group           System               Probed     AutoDisabled   State
B  cvm             anurag               Y           N             ONLINE
B  cvm             munchee              Y           N             ONLINE

Once you have confirmed the above requirements, the following steps can be used to generate a storage checkpoint.

1.Create a mount point for vol01 ( /mnt1 ) and vol01 storage checkpoint ( /mntckpt1 ) on both nodes:

      anurag#  mkdir /mnt1  /mntckpt1
      munchee#  mkdir  /mnt1  /mntckpt1

2..Add a shared volume (clustered file system) to the cluster by associating it with the mount point on the specified nodes:  

# /opt/VRTS/bin/cfsmntadm add sharedg vol01 /mnt1 cfs_sg anurag=cluster munchee=cluster
 Mount Point is being added...
 /mnt1 added to the cluster-configuration

The  cfsmntadm add adds this information to the cluster configuration and updates the main.cf file to include the following entries:

group cfs_sg  (
       SystemList = { anurag = 0, munchee = 1 }
       AutoFailOver = 0
       Parallel = 1
       AutoStartList = { anurag, munchee }
       )

       CFSMount cfsmount1 (
               Critical = 0
               MountPoint = "/mnt1"
               BlockDevice = "/dev/vx/dsk/sharedg/vol01"
               MountOpt @anurag = "cluster"
               MountOpt @munchee = "cluster"
               NodeList = { anurag, munchee }
               )

       CVMVolDg cvmvoldg1 (
               Critical = 0
               CVMDiskGroup = sharedg
               CVMActivation @anurag = sw
               CVMActivation @munchee = sw
               )

       requires group cvm online local firm
       cfsmount1 requires cvmvoldg1

3. Check the status of the mount = /mnt1 (not mounted) and service group = cfs_sg (state=partial):

#/opt/VRTS/bin/cfsmntadm display -v anurag

Cluster Configuration for Node: anurag
MOUNT POINT    TYPE       SHARED VOLUME     DISK GROUP   STATUS       MOUNTOPTIONS  
/mnt1        Regular      vol01             sharedg     NOT MOUNTED     cluster

# hastatus -sum

-- SYSTEM STATE
-- System               State                Frozen
A  anurag               RUNNING              0
A  munchee              RUNNING              0

-- GROUP STATE
-- Group           System               Probed     AutoDisabled    State

B  cfs_sg          anurag               Y          N               PARTIAL
B  cfs_sg          munchee              Y          N               PARTIAL
B  cvm             anurag               Y          N               ONLINE
B  cvm             munchee              Y          N               ONLINE


4. Using cfsmount, mount a shared volume associated with a mount point as specified by the cfs_sg and check the status:

# /opt/VRTS/bin/cfsmount /mnt1
Mounting...
 [/dev/vx/dsk/sharedg/vol01] mounted successfully at /mnt1 on anurag
 [/dev/vx/dsk/sharedg/vol01] mounted successfully at /mnt1 on munchee

# /opt/VRTS/bin/cfsmntadm display -v /mnt1
 Mount Point   : /mnt1
 Shared Volume : vol01
 Disk Group    : sharedg

 Primary Node:   anurag
 Primary Election Policy:
 Dependent Checkpoints or Snapshots:

 NODE NAME      STATUS            MOUNT OPTIONS
  anurag        MOUNTED           cluster
  munchee       MOUNTED           cluster

# df -kl

Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c0t0d0s0    4031320 1166330 2824677    30%    /
/proc                      0       0       0     0%    /proc
swap                  615896   23192  592704     4%    /tmp
/dev/vx/dsk/sharedg/vol01
                    1048576   16753  967342     2%    /mnt1

# hastatus -sum

-- SYSTEM STATE
-- System               State                Frozen

A  anurag               RUNNING              0
A  munchee              RUNNING              0

-- GROUP STATE
-- Group           System               Probed     AutoDisabled    State

B  cfs_sg          anurag               Y          N               ONLINE
B  cfs-sg          munchee              Y          N               ONLINE
B  cvm             anurag               Y          N               ONLINE
B  cvm             munchee              Y          N               ONLINE

Steps 1 to 4 are to ensure that you have a valid cluster file system ready for creating a storage checkpoint, and can be omitted.

5.Using cfsmntadm add ckpt, add  a storage checkpoint mount instance to the cluster configuration and set up a dependency between the storage checkpoint  instance and  the parent instance. The parent mount instance must exist at the time the storage checkpoint instance is created.
Note:  "cfsmntadm"  does not create the storage checkpoint.

# /opt/VRTS/bin/cfsmntadm add ckpt vol01ckpt /mnt1 /mnt1ckpt cfs_sg all=rw anurag munchee
Mount Point is being added...
/mnt1ckpt added to the cluster-configuration

As a result,  the following additional entries are added to main.cf :

       CFSMount cfsmount2 (
               AutoStart = 0
               Critical = 0
               MountPoint = "/mnt1ckpt"
               MountType = VX_CLNFST
               BlockDevice = "/dev/vx/dsk/sharedg/vol01:vol01ckpt"
               MountOpt @anurag = "rw,ckpt=vol01ckpt"
               MountOpt @munchee = "rw,ckpt=vol01ckpt"
               NodeList = { anurag, munchee }
               )
       cfsmount2 requires cfsmount1

6. Create and confirm storage checkpoint = vol01ckpt using fsckptadm for volume = vol01 mounted on /mnt1:

# /opt/VRTS/bin/fsckptadm  create vol01ckpt /mnt1

# /opt/VRTS/bin/fsckptadm  list /mnt1
/mnt1
vol01ckpt:
       ctime                =  Wed Oct 15 10:10:29 2003
       mtime                =  Wed Oct 15 10:13:20 2003
       flags                =  mounted

7.Finally, mount the storage checkpoint using cfsmount and confirm:

# /opt/VRTS/bin/cfsmount /mnt1ckpt
 Mounting...
 [/dev/vx/dsk/sharedg/vol01:vol01ckpt] mounted successfully at /mnt1ckpt on anurag
 [/dev/vx/dsk/sharedg/vol01:vol01ckpt] mounted successfully at /mnt1ckpt on munchee

# df -kl
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c0t0d0s0    4031320 1166344 2824663    30%    /
/proc                      0       0       0     0%    /proc
swap                  616624   23184  593440     4%    /tmp
/dev/vx/dsk/sharedg/vol01
                    1048576   16753  967342     2%    /mnt1
/dev/vx/dsk/sharedg/vol01:vol01ckpt
                    1048576   16753  967342     2%    /mnt1ckpt  

 

 

Issue/Introduction

How to create a storage checkpoint on a clustered (shared) file system