SQL Server Clustering on Linux(Ubuntu)--> Part 2

After completing all the steps in part 1 we are now good to go with part 2.

There are multiple ways to achieve shared storage for on Linux for SQL clustering. However we are making use of NFS to achieve this.

1. ISCSI  2. NFS 3. SMB

NFS, or Network File System, is a distributed file system protocol that allows you to mount remote directories on your server. This lets you manage storage space in a different location and write to that space from multiple clients. NFS provides a relatively quick and easy way to access remote systems over a network and works well in situations where the shared resources will be accessed regularly.

Important NFS server information
The source hosting NFS (either a Linux server or something else) must be using/compliant with version 4.2 or later. Earlier versions will not work with SQL Server on Linux.

Once you install Ubuntu OS on the server(ubunfsstorage) you should perform the below steps .

NOTE: Few of the commands what we are running are ubuntu specific.

1) Install NfS server

sudo apt-get update
sudo apt-get install nfs-kernel-server

2) Enable & start rpcbind

   systemctl enable rpcbind
   systemctl start rpcbind

3)Enable & start the NFS Server

  systemctl enable nfs-server
  systemctl start nfs-server

4) Edit the / etc / exports document to set the storage path you want to share,
   note that each share is one line. Below is the screenshot of mine


rw: This option gives the client computer both read and write access to the volume.

no_root_squash: By default, NFS translates requests from a root user remotely into a nonprivileged user on the server. This was intended as security feature to prevent a root account on the client from using the file system of the host a root. no_root_squash disables this behaviour for certain shares.

Note: when I didn't made use of no_root_squash I observed a peculiar behaviour with respect to permissions on SQL directories.

5) create a shared folder to confirm that you have full permissions (777)

    mkdir /var/nfs/sqlcl
    chmod 777 /var/nfs/sqlcl

6)  Export the share 
     sudo exportfs -rav

7) Verify that paths are shared/exported using the below command

     showmount -e 

8) As mine is test environment I disabled the firewall all together however it is not recommended on production systems

  sudo ufw disable

We are done with part 2 .In the next post we are going to deal with most excited part