Sunday, 4 February 2018

ONTAP Select Deployment on KVM - Creating a 4-Node Cluster

This post is essentially a transcribing of the CLI commands used in this YouTube Video ONTAP Select on KVM.

Image: ONTAP Select 4-node Cluster

1. Install the Required Linux Packages

Your repositories should have the RHEL 7 Server and the RHEL 7 OpenStack RPMs to install these packages.

qemu-kvm converts the host into a type 1 hypervisor:

# yum --setopt=obsoletes=0 install qemu-kvm-1.5.3-60.el7.x86_64

Install the openvswitch daemon:

# yum --setopt=obsoletes=0 install openvswitch-2.5.0

Start the openvswitch daemon:

# systemctl start openvswitch

Install libvirt:

# yum install libvirt

Start the libvirtd daemon:

# systemctl start libvirtd

Install virt-install:

# yum install virt-install

Install LS HW package:

# yum --setopt=obsoletes=0 install lshw

Install LS SCSI package:

# yum -- setopt=obsoletes=0 install lsscsi

2. Configure the Network

Add a new bridge called ontap-br:

# ovs-vsctl add-br ontap-br

Add a new bond called bond-ontap into the newly created bridge:

# ovs-vsctl add-bond ontap-br bond-ontap ens2f0 ens2f1 bond_mode=balance-slb lacp=active other_config:lacp-time=fast

Set the MTU for the interfaces and the bridge to 9000:

# ip link set ens2f0 mtu 9000 up
# ip link set ens2f1 mtu 9000 up
# ip link set ontap-br mtu 9000 up

Show the newly created bridge and the bond with the two interfaces on:

# ovs-vsctl show

Image: Host after networking has been setup

3. Installing the ONTAP Deploy VM

Install ONTAP Deploy:

# ls -altr /run/Deploy/
# virt-install --name=deploy-kvm --vcpus=2 --ram=4096 --os-type=linux --controller=scsi,model=virtio-scsi --disk path=/run/Deploy/ONTAPdeploy.raw,device=disk,bus=scsi,format=raw --network "type=bridge,source=ontap-br,model=virtio,virtualport_type=openvswitch" --console=pty --import --wait 0

(Optional/Example) Configure interface to use external networks VLAN tag:

# ovs-vsctl set port vnet0 tag=653
# ovs-vsctl show

Run a virsh list to see the deploy VM running:

# virsh list

Launch the deploy vm:

# virsh console deploy-kvm

Enter parameters to configure the deploy VM:

Host name:
Use DHCP (y/n): n
Host IP address:
Net mask:
Primary DNS address:
Secondary DNS address:
Please enter in all search domains separated by spaces:

Login as admin, with default password admin123, and you will be prompted to change the password.

Enter autosupport configuration:

Enter Product Company:
Enter Proxy URL:

Initially there will be no hosts and no clusters, as confirmed by:

(ONTAPdeploy) host show-all
(ONTAPdeploy) cluster show-all

4. Configure the Storage Pools

ONTAP Select makes use of LVM Storage Pools.

To view all the available logical volumes:

# lvscan

To display all block devices:

# lsblk

Define and start a new storage pool:

# virsh pool-define-as ontap_select logical --source-dev /dev/sdc --target=/dev/ontap_select

Build the storage pool:

# virsh pool-build ontap_select

Start the storage pool:

# virsh pool-start ontap_select

To see the status of storage pools:

# virsh pool-list --details

You should see the ontap_select storage pool state is running.

5. Add Hosts into the Deploy Inventory

We do a host add for each node in the 4-node cluster.

# virsh console deploy-kvm

(ONTAPdeploy) host add --host-id HOSTNAME_FQDN_1 --username root --password *******
(ONTAPdeploy) host add --host-id HOSTNAME_FQDN_2 --username root --password *******
(ONTAPdeploy) host add --host-id HOSTNAME_FQDN_3 --username root --password *******
(ONTAPdeploy) host add --host-id HOSTNAME_FQDN_4 --username root --password *******

Once the host credentials have been validated, host show-all will see all hosts with status as authenticated:

(ONTAPdeploy) host show-all

6. Configure the Hosts

We configure each of the 4 hosts (change the configuration details as per your requirements):

(ONTAPdeploy) host configure --host-id HOSTNAME_FQDN_1 --location GDL --storage-pool ontap_select --eval --internal-network ontap-br --internal-vlan 650 --data-network ontap-br --management-network ontap-br --management-vlan 653 --instance-type medium
(ONTAPdeploy) host configure --host-id HOSTNAME_FQDN_2 --location GDL --storage-pool ontap_select --eval --internal-network ontap-br --internal-vlan 650 --data-network ontap-br --management-network ontap-br --management-vlan 653 --instance-type medium
(ONTAPdeploy) host configure --host-id HOSTNAME_FQDN_3 --location GDL --storage-pool ontap_select --eval --internal-network ontap-br --internal-vlan 650 --data-network ontap-br --management-network ontap-br --management-vlan 653 --instance-type medium
(ONTAPdeploy) host configure --host-id HOSTNAME_FQDN_4 --location GDL --storage-pool ontap_select --eval --internal-network ontap-br --internal-vlan 650 --data-network ontap-br --management-network ontap-br --management-vlan 653 --instance-type medium

If all is good, we will get status is configured for all 4 nodes:

(ONTAPdeploy) host show-all

7. Create the Four Node Cluster

Create the 4-node cluster using the Deploy CLI (change the configuration details as per your requirements):

(ONTAPdeploy) cluster create --name fournode --admin-password ******** --cluster-mgmt-ip M.M.M.M --gateway G.G.G.G --node-mgmt-ips A.A.A.A B.B.B.B C.C.C.C D.D.D.D --node-hosts HOSTNAME_FQDN_1 HOSTNAME_FQDN_2 HOSTNAME_FQDN_3 HOSTNAME_FQDN_4 --netmask N.N.N.N

If all is good, a cluster create request accepted is seen (you can also see this in the ONTAP Deploy GUI).

After about 10 minutes, the cluster show-all output should show state as online.

(ONTAPdeploy) cluster show-all

Then access OCSM to configure and use ONTAP.

Note: The ONTAP Deploy GUI could also have been used to create the four node cluster.

No comments:

Post a Comment