Tuesday, 27 December 2016

Happy New Year 2017!

aka ‘The End of Year 2016 Post’

Caveat Lector: This is not an IT post. Please stop reading now if you’re looking for technical IT content!

Another year comes to a close, again we find ourselves in the festive season, and time to reflect on the year - soon to be - gone past; and what went well, what could have gone better, what we would like to do more of, what we would like to do less off, and goals. I’m no fan of making a list of New Year’s resolutions - since they seem perpetually doomed to failure - so here’s another idea, the ‘2017 Picture Wall of Aspiration’!

The idea of the ‘Yearly Picture Wall of Aspiration’ is:

- Top section: pictures of things (i.e. experiences) you would like to achieve/do
- Mid section (beneath a green line): pictures of things you simply want to do more of/do better at
- Bottom section (beneath a red line): pictures of things you want to do less of

And below is my 2017 picture wall.

Image: ‘2017 Picture Wall of Aspiration’

And some explanation (I’m great believer that if you say you’re going to do something publicly, then you’re much more likely to do it than not!)

Top Section

-  Kilimanjaro. I’ve often said I’d like to do the Kilimanjaro Trek, so the goal for 2017 is to make this more than just wild talk.
- Great Lakeland Ridge Walks. I haven’t been to the Lake District in ages, it’s a beautiful part of England and great preparation for Kili ;-)

Mid Section

- Be as good as you can be at what you do. Always a good goal. For me this means working hard, going the extra mile, keeping skills current (labs, videos, reading, training, …), and challenging oneself. It always helps if you treat your work like a passion!
- 5km in sub 20 minutes. An ambitious goal. I did 7 Park Runs earlier in the year (May to August), and my time went down from 25:16 to 22:38, then injury hit (Achilles). I feel a sub 20 is in me with hard work and dedication. I think I know why I got injured now, so, to achieve this goal requires regular daily morning and night time stretching exercises, regular Insanity work outs (4 days a week would be great), and a weekly 5km run practising good technique!
- More Blogger. I like sharing information and experiences, and Blogger is a great medium, so stay tuned for more (hopefully good) technical IT content in the New Year.
- More Kindle (more reading). I like a good sci-fi novel. I realise that I read very little though. Need to find time to do more reading (by doing less of the below.)

Bottom Section

- Less YouTube. Less watching videos on YouTube - I watch far too much crap!
- Less Dreaming about cars. You can only drive one car at a time! And I only want to afford one car so it needs some practicality (4 doors), and - quite definitely - I’m no Nigel Mansell ;-). The Lotus Evora fantasy simply isn’t going to happen … hmmm …. an Audi S1 might be nice though!
- Less Civilization III. I don’t know why I love this 2001 computer game so much. It’s a total time sink. In moderation (like with all things) is okay.

And with that, I’m signing off from Cosonok’s IT Blog for 2016.

Happy New Year 2017!

Image: Happy New Year 2017!

Very finally, some blog stats.
Total Pageviews = 2’421’121 (27th December 2016)

Image: Monthly pageviews over all time

Image: Top 10 most viewed posts of all time (these are all 2012 or earlier…)

Monday, 26 December 2016

Evacuate Loan Kit and Transition to Switchless - Quick Notes

It’s not uncommon to use loan kit as part of the process to transition to NetApp Clustered Data ONTAP. The following post is just a few notes on this process (which is - of course - non-disruptive.)

Image: Evacuate Loan Kit and Transition to Switchless

High-Level

1) Preparation
2) Evacuate Loan Nodes
3) Transition to Switchless
4) Remove Loan Switches

Low-Level

In this guide, Node 1 & 2 are the loan kit. Node’s 3 & 4 will eventually become the only nodes in the cluster.

1) Preparation

