Sunday, March 26, 2017

CIFS and SMB


CIFS

Short for Common Internet File System, a protocol that defines astandard for remote file access using millions of computers at a time. CIFS is a dialect of the Server Message Block (SMB) protocol, which was originally developed by IBM Corporation and then further enhanced by Microsoft, IBM, Intel, 3Com, and others

With CIFS, users with different platforms and computers can share files without having to install new software. In general, CIFS is a better option over older file sharing protocols like FTP unless links are high latency (e.g WAN)
CIFS runs over TCP/IP but uses the SMB (Server Message Block)protocol found in Microsoft Windows for file and printer access; therefore, CIFS will allow all applications, not just Web browsers, to open and share files across the Internet.
With CIFS, changes made to a file are simultaneously saved on both the client and server side.

SMB

SMB (v1.0, 2.0 and 3.0) prevalent in newer windows OS versions whereas CIFS is a dialect which doesn't have all the features of SMB such as "batching" or change notification support. As per Microsoft, the protocol exchange between a server and client first selects a dialect with the highest level of functionality supported by both server and client. Initially CIFS or SMB might be selected based on Server & Client capability but if either the Server or Client fail to support all needed features of SMB like change notification support then SMB connections will be lost without notice to user with traffic shifting to CIFS only.


CIFS vs SMB, which one to use?

CIFS being a dialect & older implementation of SMB lacks important enhancements like multi-channeling and change notification support which are present in SMB 2.0 and SMB 3 version. Microsoft has been using SMB from Windows 2008 onwards and it remains the protocol of choice for transferring files between compatible nodes.

References : - 
https://docs.microsoft.com/en-us/windows/desktop/FileIO/microsoft-smb-protocol-and-cifs-protocol-overview
https://msdn.microsoft.com/en-us/library/ee442092.aspx


Windows 2012/2016 Hyper-V Cluster

Setting up a 21012 Hyper-V Failover Clustering

  1. Setup the networks & storage for nodes
  2. Install Hyper-V & Failover Clustering roles on nodes
  3. Validate the cluster configuration 
  4. Create the cluster
  5. Setup disk or file share as witness if required (for even node clusters)
  6. Create a VM & configure it highly available 
  7. Install the guest OS on VM

Witness Configuration

For a two-node cluster, the quorum configuration will be Node and Disk Majoritya the default for a cluster with an even number of nodes. Node and Disk Majority means that the nodes and the witness disk each contain copies of the cluster configuration, and the cluster has quorum as long as a majority (two out of three) of these copies are available.

Troubleshooting Checklist.

  1. For cloned VMs which are going to be part of a domain, ensure the image is sysprep'ed before deploying the VMs.
  2. Network used for clustered are up and named similarly.
  3. The storage disks are up and available, the witness should have ntfs partition and so does the CSV.
  4. If VM migration fails, check no CD/DVD/image is mounted.
  5. Ensure the cluster share has appropriate rights (CSV conversion of a disk does this automatically) in case of using a file share for CSV, reset the folder permission to "Everyone" with full permission. This is assuming that file share is a separate network and only accessible from the HyperV hosts.


Reference :- Windows 2012 HyperV Cluster