Wednesday, March 20, 2019



Dell Modular Disk Storage Manager reports unreadable sectors after a power failure

Fix below:

Open cmd as administrator ->

Navigate to the SMcli exe and execute the following to connect to the storage array via the two controller IPs.

C:\Program Files\Dell\MD Storage Software\MD Storage Manager\client>SMcli 192.168.100.1 192.168.100.2

Entering interactive mode. Please type desired command.

clear allVirtualDisks unreadableSectors
;
[Press CTRL+c]
Script execution complete.

All done.

If this error  re-occurs then you will need to do a support file export to identify affected disks as this may then be a  genuine hardware issue.

Thursday, March 07, 2019

Setting a static IP on Ubuntu server 18

Since ubuntu now uses netplan (more info here -> https://netplan.io) which uses yaml to define and create the required networks. The legacy way of making these changes via /etc/network/interfaces is now deprecated.

See below:

#sudo cat /etc/network/interfaces

# ifupdown has been replaced by netplan(5) on this system.  See
# /etc/netplan for current configuration.
# To re-enable ifupdown on this system, you can run:
#    sudo apt install ifupdown


1. Let's start by confirming our interface names:

#ifconfig -a

ens160: flags=4163  mtu 1500
        inet 172.1.2.3  netmask 255.255.255.0  broadcast 172.1.2.255
        inet6 fe80::250:56ff:fea8:38f8  prefixlen 64  scopeid 0x20
        ether 00:50:56:a8:38:f9  txqueuelen 1000  (Ethernet)
        RX packets 1545  bytes 955401 (955.4 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 827  bytes 101663 (101.6 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


2. Now identify the config file netplan is using:

#ls -la  /etc/netplan/
total 12
drwxr-xr-x  2 root root 4096 Mar  6 06:15 .
drwxr-xr-x 90 root root 4096 Mar  6 06:16 ..
-rw-r--r--  1 root root  409 Mar  6 06:15 50-cloud-init.yaml


Note the interface name is  "ens160" taken from 1. above.

For our example we are going to set the static IP to 172.1.2.3 with a subnet mask of 255.255.255.0 and gateway of 172.1.2.1

3. Make the necessary changes as shown below:

#sudo vi /etc/netplan/50-cloud-init.yaml

# This file is generated from information provided by
# the datasource.  Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    ethernets:
        ens160:
            addresses: [172.1.2.3/24]
            gateway4:   172.1.2.1
            dhcp4: no
            nameservers:
              addresses: [1.1.1.1,2.2.2.2]

    version: 2

4. Lastly apply the configuration
#sudo netplan apply








Friday, March 01, 2019

VMware PowerCLI on Windows 10

This is as simple as running Windows Powershell as administrator and running the following:

Install-Module -Name VMware.PowerCLI


Close and open powershell to have access to your new vSphere PowerCLI commands.
When connecting to your environments you may get the following error:


Connect-VIServer : 2019/03/01 8:55:20 AM        Connect-VIServer                Error: Invalid server certificate. Use
Set-PowerCLIConfiguration to set the value for the InvalidCertificateAction option to Prompt if you'd like to connect
once or to add a permanent exception for this server.
Additional Information: Could not establish trust relationship for the SSL/TLS secure channel with authority


You can  run the following to get around this cert warning:

Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false



Thursday, February 28, 2019

How to check Cisco Catalyst Switch Port Traffic Utilization



Sometimes it is necessary to see what an uplink to a switch, vmware exsi host etc is doing in terms of traffic,

A useful command is show interface summary


This then outputs the following:

cat2960s#sh int summary

 *: interface is up
 IHQ: pkts in input hold queue     IQD: pkts dropped from input queue
 OHQ: pkts in output hold queue    OQD: pkts dropped from output queue
 RXBS: rx rate (bits/sec)          RXPS: rx rate (pkts/sec)
 TXBS: tx rate (bits/sec)          TXPS: tx rate (pkts/sec)
 TRTL: throttle count

  Interface               IHQ   IQD  OHQ   OQD  RXBS RXPS  TXBS TXPS TRTL
-------------------------------------------------------------------------
* Vlan1                    0     0    0     0  1000    1  1000    1    0
  FastEthernet0            0     0    0     0     0    0     0    0    0
* GigabitEthernet1/0/1     0     0    0  1747  1000    1 52000   49    0
* GigabitEthernet1/0/2     0     0    0  1757     0    0 52000   49    0
* GigabitEthernet1/0/3     0     0    0 191986 480000  106 290000  122    0
* GigabitEthernet1/0/4     0     0    0  1645 92000   40 158000   90    0
* GigabitEthernet1/0/5     0     0    0  1733     0    0 52000   49    0
* GigabitEthernet1/0/6     0     0    0  5969 1172000  658 13763000  1271    0
* GigabitEthernet1/0/7     0     0    0  1756     0    0 52000   49    0
* GigabitEthernet1/0/8     0     0    0  1726  1000    1 52000   50    0
* GigabitEthernet1/0/9     0     0    0  1952 147000  121 506000  191    0
* GigabitEthernet1/0/10    0     0    0  1737  6000    2 52000   49    0
* GigabitEthernet1/0/11    0     0    0  1736     0    0 52000   49    0
...

Note: RX is traffic Received and TX is traffic sent

Let's dig a bit deeper into an interface:

cat2960s# sh int gigabitEthernet 1/0/29 summary

 *: interface is up
 IHQ: pkts in input hold queue     IQD: pkts dropped from input queue
 OHQ: pkts in output hold queue    OQD: pkts dropped from output queue
 RXBS: rx rate (bits/sec)          RXPS: rx rate (pkts/sec)
 TXBS: tx rate (bits/sec)          TXPS: tx rate (pkts/sec)
 TRTL: throttle count

  Interface               IHQ   IQD  OHQ   OQD  RXBS RXPS  TXBS TXPS TRTL
-------------------------------------------------------------------------
* GigabitEthernet1/0/29    0     0    0 53071 477756000  39677 10729000  18785    0


From the output above we can deduce the following:

RX Traffic = 477.75 Mbits/second (477756000 bits/s)
TX Traffic =  10.72  Mbits/second (10729000 bits/s)