Wednesday, February 12, 2020

Cohesity: Basics of System Internals, key concepts, and Services of Cohesity Solution

Learn Storage, Backup, Virtualization,  and Cloud. AWS, GCP & AZURE.
..........................................................................................................................................................................

Problem: It is important to use common terminology while administering a solution, and its even more important to know what each service or terminology used in solution actually does in meeting what is expected of the solution. It helps connect the dots.

What are System Internals of Cohesity and what each Internal Service function is responsible for?

Magneto Service:
Magneto service is the heart of Cohesity solution, which is responsible for Cohesity Integrated Backup Software i.e. DataProtect. Magneto is a backup Engine that integrates Backup service with VMWare vCenter VADP), Oracle, SQL Server, Pure Storage, Netapp, and more.

IRIS Service:
This service provides user interface to interact with Cohesity resources by allowing access to cluster and its services. This facilitates the REST API orchestration. This service is responsible for Web GUI for system management and CLI for advanced Commands.

Gandalf Service:
This is a Cluster Health and State Manager Service. Holds Distributed lock manager and holds Binary Configuration for other processes.

Nexus Service:
This manages platform level operations, while also starts/stops OS level services. Common tasks this performs includes node discovery, cluster initialization, VIP management, and IP/DNS/NTP configuration. This service also manages NON-Disruptive-Upgrades (NDU).

Scribe Service:
This service is responsible for Distributed metadata and journaling. It uses Paxos algorithm for data consistency while holds the metadata for the file systems such as files, snapshots, segments, dedupe chunks, data location and such.

Bridge Service:
This is a main Engine Controller for I/O Operations. This exposes FS types (VIEW- SMB, NFS, and S3) to Clients. This is responsible for updating Scribe of data location, chunking bite streams, and sending to the blob store.

What is Blob?
Blob is a system object that is simply logical allocation of bricks. Bricks is an entity that can be part of which that makes up small files (<=8MB). Whereas, MegaFile(256GB+) is multiple blobs from different nodes. Therefore, here is how the hierarchy would look like:-- Inodes are smallest entity within an inode snaptree that defines file system objects, and hierarchy. Inodes point to Blobs. Blobs are part of bigger entity i.e. Bricks.

Hydra Service:
This is a front-end write cache for bridge. Once data gets written on Cohesity, it is written in native format in Hydra level, where read can be performed directly from hydra if needed. It then flushes to blob store on SSD and HDD depending on I/O profile.

Yoda Service:
Yoda is an Indexing engine, is responsible for indexing files within VM and/or other backed up object based on policy defined if to enable indexing or not. Once Backup job is completed, that’s when Yoda service kicks in.

Genie Service:
This is essentially a service to enable remote tunnel for support. This service checks some other monitoring features such as monitoring hardware hearbeat and health.

Eagle Service:
This service enable data reporting to support (call-home) and support for dark site collection/upload/analysis. It also analyses support data for install base, support and analytics in terms of statistics and alerts. This further sensors that monitor hardware and software.


Note: All the information I have used here is a cumulative information gathering from working knowledge with Field Engineers, Account System Engineers, Cohesity Documentation from support site, as well as personal understanding which I have gathered by conversation with Support tech, and hands on experience. I have tried my best to best reflect accuracy. This is Strictly for the audience who are new and/or current Cohesity users.

You Are Welcome

VMWare: Restore a VM using Netapp snapshot in an NFS exported Datastore Environment

