So this is my first blog post in a long time, and over the weekend I successfully moved my blog from Wordpress to Ghost which I am really happy with. The performance is great, and I am also running my blog on a self hosted Azure VM and it was a good experience to get Ghost working in Ubuntu (which is super easy by the way).

So this post is about how to force a disk rescan on all nodes in a Hyper-V cluster, not a blog migration post! So the other day I was reconfiguring an Hitachi G200 with about 10 LUNs, and the only way to be able to add the disk into the Hyper-V cluster is to force a disk rescan on all nodes in the cluster; if you don't do this the nodes aren't aware that the disk exists and you can never get the disk to be added into the cluster. Fortunately there is some really simple PowerShell to do this - run these commands on a one of the nodes to force all nodes in the cluster to perform a disk rescan:

$Nodes = (Get-ClusterNode).Name

foreach ($node in $nodes) {
    Invoke-Command -ComputerName $Node -ScriptBlock {Update-HostStorageCache}
}