Tuesday, 21 May 2019

Bash (Linux) and Powershell (Windows) Scripts to Test File Access to Multiple Locations

Linux


Here’s the bash script with 2 example targets:


#!/bin/bash
while true
do
([ -e /mnt/test1/test1.txt ] && date >> /mnt/LOG/log1.txt || echo "FAILURE")
([ -e /mnt/test2/test2.txt ] && date >> /mnt/LOG/log2.txt || echo "FAILURE")
sleep 1
done


Save as say fileaccess.sh and run in bash as sh fileacess.sh

In the above example we’re testing access to 2 files, each in a different mount point. Time stamp is log for successes. Failure is echoed to the screen for failure. There’s a wait of 1 second.

It’s possible to do it as a one line to from the bash shell:


while true ; do ([ -e /mnt/test1/test1.txt ] && date >> /mnt/LOG/log1.txt || echo "FAILURE") ; ([ -e /mnt/test2/test2.txt ] && date >> /mnt/LOG/log2.txt || echo "FAILURE"); sleep 1 ; done


Powershell

Here’s the powershell script with 2 example targets:


"" > C:\LOG\log1.txt
"" > C:\LOG\log2.txt
while($TRUE){
If (test-path C:\mnt\test1\test1.txt){ [String](date) >> C:\LOG\log1.txt }
else { Write-Host "FAILURE" }
If (test-path C:\mnt\test2\test2.txt){ [String](date) >> C:\LOG\log2.txt }
else { Write-Host "FAILURE" }
sleep 1
}


Save as say filetester.ps1 and run in powershell .\filetester.ps1

Similarly, you could turn it into a one liner. Or you can just copy and paste it into powershell.

Intention

The idea is that you can set up a number of NFS mounts, and/or a number of CIFS shares, and test the availability of file access.

Thursday, 9 May 2019

Tech Roundup – 9th May 2019

An earlier than normal tech roundup due to the releases of NetApp ONTAP 9.6 & AFF A320!
Otherwise stuff collated/new since Tech Roundup - 14th April 2019 with headings:
IT Miscellany, NetApp, NetApp ActiveIQ, NetApp.io, NetApp TRs, Security, TechONTAP Podcast, Veeam

NetApp 8th May Releases: ONTAP 9.6 & AFF A320

NetApp Powers Data-Driven Organizations to Succeed

AFF A320: NVMe Building Block for the Modern SAN

Drive More Simplicity, Efficiency, and Security with ONTAP 9.6

ONTAP Data Management Software

AFF A-Series All Flash Arrays

What Is a Data Fabric?

Image: ONTAP Data Management Software

IT Miscellany

Some internet outages predicted for the coming month as '768k Day' approaches

Kubernetes the easy way - for monolithic apps

NetApp

Drive Infrastructure Investment…Be the Cloud Architect

Building in Security by Default in Next Generation Data Center at NetApp

NetApp ActiveIQ

Download the mobile app:

Introducing Fabric Pool Advisor: Learn which clusters have inactive data and are candidates for tiering. View a summary of aggregates for which Inactive Data Reporting (IDR) is not enabled and learn how to enable IDR. Access this feature from the Advisories tab in the left navigation at the customer level dashboard.


NetApp.io (thePub)

New since the last Tech Roundup!

Bring in the Volumes!

Ansible Roles Make Day to Day Operations Easier

My Name Is Stein!

How to Install and Use Trident with Docker EE 2.1 Universal Control Plane and Kubernetes

NetApp TRs

New/apparent since the last Tech Roundup! Also see here: NetApp TRs 4500 to 4999


Security

Hackers Compromise Microsoft Support Agent to Access Outlook Email Accounts

Emotet hijacks email conversation threads to insert links to malware

TechONTAP Podcast (+ WitIB)

New since the last Tech Roundup!

Sneak Peek! Elastic Sizing for FlexGroup Volumes in ONTAP 9.6

Sneak peek! REST APIs in ONTAP 9.6

BONUS CONTENT: ONTAP 9.6 Feature Overview

Episode 188: FlexGroup Update

Episode 187: MAX Data and Intel Optane DCPMM

Episode 186: ONTAP Storage Efficiency Overview

Veeam

[Whitepaper] How to start with modern authentication in Veeam Backup for Microsoft Office 365 v3