1.1) Vol move all volumes off nodes 1 & 2
1.2) Destroy data aggregates on nodes 1 & 2
1.3) (If required) Sanitize disks on nodes 1 & 2.
Note: Cannot sanitize disks used by root aggregates, and recommend still keeping at least 1 spare.
1.4) Migrate data LIFs to nodes 3 & 4.
Note: This includes SAN LIFs which can be moved if the LIF is administratively downed first. For SAN LIFs be sure to check Selective LUN Mapping before moving SAN LIFs.
1.5) Verify cluster is healthy via AutoSupport Health Summary/Config Advisor/other means, and remediate any issues.
1.6) Make sure Epsilon is on nodes 3 & 4::>


set -c off; set d
cluster show
cluster modify -node {EPSILON_NODE} -epsilon false
cluster modify -node {NEW_EPSILON} -epsilon true


2) Evacuate Loan Nodes

2.1) Perform cluster unjoin of node 1 via a clustershell session not on node 1::>


cluster unjoin -node {NODE-01}


2.2) Perform cluster unjoin of node 2 via a clustershell session not on node 2::>


cluster unjoin -node {NODE-02}


2.3) (If required) Zero the disks used by root aggregates on the loan kit.
2.4) Remove loan nodes.
2.5) Verify cluster ha is enabled on the cluster, and enable if not::>


cluster ha show
cluster ha modify -configured true


2.6) (As required) Rename nodes, aggregates, LIFs, … ::>


node rename -node {OLD_NODE_NAME} -newname {NEW_NODE_NAME}
aggr rename -aggregate {OLD_AGGR_NAME} -newname {NEW_AGGR_NAME}
net int rename -vserver {VSERVER} -lif {OLD_LIF_NAME} -newname {NEW_LIF_NAME}


3) Transition to Switchless


3.1) Disable auto-revert on Cluster LIFs, and very cabling from cdpd output::>


net int show -role cluster
net int modify -vserver {CLUSTER} -lif {N1_CLUS1} -auto-revert false
net int modify -vserver {CLUSTER} -lif {N1_CLUS2} -auto-revert false
net int modify -vserver {CLUSTER} -lif {N2_CLUS1} -auto-revert false
net int modify -vserver {CLUSTER} -lif {N2_CLUS2} -auto-revert false
net port show
run * cdpd show-neighbors


3.2) Migrate Clus1 LIFs to Clus2’s port::>


net int migrate -vserver {CLUSTER} -lif {N1_CLUS1} -dest-node {NODE1} -dest-port {PORT_CLUS2}
net int show -role cluster
net int migrate -vserver {CLUSTER} -lif {N2_CLUS1} -dest-node {NODE2} -dest-port {PORT_CLUS2}
net int show -role cluster


3.3) Disconnect cables from Clus1 ports and direct connect.
3.4) Revert Clus1 LIFs and verify::>


net int revert -vserver {CLUSTER} -lif {N1_CLUS1}
net int revert -vserver {CLUSTER} -lif {N2_CLUS1}
net int show -role cluster
cluster show
cluster ping-cluster -node {NODE1}
cluster ping-cluster -node {NODE2}


3.5) Enable Switchless::>


network options switchless-cluster modify -enabled true
network options switchless-cluster show


3.6) Migrate Clus2 LIFs to Clus1’s port::>


net int migrate -vserver {CLUSTER} -lif {N1_CLUS2} -dest-node {NODE1} -dest-port {PORT_CLUS1}
net int show -role cluster
net int migrate -vserver {CLUSTER} -lif {N2_CLUS2} -dest-node {NODE2} -dest-port {PORT_CLUS1}
net int show -role cluster


3.7) Disconnect cables from Clus2 ports and direct connect.
3.8) Revert Clus2 LIFs and verify::>


net int revert -vserver {CLUSTER} -lif {N1_CLUS2}
net int revert -vserver {CLUSTER} -lif {N2_CLUS2}
net int show -role cluster
cluster show
cluster ping-cluster -node {NODE1}
cluster ping-cluster -node {NODE2}


3.9) Re-enable auto-revert on Cluster LIFs::>


