How to Setup a Clustered ONTAP Cluster Without Using Cluster Setup Wizard

The following post illustrates how to setup a Clustered ONTAP Cluster without using the cluster setup wizard (whether anyone would want to do this or not is another matter!) The CLI script presented will replicate a cluster setup wizard where the prompts have been answered as in the Appendix at the end of this post.

Cluster Create Without Using Cluster Setup Wizard

Type exit when the system boots to:
Do you want to create a new cluster or join an existing cluster?

The default pre-setup login is admin with no password.

## Setup Script ##
# For CDOT 8.1.2 SIM with 7 Ethernet Network Adapters.

# The following lines configure the port roles.
#  The cluster create command creates a failover group called “clusterwide” that has all data ports in, leaving the cluster and node-mgmt ports out (verify later with “network interface failover-groups show”.)
#  This SIM has 7 NICs with e0g is simulating e0M.
#  Having e0c and e0e as cluster ports, simulates FAS6280 best practice from the HWU.
#  Verify with “network port show
#  MTU 9000 doesn't work in the SIM, set to 1500!

network port modify -node localhost -port e0a data
network port modify -node localhost -port e0b data
network port modify -node localhost -port e0c cluster -mtu 9000
network port modify -node localhost -port e0d data
network port modify -node localhost -port e0e cluster -mtu 9000
network port modify -node localhost -port e0f data
network port modify -node localhost -port e0g node-mgmt

# At least one cluster interface is required before we can run cluster create!
#  Verify the below with “network interface show
#  Just for interest, the network interface show everything is:
network interface show clus1 -fields vserver,lif,role,data-protocol,home-node,home-port,curr-node,curr-port,status-oper,status-extended,is-home,address,netmask,auto,netmask-length,routing-group,status-admin,failover-policy,firewall-policy,auto-revert,use-failover-group,dns-zone,failover-group,wwpn,comment

network interface create -lif clus1 -role cluster -home-node localhost -home-port e0c -address 169.254.1.101 -netmask 255.255.0.0
network interface create -lif clus2 -role cluster -home-node localhost -home-port e0e -address 169.254.1.201 -netmask 255.255.0.0
network interface create -lif mgmt1 -role node-mgmt -home-node localhost -home-port e0g -address 10.0.0.51 -netmask 255.255.255.0

# Node name must start with a letter before we can run cluster create!
# Then we can run cluster create with license and cluster name.

system node rename -newname clusa-01
cluster create -license JWFJEXMWZWYQSD -clustername clusa

# After the cluster is created, we can create a cluster_mgmt lif.

network interface create -lif cluster_mgmt -role cluster-mgmt -home-node localhost -home-port e0a -address 10.0.0.50 -netmask 255.255.255.0 -vserver clusa

# Routing groups are automatically created -
#  verify with “network routing-groups show” -
#  but routes are not, so we create the default routes.
#  Verify with “network routing-groups route show

network routing-groups route create -vserver clusa -routing-group c10.0.0.0/24 -destination 0.0.0.0/0 -gateway 10.0.0.2 -metric 20
network routing-groups route create -vserver clusa-01 -routing-group n10.0.0.0/24 -destination 0.0.0.0/0 -gateway 10.0.0.2 -metric 10

# Now to set the password for the admin account,
#  and enable admin for various applications (including ssh)
#  Verify with “security login show

security login password -username admin
security login create -username admin -application http -authmethod password -role admin
security login create -username admin -application ontapi -authmethod password -role admin
security login create -username admin -application ssh -authmethod password -role admin

# Setup DNS (verify with “vserver services dns show”)
#  And provide system location (verify with “system snmp show”)

vserver services dns create -domains lab.priv -vserver clusa -name-servers 10.0.0.11
system snmp location “In the lab”

# (Optional) Setup NTP (needs network connectivity.)
#  The setup wizard doesn’t do this!
#  Verify with “system services ntp server show

system services ntp server create -node clusa-01 -server 0.uk.pool.ntp.org

# That’s it!

system node reboot

Cluster Join Without Using Cluster Setup Wizard

Type exit when the system boots to:
Do you want to create a new cluster or join an existing cluster?

The default pre-setup login is admin with no password.

## Setup Script ##
# The following lines will configure clusa-02 as a second node in the cluster.

network port modify -node localhost -port e0a data
network port modify -node localhost -port e0b data
network port modify -node localhost -port e0c cluster -mtu 9000
network port modify -node localhost -port e0d data
network port modify -node localhost -port e0e cluster -mtu 9000
network port modify -node localhost -port e0f data
network port modify -node localhost -port e0g node-mgmt

network interface create -lif clus1 -role cluster -home-node localhost -home-port e0c -address 169.254.1.102 -netmask 255.255.0.0
network interface create -lif clus2 -role cluster -home-node localhost -home-port e0e -address 169.254.1.202 -netmask 255.255.0.0
network interface create -lif mgmt1 -role node-mgmt -home-node localhost -home-port e0g -address 10.0.0.52 -netmask 255.255.255.0

system node rename -newname clusa-02
cluster join -clusteripaddr 169.254.1.101

network routing-groups route create -vserver clusa-02 -routing-group n10.0.0.0/24 -destination 0.0.0.0/0 -gateway 10.0.0.2 -metric 10

system services ntp server create -node clusa-02 -server 0.uk.pool.ntp.org

system node reboot

APPENDIX: Cluster Setup Wizard Answer Prompts for Comparison

Do you want to create a new cluster or join an existing cluster? create
Do you want to use defaults? no
List the private cluster network ports: e0c,e0e
Enter the cluster ports MTU size: 9000
Enter the cluster network netmask: 255.255.0.0
Enter the cluster interface IP address for port e0c: 169.254.1.101
Enter the cluster interface IP address for port e0e: 169.254.1.201
Enter the cluster name: clusa
Enter the cluster base license key: JWFJEXMWZWYQSD
Enter the cluster administrator’s (username “admin”) password: XXXXXXXX
Enter the cluster management interface port: e0a
Enter the cluster management interface IP address: 10.0.0.50
Enter the cluster management interface netmask: 255.255.255.0
Enter the cluster management interface default gateway: 10.0.0.2
Enter the DNS domain name: lab.priv
Enter the name server IP address: 10.0.0.11
Where is the controller located: In the lab
Enter the node management interface port: e0g
Enter the node management interface IP address: 10.0.0.51
Enter the node management interface netmask: 255.255.255.0
Enter the node management interface default gateway: 10.0.0.2

SEO: C-Mode, CDOT, Data ONTAP Cluster-Mode - replicate what the cluster setup wizard does manually via the CLI / nodeshell & clustershell.

Comments