# Fencing Configuration - Proxmox HA

Configuracao detalhada de fencing devices (STONITH) para High Availability.

---

## Opcao A: Watchdog (Software Fencing)

Mais simples, menos confiavel:

```bash
# Instalar watchdog em ambos nodes
apt install watchdog

# Load kernel module
modprobe softdog

# Auto-load on boot
echo "softdog" >> /etc/modules

# Configurar HA Manager para usar watchdog
# (automatico quando HA activado)
```

## Opcao B: IPMI/iLO (Hardware Fencing)

Mais confiavel, requer IPMI:

```bash
# Verificar IPMI disponivel
ipmitool lan print

# Configurar IPMI credentials (via BIOS ou ipmitool)

# Configurar em Proxmox (Web UI):
# Datacenter -> Fencing -> Add
# Type: IPMI
# IP: <node-ipmi-ip>
# Username: admin
# Password: <ipmi-pass>

# Test
fence_ipmilan -a <node-ipmi-ip> -l admin -p <pass> -o status
```

## Opcao C: Network Fencing (Menos Confiavel)

Usar apenas se IPMI nao disponivel:

```bash
# SSH-based fencing (perigoso)
# Depende de network estar up
# Nao recomendado para production
```

## Recomendacao Cluster Descomplicar

- **Inicio:** Watchdog (simple, funcional)
- **Producao:** IPMI se hardware suporta
- **Evitar:** Network fencing
