Friday, February 3, 2017

Symantec Cluster Server. VCS Moving a Mount Point




Today after I getting all the filesystem mount points configured and set up in a cluster I was was asked change them. Annoying but not something I was initially sure how to do. Little bit of searching and clarification of the VCS commands this is what I was able to figure out.

First lets take a look at the mount we are about to move:

# hares -display cfsmount1 | grep -i MountPoint
cfsmount1    ArgListValues         server1   MountPoint        1       /mount/path  BlockDevice     1       /dev/vx/dsk/mountdg/mount_vol MountOpt        1       cluster CloneSkip       1       no      Primary 1       server2        AMFMountType    1       vxfs
cfsmount1    ArgListValues         server2   MountPoint        1       /mount/path  BlockDevice     1       /dev/vx/dsk/mountdg/mount_vol MountOpt        1       cluster CloneSkip       1       no      Primary 1       server2        AMFMountType    1       vxfs

The plan is that we just move the /mount/path to our new path of /mount. So first we need to un-mount our mounts from the nodes in the cluster:

# cfsumount /mount/path
  Unmounting...
  /mount/path got successfully unmounted from server1
  /mount/path got successfully unmounted from server2

Once this is done we need to update and clean up the filesystems and old/new paths:
# ls -dl /mount/path
drwxr-xr-x    2 oracle   dba             256 06 Jun 16:26 /mount/path
# ls -dl /mount
drwxrwxr-x    4 root   dba             256 08 Jun 14:41 /mount

In this example the path needs to be owned by the Oracle user:
# chown -R oracle:dba /mount

Then we are going to check that the old mount point is empty and delete it.
NOTE* Make sure you've unmounted the FS here, else you could destroy all your data. Ours is empty, a good sign that nothing is sitting under the mount point or that nothing is mounted.
NOTE** These filesystem updates need to be actioned on ALL the nodes in the cluster!
# ls -l /mount/path
total 0
# rmdir /mount/path
# ls -dl /mount
drwxrwxr-x    3 oracle   dba             256 14 Jun 10:41 /mount

Our new mount point looks good, so we can now make the required change:
# hares -modify cfsmount1 MountPoint "/mount"
# hares -display cfsmount1 | grep -i MountPoint
cfsmount1    ArgListValues         server1   MountPoint        1       /mount BlockDevice     1       /dev/vx/dsk/mountdg/mount_vol MountOpt        1       cluster CloneSkip       1       no      Primary 1       server2        AMFMountType    1       vxfs
cfsmount1    ArgListValues         server2   MountPoint        1       /mount BlockDevice     1       /dev/vx/dsk/mountdg/mount_vol MountOpt        1       cluster CloneSkip       1       no      Primary 1       server2        AMFMountType    1       vxfs
cfsmount1    MountPoint            global     /mount

The information above looks perfect, so go ahead and remount it all.
# cfsmount /mount
  Mounting...
  [/dev/vx/dsk/mountdg/mount_vol] mounted successfully at /mount on server1
  [/dev/vx/dsk/mountdg/mount_vol] mounted successfully at /mount on server2
# df -g /mount
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on

/dev/vx/dsk/mountdg/mount_vol     99.00     92.66    7%      339     1% /mount

No comments:

Post a Comment