net int modify -vserver {CLUSTER} -lif {N1_CLUS1} -auto-revert true
net int modify -vserver {CLUSTER} -lif {N1_CLUS2} -auto-revert true
net int modify -vserver {CLUSTER} -lif {N2_CLUS1} -auto-revert true
net int modify -vserver {CLUSTER} -lif {N2_CLUS2} -auto-revert true


4) Remove Loan Switches

4.1) Remove Loan Switches.

THE END

WFA: Determining if a Volume Has a SnapMirror that’s not a Vault

Note: Version of OnCommand Workflow Automation here is 3.1P2.

If you want to create a workflow that takes information for a source cluster, source SVM, source volume, and then only does an action if there’s a SnapMirror that’s not a vault (like snapmirror break), the in-box filter ‘Filter SnapMirror relationships by source volume’ doesn’t quite serve the purpose, we need to enhance the filter. The following post shows how to do this, and a basic example of how to use the custom filter in a workflow.

Part 1) Creating the Custom Filter

Image: Clone and Edit the Filter ‘Filter SnapMirror relationships by source volume’

1.1) Click the Designer tab
1.2) Click Filters in the left pane
1.3) Search for ‘Filter SnapMirror relationships by source volume
1.4) Select the filter and click the Clone button

1.5) New Filter: Properties tab …
… change Name to: ‘Filter SnapMirror relationships by source volume (no vaults)

1.6) New Filter: Query tab …
… edit the SQL Query to the below (additional lines added to the original query are highlighted):


SELECT
    snapmirror.id,
    src_volume.name AS 'volume.name',
    dest_volume.name AS 'secondary_volume.name',
    src_vserver.name AS 'volume.vserver.name',
    dest_vserver.name AS 'secondary_volume.vserver.name',
    src_cluster.primary_address AS 'volume.vserver.cluster.primary_address',
    dest_cluster.primary_address AS 'secondary_volume.vserver.cluster.primary_address'
FROM
    cm_storage.snapmirror,
    cm_storage.snapmirror_policy,
    cm_storage.cluster src_cluster,
    cm_storage.cluster dest_cluster,
    cm_storage.vserver src_vserver,
    cm_storage.vserver dest_vserver,
    cm_storage.volume src_volume,
    cm_storage.volume dest_volume
WHERE
    snapmirror.secondary_volume_id = dest_volume.id
    AND snapmirror.volume_id = src_volume.id
    AND dest_volume.vserver_id = dest_vserver.id
    AND src_volume.vserver_id = src_vserver.id
    AND dest_vserver.cluster_id = dest_cluster.id
    AND src_vserver.cluster_id = src_cluster.id
    AND (
        src_cluster.name = '${source_cluster_name}'
        OR src_cluster.primary_address='${source_cluster_name}'
    )
    AND src_vserver.name = '${source_vserver_name}'
    AND src_volume.name = '${source_volume_name}'
    AND snapmirror_policy.id = snapmirror.snapmirror_policy_id
    AND snapmirror_policy.type != 'vault'


1.7) Click Save

Note: I use snapmirror_policy.type != ‘vault’, rather than snapmirror.type != ‘xdp’, since an XDP mirror might not be a vault (i.e. MirrorVault which is breakable.)

Part 2) An Example Using the Custom Filter

The following example is about as simple as it gets - just purely for illustrating the use of the custom filter.

2.1) Click the Designer tab
2.2) Click Workflows in the left pane
2.3) Click the New workflow button
2.4) If the ‘Workflow Checklist’ pops up, click ‘Start Now
2.5) On the Workflow tab, under ‘Available Steps’, expand none, and drag ‘Search or define’ to the workspace
2.6) On the Workflow tab, under ‘Available Steps’, expand cm_storage, and drag ‘Break SnapMirror’ to the workspace

Image: The workflow so far…

2.7) Double-click ‘Search or define’ in the workspace, and edit the name to say ‘Locate SnapMirror (not vault)
2.8) To the right of 1, click on the + underneath ‘Locate SnapMirror (not vault)’

Image: Click here

