fence_legacy: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On CentOS possible default full paths are:

/usr/sbin/fence_legacy - from package: pacemaker

You may install the required package with command yum install {package}
Error in other languages:
fence_legacy: bevel nie gevind nie
fence_legacy: comandă negăsită
fence_legacy: comando não encontrado
fence_legacy: commande introuvable
fence_legacy: command not found
fence_legacy: käsku ei ole
fence_legacy: không tìm thấy lệnh
fence_legacy: komanda nerasta
fence_legacy: Kommando nicht gefunden.
fence_legacy: kommandot finns inte
fence_legacy: komut yok
fence_legacy: nie znaleziono polecenia
fence_legacy: níor aimsíodh an t-ordú
fence_legacy: no se encontró la orden
fence_legacy: no s'ha trobat l'ordre
fence_legacy: opdracht niet gevonden
fence_legacy: parancs nem található
fence_legacy: perintah tidak ditemukan
fence_legacy: príkaz nenájdený
fence_legacy: příkaz nenalezen
fence_legacy: команда не найдена
fence_legacy: командата не е открита
fence_legacy: 命令找不到
fence_legacy: コマンドが見つかりません