Learn Storage, Backup, Virtualization,  and Cloud. AWS, GCP & AZURE.
............................................................................................................................................................................
Problem: Restore a VM that resides on a NFS Exported Datastore using Netapp Native Snapshot, NOT VMWare snapshot. Use case is-- A virtual disk on Windows server cannot be expanded, if that VM has snapshot on it. This method adds one more way of restoring a VM, if you don’t have solid backup in place, and/or it can be used as secondary plan for restoring a VM, should primary backup becomes unavailable.
1.    Find which ESXi host this VM resides on
a. This can be done either through vcenter GUI or through the vmware scripts
b.   Look at Each Disk of the VM,  EVERY virtual disk MUST be on the NFS to be recoverable.  
c.   In our example,  the disks are all Netapp volumes (netappdatastore2)
2.     Shutdown/power down the VM 
3.     Unregister the VM from Vcenter (Remove from Inventory) (DONT DELETE FROM DISK)
4.     Login to the ESXi host as user root,  in this case,  ESX-Server-01.domain.com
a.   ssh -l root@ ESX-Server-01.domain.com
b.   Find the netapp volume once you log in.
c.   [root@ESX-Server-01:~] df -h
Filesystem  Size  Used      Available Used%      Mounted on
NFS         20TT  15TT      5.0T      81%        /vmfs/volumes/netappdatastore2
5.    cd into that file system
[root@ESX-Server-01: cd /vmfs/volumes/netappdatastore2
   [root@ESX-Server-01 pwd
/vmfs/volumes/netappdatastore2
6.    Make sure we have a .snapshot directory and it has snapshots for the VM
7.   cd into .snapshot directory, and locate the snapshot desired based on timestamp.
root@ESX-Server-01:/vmfs/volumes/netappdatastore2] cd .snapshot/
[root@ESX-Server-01:/vmfs/volumes/netappdatastore2/.snapshot] ls -l
Snapshot.1
Snapshot.2
Snapshot.3
8.   Find the existing vm directory and move that directory into a backup directory to save the existing state
[root@ESX-Server-01:/vmfs/volumes/netappdatastore2] mv VMname VMname.backup
9.   Recover the VM directory from snapshot directory,  you MUST choose the right snapshot directory by the time frame
Cd into desired snapshot.
[root@ESX-Server-01:/vmfs/volumes/netappdatastore2/.snapshot/Snapshot.3]
[root@ESX-Server-01:/vmfs/volumes/netappdatastore2/.snapshot/snapshot.3] ls -ld VMName
10. Rsync command is recommended vs cp  (rsync has the -S option to handle sparse files more efficiently,  thin allocated vmdk files are usually sparse files - that are files with holes in the blocks).
root@ESX-Server-01:/vmfs/volumes/netappdatastore2/.snapshot/snapshot.3] rsync -av -S VMName ../../VMName
11. Re-register the vm in vcenter with the newly recovered directory
a.   Login to vcener
b.   Brower the ESXi host the VM was running on
c.   Go to Storage for the ESXi host and browse the storage file systems on the ESXi host
d.   Browse to the directory where you have the recovered VM files. 
e.   Go into that directory and register the VM. (right click on the VM definition file, and choose register). 
12.  Power back on the VM.


 You are Welcome :)

Tuesday, January 21, 2020

Cohesity: How to do hot swap of failed cohesity node...

Learn Storage, Backup, Virtualization,  and Cloud. AWS, GCP & AZURE.
............................................................................................................................................................................

How to remove a faulty Cohesity node (or hot swap) in cohesity cluster.

1. Log into a node in question by using hostname or Node IP.
ssh cohesity@cohesity-node-1

2. Issue an IPMI command to power down Chassis. It helps identifying the node visually which will have lights turned off upon execution.
cohesity-node-1::> sudo ipmitool power chassis off

(Soon you enter this, it will kill the session from that node)

3. Now remove the Node from cluster. Log into cluster and run iris_cli command.
cohesity-cluster::>iris_cli -username=admin -password=‘xxxxx’ node rm id= force=true
You can only force if the node is unreachable. i.e. since you powered it off in previous step, it let you use force.


4. Now insert the New Node into cluster, power it back on, Assign Initial IP info.  
(Log in using Cohesity user, and under its home directory, there will be three main scripts.)
(It is important to run configure_network.sh  (Located at /home/cohesity/bin/network/configure_network.sh) Script to initially assign IP, gatemasks and such before it can be added to cluster)
a. Select Option to assign networking configuration for Node Management.
b. Configure IP, and other networking info.
Note: If you are using multiple Vlans, and your node management uses non-native vlan then you have to have interface name,bond info handy. I ran into issue when, Even after assigning using script, it required manual intervention.  In some case, it also requires bond interface created, if not created that interface during part of config. So you have to create interfacde manually, modify ip address info, and restart network service, and then only you can move forward.
>>Log into Node via crash cart and run below.
:>>cat /etc/sysconfig/network-scripts/ifcfg-bond0.
DEVICE=bond0.vlanID
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
VLAN=yes

IPADDR=
PREFIX=26
GATEWAY=
MTU=1500
ZONE=public
NM_CONTROLLED=no

4. Upon persistence IP assignment, you can run same  configure_network.sh  and select option to configure IPMI configuration. Apply IPMI network configuration.

5. Now new node in in system, Cluster can discover the newly inserted Node and can be added to cluster. 
(I ran into issue when it didn’t discover from Cluster UI. I did it manually by following below. This actually is independent of what version is new Node running. So in my case when new node was on low rev of DataProtect, upon addition to cluster, its OS also got updated on its own.)
:: ris_cli cluster add-nodes auto-update=true node-ids= node-ips= node-ipmi-ips=

##Just for sanity check, it is helpful if we restart he Nexus service to equally distribute VIPS, since I ran into issue last time when one node failed and second node hosted two VIPS, but didnt’ redistribute VIPS to newly added node upon replacement causing spotty backup failures. So restarting Nexus service helps.
::$ allssh.sh "sudo systemctl restart nexus"


(Rest of the things occurs in the background).


You are Welcome :)
Source: support.cohesity.com