0% found this document useful (0 votes)
2 views5 pages

Cluster

This document provides a detailed step-by-step guide for cleaning up and rebuilding a 2-node Windows Failover Cluster that has been broken due to node renaming or removal from Active Directory and DNS. It includes essential prerequisites, PowerShell commands for cluster removal, metadata clearing, AD and DNS cleanup, and instructions for creating a new cluster. Additionally, it offers troubleshooting tips and a quick summary checklist for the entire process.

Uploaded by

ved
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views5 pages

Cluster

This document provides a detailed step-by-step guide for cleaning up and rebuilding a 2-node Windows Failover Cluster that has been broken due to node renaming or removal from Active Directory and DNS. It includes essential prerequisites, PowerShell commands for cluster removal, metadata clearing, AD and DNS cleanup, and instructions for creating a new cluster. Additionally, it offers troubleshooting tips and a quick summary checklist for the entire process.

Uploaded by

ved
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 5

Great — below is a clear, step-by-step **cleanup + rebuild** guide for a 2-node

Windows Failover Cluster when nodes were renamed / removed from AD and DNS and the
cluster is now broken. Follow carefully (especially the warnings) — I’ve included
the exact PowerShell commands you can run (replace placeholders with your real
names).

---

## ⚠️ Before you start (must-do)

1. **Take VM snapshots** / backups of both nodes and (if applicable) the domain
controllers.
2. You need **Domain Admin** (or equivalent) rights and local Administrator on both
cluster nodes.
3. Work during a maintenance window; this will remove cluster objects and may
affect services.
4. Note current names/IPs: `Node1`, `Node2`, `Domain = testvm.com`,
`DesiredClusterName = MyCluster`, `ClusterIP = 192.168.1.100`.

---

## 0) Collect current state (info)

Run from an admin PowerShell on a management host (or node) that has the
FailoverClusters module:

```powershell
Import-Module FailoverClusters
# See if any cluster exists / is discoverable
Get-Cluster # shows cluster(s) if reachable
# Check local service
Get-Service ClusSvc
# Show computer name & domain
$env:COMPUTERNAME
(Get-WmiObject -Class Win32_ComputerSystem).Domain
```

---

## 1) If the old cluster is still reachable (best case)

If `Get-Cluster` returns the cluster object and it is contactable, remove it


cleanly:

```powershell
Import-Module FailoverClusters

# Optional: test cluster


Test-Cluster -Node Node1,Node2

# Remove whole cluster (run as admin on a management node that can reach the
cluster)
Remove-Cluster -Name "MyCluster" -Force
```

After `Remove-Cluster`, check AD & DNS (step 3) and proceed to re-create.

---
## 2) If the cluster is broken / not contactable (most likely your situation)

Do this **on each cluster node (Node1 and Node2)**, logged in as local
Administrator or domain admin (Run PowerShell as Admin):

### 2.1 Stop Cluster Service (ignore errors)

```powershell
Stop-Service ClusSvc -Force -ErrorAction SilentlyContinue
```

### 2.2 Clear local cluster metadata

```powershell
Import-Module FailoverClusters
Clear-ClusterNode -Force
```

`Clear-ClusterNode` removes cluster configuration cached on that node and


unregisters it locally. If it errors, note messages — you can try again after
reboot.

> **Only if Clear-ClusterNode fails repeatedly** (and you understand the risk):
export and remove the registry key:

```powershell
reg export "HKLM\Cluster" C:\temp\Cluster_HKLM_Backup.reg
# then (ONLY if you backed up and are prepared)
Remove-Item -Path "HKLM:\Cluster" -Recurse -Force
```

(Manual registry delete is dangerous — backup first.)

### 2.3 Reboot the node

```powershell
Restart-Computer -Force
```

Repeat 2.1–2.3 on the other node.

---

## 3) Clean up AD & DNS (domain controller or machine with RSAT)

You must remove the old **Cluster Name Object (CNO)** and any **Virtual Computer
Objects (VCOs)** that belonged to the old cluster; also remove DNS A/PTR records.

### 3.1 Check & delete CNO and VCOs in ADUC

* Open **Active Directory Users and Computers** → enable **Advanced Features** →


search for the cluster computer object (`MyCluster`) and any VCOs (names of cluster
roles).
* **Right-click → Delete**. If protected from accidental deletion, uncheck that
protection first.

