How to add a new filesystem on Veritas Cluster? Once the filesystem is provisioned, we will be adding it in vfstab/fstab to mount if it’s a non-cluster filesystem. On Cluster nodes, Most of the application filesystem will be managed under cluster to mount the filesystem. This will ensure that filesystem will be mounted during the reboot of cluster failover/failback. Here we are going to see how to add new filesystem cluster resource in existing VCS cluster on fly.
It’s a tricky job. If filesystem resource is set as critical and not mounted, it will bring down the entire service group once you enable the resource. So before enabling the resource, you must ensure that resource attribute is set as non-critical.
This is an example that how to add new filesystem on two node veritas cluster without any downtime.
Environment: (Assumed)
- Cluster Nodes: Node1,Node2 (Pre-configured VCS cluster nodes)
- Diskgroup name: ORAdg (Existing DG)
- Volume Name: oradata01
- Mount Point: /ORA/data01
- Service Group: ORAsg (Existing SG)
- Volume Resource Name: oradata01_Vol
- Mount Resource Name: oradata01_Mount
- Diskgroup Resource Name: ORADG (Existing resource)
- Oracle Solaris 10/11 / VxVM
1. Create a new volume on the existing disk group:
#vxassist -g ORAdg make oradata01 100g ORA_12 ORA_12 layout=mirror
2. Create a vxfs filesystem on the newly created volume.
#newfs -F vxfs /dev/vx/rdsk/ORAdg/oradata01
3. Create a new mount point on both servers.
#mkdir –p /ORA/data01
Create the mount point on the second node.
#mkdir –p /ORA/data01
4. Modify the cluster configuration in “read/write” mode
# haconf –makerw
5. Create a volume resource called oradata01_Vol specifying the existing disk group resource (ORAdg).
# hares -add oradata01_Vol Volume ORAsg VCS NOTICE V-16-1-10242 Resource added. "Enabled" attribute must be set before agent monitors # hares -modify oradata01_Vol Critical 0 # hares -modify oradata01_Vol DiskGroup ORAdg # hares -modify oradata01_Vol Volume oradata01 # hares -modify oradata01_Vol Enabled 1
6. Create a mount resource called oradata01_Mount with the mounting instructions for the filesystem.
# hares -add oradata01_Mount Mount ORAsg VCS NOTICE V-16-1-10242 Resource added. Enabled attribute must be set before agent monitors # hares -modify oradata01_Mount Critical 0 # hares -modify oradata01_Mount MountPoint /ORA/data01 # hares -modify oradata01_Mount BlockDevice /dev/vx/dsk/ORAdg/oradata01 # hares -modify oradata01_Mount FSType vxfs # hares -modify oradata01_Mount FsckOpt %-y # hares -modify oradata01_Mount Enabled 1
7. Unfreeze the SG
#hagrp –unfreeze ORAsg
8. Bring the resource volume online on node1.
# hares -online oradata01_Vol -sys node1 # hares -online oradata01_Mount -sys node1
9. Verify if the filesystem is mounted or not. If it’s mounted, then proceed to freeze the SG back
#hagrp –freeze ORAsg -persistent
10. Make the newly created resource as critical
# hares -modify oradata01_Vol Critical 1 # hares -modify oradata01_Mount Critical 1
11. Create the dependencies for the new filesystem.
# hares –link oradata01_Vol ORADG1 # hares –link oradata01_Mount oradata01_Vol # hares –link ORA_Oracle oradata01_Mount
12. Make the cluster configuration in read-only
#haconf -dump -makero
Thank you for reading this article. Share it! Comment it!!
Deb says
These steps appear to be wrong. where is ORADG1? and where is ORA_Oracle?
Creating the dependencies for new filesystem:
# hares –link oradata01_Vol ORADG1
# hares –link oradata01_Mount oradata01_Vol
# hares –link ORA_Oracle oradata01_Mount
Lingeswaran R says
This article assumes that where you have the existing DG & oracle cluster resource. Offcource, Article title says about that.
Lingesh
ishan mate says
Hi,
What is ORA_Oracle in below command as per your above article.
hares –link ORA_Oracle oradata01_Mount
Lingeswaran R says
Its oracle cluster resource. (If oracle instance is managed by Veritas).
Lingesh