2.9) For ‘Dictionary Entry’ choose SnapMirror under cm_storage
2.10) Change Define SnapMirror to ‘snapmirror_not_vault
2.11) Leave the drop down on ‘by searching for an existing SnapMirror
2.12) Click the ‘Enter search criteria

Image: Enter search criteria

2.13) Tick the ‘Filter SnapMirror relationships by source volume (no vaults)
2.14) Under Parameters…
… Source Cluster name or IP: $cluster
… Source Volume name: $volume
… Source Storage Virtual Machine name: $vserver

Image: Resource Selection

2.15) Click OK
2.16) Change the dropdown to the right of ‘If … was not found:’ to ‘Disable this command
2.17) Click OK

2.18) To the right of 1, click on the + underneath ‘Break SnapMirror’
2.19) On the SnapMirror tab, change the dropdown to ‘by using a previously defined SnapMirror’ and …
2.20) … enter ‘snapmirror_not_vault’ to the left of the dropdown
2.21) On the Advanced tab, change the dropdown to ‘If the following variable was found’ and …
2.22) … enter ‘snapmirror_not_vault’ underneath
2.23) Click OK

Image: Parameters for ‘Break SnapMirror’ - SnapMirror tab

Image: Parameters for ‘Break SnapMirror’ - Advanced tab

2.24) On the Details tab for the workflow, enter a Workflow Name ‘Break SnapMirror if it’s not a Vault’ …
2.25) … and tick ‘Ready for production
2.26) Click ‘Save As
2.27) Click Save

Job done!

Saturday, 24 December 2016

OCUM 7: DFM CLI Reference

I’m not sure if the dfm cli was in OnCommand Unified Manager for Clustered Data ONTAP version 6.0, when it came out 3+ years ago, but definitely it was in 6.3 (when the first Windows installable version was released), and likely it was in 6.2 (when the first Linux installable version was released). The dfm cli does exist in the VMware vSphere Appliance version, just trickier to get to.

1) Logging into dfm cli


dfm cli login -u {username} [ -p {password} ]


2) DFM CLI Commands List: Top Level Commands
In this section we list the available commands at top level (i.e. dfm ?). For detail please use the dfm cli.


dfm
dfm version

dfm aggr         
dfm alert        
dfm autosupport  
dfm cli          
dfm cluster      
dfm datasource   
dfm disk         
dfm event        
dfm fcptarget    
dfm igroup       
dfm interface    
dfm job          
dfm ldap         
dfm lun          
dfm option       
dfm physical     
dfm qtree        
dfm relationship 
dfm resource     
dfm run          
dfm ssl          
dfm storageclass 
dfm storageservice
dfm user         
dfm volume       
dfm vserver


3) DFM CLI Commands List: Second Level Commands
In this section we list the available commands down to second level (i.e. dfm {command} ?). For detail please use the dfm cli.


dfm alert add   
dfm alert create
dfm alert delete
dfm alert destroy
dfm alert disable
dfm alert enable
dfm alert list  
dfm alert modify
dfm alert test
dfm autosupport truststore
dfm cli login
dfm cli logout
dfm cluster list
dfm cluster node     
dfm cluster truststore
dfm datasource add  
dfm datasource list 
dfm datasource modify
dfm datasource remove
dfm disk list
dfm event ack   
dfm event list  
dfm event resolve
dfm fcptarget list
dfm igroup list
dfm interface list
dfm job list
dfm job wait
dfm job task
dfm ldap add    
dfm ldap delete 
dfm ldap find   
dfm ldap list   
dfm ldap template
dfm ldap test   
dfm ldap truststore
dfm lun list
dfm lun map
dfm option list
dfm option set
dfm physical summary
dfm qtree list
dfm relationship list
dfm resource lookup
dfm resource search
dfm run delete
dfm run status
dfm run wait 
dfm ssl server
dfm storageclass list
dfm storageservice cleanup   
dfm storageservice conform   
dfm storageservice destroy   
dfm storageservice list      
dfm storageservice subscribe 
dfm storageservice unsubscribe
dfm storageservice update    
dfm storageservice member     
dfm storageservice subscription
dfm user add  
dfm user list 
dfm user modify
dfm user remove
dfm volume list
dfm vserver list


