MSFC(フェールオーバークラスタ)の管理 with PowerShell(修正版)
Import-Module -Name failoverclusters $clusterGroup = Get-ClusterGroup -Cluster ClusterName -Name ClusterGroupName if($clusterGroup.ownerNode -eq 'PrimaryNode') { Write-Host 'Cluster is healthy, move cluster group' Move-ClusterGroup -Cluster ClusterName -Name ClusterGroupName -Node SecoundaryNodeName } else { Write-Host 'Cluster is not healthy, cluster group will be not moved' }
フェールオーバークラスターマネージャー └<クラスタ名>...CNO(Cluster Named Object)、MSCSでは「管理ノード名」 サービスとアプリケーション ├<クラスタグループ名>...仮想サーバ名とも呼ばれる └<クラスタグループ名>
クラスタ名など「コアクラスタリソース」を管理する「クラスタ グループ」という名前のクラスタグループが存在するが、GUI上には表示されていない。
フェールオーバークラスターマネージャーで、クラスタグループ名を選択した際に、センターペインに表示される、ネットワーク名、記憶域などを「リソース」と呼ぶ
クラスタ管理のためのPoweerShell ModuleはImportが必要
Import-Module -Name failoverclusters
SQL Server、Exchange Server などは、インストーラから専用クラスタグループを作成できる。
Get-ClusterGroup -Cluster <クラスタ名>
オンライン(STOP)・オフライン(START)・移動(MOVE)は、クラスタグループ単位で管理すればよい。
Stop-ClusterGroup -Cluster <クラスタ名> -Name <クラスタグループ名> Start-ClusterGroup -Cluster <クラスタ名> -Name <クラスタグループ名> Move-ClusterGroup -Cluster <クラスタ名> -Name <クラスタグループ名> -Node <クラスタノード名>
クラスタリソースの所有ノードを確認するためにはOwnerNodeプロパティを利用する。