Or use PowerShell (on a host with the ActiveDirectory module):

```powershell
Import-Module ActiveDirectory
# Example: delete CNO (cluster computer object)
Remove-ADComputer -Identity "MyCluster$" -Confirm:$false
# Delete any VCO (example)
Remove-ADComputer -Identity "MyRoleVCO$" -Confirm:$false
```

> If you get replication/permission issues, wait for AD replication or fix


permissions first.

### 3.2 Remove DNS records (on your DNS server)

Use DNS Manager GUI or PowerShell on the DNS server:

```powershell
# Remove A record for cluster name
Remove-DnsServerResourceRecord -ZoneName "testvm.com" -Name "MyCluster" -RRType "A"
-Force

# If PTR exists, remove it too (adjust zone)


Remove-DnsServerResourceRecord -ZoneName "1.168.192.in-addr.arpa" -Name "100" -
RRType "PTR" -Force
```

(If you don't have the DNS Server module, use DNS Manager.)

---

## 4) Ensure nodes are healthy in AD & DNS

On each node:

* If they were removed from AD, **rejoin the domain**:

```powershell
Add-Computer -DomainName "testvm.com" -Credential (Get-Credential) -Restart
```

* If already joined but renamed, ensure the DNS records are correct:

```powershell
ipconfig /registerdns
nltest /dsgetdc:testvm.com
# check resolution
Resolve-DnsName Node1.testvm.com
```

* Restart Netlogon if you see DNS/AD issues:

```powershell
Restart-Service Netlogon
```

---

## 5) Prepare nodes for new cluster

On BOTH nodes:
### 5.1 Install Failover Clustering feature (if not present)

```powershell
Install-WindowsFeature -Name Failover-Clustering -IncludeManagementTools
```

### 5.2 Validate hardware & network & storage (always run)

```powershell
Test-Cluster -Node Node1,Node2 -Verbose
```

Fix any issues reported by the tests.

---

## 6) Create the new cluster

From one of the management hosts or Node1 (with admin privileges):

```powershell
Import-Module FailoverClusters

# Example: create cluster without adding storage


New-Cluster -Name "MyCluster" -Node Node1,Node2 -StaticAddress 192.168.1.100 -
NoStorage
```

* If you want cluster shared storage, omit `-NoStorage` and ensure storage is
visible & passed to nodes.
* If `New-Cluster` fails due to permission to create CNO in AD, either:

* Pre-create the computer object `MyCluster` in AD (ADUC) and delegate


permissions, **or**
* Give the account you use the rights to create computer accounts in that OU
(delegation).

After creation, the cluster will create CNO in AD and DNS A record for `MyCluster`.

---

## 7) Post-creation checks

* Verify cluster nodes:

```powershell
Get-Cluster
Get-ClusterNode
Get-ClusterResource
```

* Check AD & DNS to confirm CNO and VCOs exist.


* If you plan to host roles (FS, SQL, etc.) create and validate them.

---

## 8) Common troubleshooting notes

* **Error 5043** typically resolves after `Clear-ClusterNode` + AD/DNS cleanup +


reboot.
* If cluster creation fails with AD permission errors, pre-create the CNO or adjust
OU permissions.
* AD replication delays: allow time for deleted objects to replicate across DCs.
* If something still shows as “joined to a cluster”: collect cluster logs:

```powershell
Get-ClusterLog -Destination C:\temp\ClusterLogs
```

Share logs if you want me to help analyze.

---

## Quick Summary (one-liner checklist)

1. Snapshot VMs.
2. On both nodes: `Stop-Service ClusSvc`, `Clear-ClusterNode`, `Restart-Computer`.
3. In AD: delete old CNO and VCOs.
4. In DNS: delete old cluster A/PTR records.
5. Rejoin nodes to domain if needed; `ipconfig /registerdns`.
6. Install Failover-Clustering, run `Test-Cluster`.
7. `New-Cluster -Name MyCluster -Node Node1,Node2 -StaticAddress 192.168.1.100`.
8. Verify and create roles.

---

Would you like a single PowerShell script (one to run on each node and another to
run on a management/DC host) that automates the node cleanup + AD/DNS removal tasks
(I’ll include safety prompts and backups)? If yes, tell me the exact node names,
desired cluster name and cluster IP and I’ll generate the scripts.

You might also like