3) DFM Option List
This is a list of the DFM options revealed by running the command ‘dfm option list’.


audit.volume.event.enable
auth.cache.duration
auth.cache.size
auth.ldap.GID
auth.ldap.UGID
auth.ldap.UID
auth.ldap.baseDN
auth.ldap.bindDN
auth.ldap.bindPass
auth.ldap.connect.timeout
auth.ldap.disableNestedGroupLookup
auth.ldap.enabled
auth.ldap.groupObjectClass
auth.ldap.member                 
auth.ldap.ssl
auth.ldap.userObjectClass
auth.ldap.version
autosupport.destination
autosupport.enabled
autosupport.fromAddress
backup.dir.path
backup.retention.count
custom.hostname
data.collector.settings.path
email.fromAddress
event.growthRate.minChangePct.aggregate
event.growthRate.minChangePct.volume
event.growthRate.sensitivity
event.purge.age
history.aggregate.analysis.interval
history.aggregate.consolidation.interval
history.cluster.consolidation.interval
history.clusternode.consolidation.interval
history.default.analysis.interval
history.default.consolidation.interval
history.flexvol.consolidation.interval
history.infinitevol.consolidation.interval
history.volume.analysis.interval
history.vserver.consolidation.interval
mail.smtp.host
mail.smtp.password
mail.smtp.port
mail.smtp.ssl
mail.smtp.username
maximum.supported.favorite
protection.snapmirror.threshold.lag.error.enabled
protection.snapmirror.threshold.lag.error.pct
protection.snapmirror.threshold.lag.warning.enabled
protection.snapmirror.threshold.lag.warning.pct
protection.wfa.hostIp
protection.wfa.hostPassword
protection.wfa.hostPort
protection.wfa.hostUser
protection.wfa.um.datasourceName                   
quotaEmail.address.generation.rules
quotaEmail.format.body
quotaEmail.format.from
quotaEmail.format.subject
rules.dynamic.annotations
snmp.outbound.trapHost
snmp.outbound.trapPort
snmp.outbound.v1.trapCommunity
snmp.outbound.v3.authenticationPassword
snmp.outbound.v3.authenticationProtocol
snmp.outbound.v3.privacyPassword
snmp.outbound.v3.privacyProtocol
snmp.outbound.v3.securityName
snmp.outbound.version
ssl.autosupport.verifyHostNames
ssl.host.verifyCertificates
ssl.host.verifyHostNames
ssl.ldap.verifyHostNames
ssl.wfa.verifyHostNames
terminalEventState.alertEnabled
threshold.aggrDaysUntilFull
threshold.aggrNearlyOvercommitted
threshold.aggrOvercommitted
threshold.aggrSnapshotFull
threshold.aggrSpaceFull
threshold.aggrSpaceNearlyFull
threshold.inodesFull
threshold.inodesNearlyFull
threshold.volDaysUntilFull
threshold.volQuotaNearlyOvercommitted
threshold.volQuotaOvercommitted
threshold.volSnapshotCount
threshold.volSnapshotFull
threshold.volSnapshotReserveDaysUntilFull
threshold.volSpaceFull
threshold.volSpaceNearlyFull
threshold.vserverNamespaceSpaceFull
threshold.vserverNamespaceSpaceNearlyFull
threshold.vserverSnapshotUsage
threshold.vserverSpaceFull
threshold.vserverSpaceNearlyFull
threshold.vserverStorageClassSnapshotUsage
threshold.vserverStorageClassSpaceFull
threshold.vserverStorageClassSpaceNearlyFull
wfa.datasource.db.port
wfa.datasource.db.user


APPENDIX: DFM Option List Default Ports


mail.smtp.port            25
protection.wfa.hostPort   443
snmp.outbound.trapPort    162
wfa.datasource.db.port    3306