Nutanix command history



Don’t find the file in the local CVM?

allssh ls /home/nutanix/.nutanix_history
allssh ls /home/nutanix/.acli_history

Find raid members in a Nutanix CVM

cat /proc/mdstat
lsblk | grep md

In a Nutanix node with more than one SSD, software raid is created in the CVM using the SSD disks for the following purposes.

md0: / Active Boot, 10 GB
md1: Inactive Boot, 10GB. Will not be mounted.
md2: /home, 40 GB

After upgrade, active and inactive boot volumes will interchange.

Nutanix: Disk usage

ssh to any CVM and run the following commands.

  1. Extent Store (SSD and HDD)
    find ~/data/stargate-storage/disks/ -maxdepth 2 -name data  | xargs -IH du -sh H
    570G    data/stargate-storage/disks/Z1Y3Y11D/data
    575G    data/stargate-storage/disks/Z1X641WM/data
    131G    data/stargate-storage/disks/BTHC54660293480MGN/data
  2. Unified Cache (SSD Only)
    find ~/data/stargate-storage/disks/ -maxdepth 2 -name ccache  | xargs -IH du -sh H
    21G data/stargate-storage/disks/BTHC54660293480MGN/ccache
  3. Cassandra/Metadata (SSD Only)
    find ~/data/stargate-storage/disks/ -maxdepth 3 -name cassandra  | xargs -IH du -sh H
    21G data/stargate-storage/disks/BTHC54660293480MGN/metadata/cassandra
  4. Oplog (SSD Only)
    find ~/data/stargate-storage/disks/ -maxdepth 4 -name oplog-store  | xargs -IH du -sh H
    661M    /home/nutanix/data/stargate-storage/disks/BTHC54660293480MGN/metadata/stargate-storage/oplog-store

The allssh command in a Nutanix CVM

The allssh command in a Nutanix CVM is an alias to __allssh which is a bash function defined in /usr/local/nutanix/profile.d/bashrc.

$ which allssh
alias allssh='__allssh'
$ type __allssh
__allssh is a function
__allssh () 
    OPTS="-t -o LogLevel=ERROR -o StrictHostKeyChecking=no";
    echo "Executing $CMDS on the cluster";
    for i in `svmips`;
        echo "================== "$i" =================";
        /usr/bin/ssh $OPTS $i "source /etc/profile;$@";