Hallo,
ich baue gerade einen hochverfügbaren NFS Server mit Ubuntu Server 14.04.
Dazu habe ich zwei virtuelle Maschinen ha-nfs-node1 und ha-nfs-node2.
drbd funktioniert und synchronisiert das Device /dev/drbd0 prima.
nfs-kernel-server liefert über /srv/data/export das Verzeichnis aus.
Zumindest wenn ich das per Hand starte.
Jetzt möchte ich das alles automatisch über heartbeat/pacemaker/corosync gestartet wird. Nur habe ich Probleme mit der richtigen crm konfiguration.
Hier mal meine Config:
crm(live)configure# show node $id="181540116" ha-nfs-node1 \ attributes standby="off" node $id="181540119" ha-nfs-node2 \ attributes standby="off" primitive FailoverIP ocf:heartbeat:IPaddr \ params ip="10.210.21.121" cidr_netmask="24" \ op monitor interval="10" timeout="20" start-delay="0" primitive FileSystemDRBD0 ocf:heartbeat:Filesystem \ params device="/dev/drbd0" directory="/srv/data" fstype="ext4" \ op start interval="0" timeout="60" \ op stop interval="0" timeout="60" fast_stop="no" \ op monitor interval="40" timeout="60" start-delay="0" \ op notify interval="0" timeout="60" \ meta target-role="Started" primitive VolumeDRBD0 ocf:linbit:drbd \ params drbd_resource="nfs" \ op start interval="0" timeout="240" \ op promote interval="0" timeout="90" \ op demote interval="0" timeout="90" \ op stop interval="0" timeout="100" \ op monitor role="Master" interval="10" \ op monitor role="Slave" interval="40" timeout="60" start-delay="0" \ op notify interval="0" timeout="90" \ meta target-role="started" primitive p_exportfs_root ocf:heartbeat:exportfs \ params fsid="0" directory="/srv/data/export" options="rw,crossmnt" clientspec="10.210.21.10/255.255.255.0" \ op monitor interval="30s" \ op start interval="0" timeout="40" \ meta target-role="Started" ms MasterDRBD0 VolumeDRBD0 \ meta clone-max="2" notify="true" master-max="1" master-node-max="1" clone-node-max="1" target-role="Started" location cli-prefer-MasterDRBD0 MasterDRBD0 inf: ha-nfs-node1 colocation EXPORT_DRBD0 inf: FileSystemDRBD0 MasterDRBD0:Master colocation c_nfs_on_root inf: FileSystemDRBD0 p_exportfs_root order DRBD-Before-NFS0 inf: MasterDRBD0:promote FileSystemDRBD0:start property $id="cib-bootstrap-options" \ dc-version="1.1.10-42f2063" \ cluster-infrastructure="corosync" \ stonith-enabled="false" \ no-quorum-policy="ignore" rsc_defaults $id="rsc-options" \ resource-stickiness="200"
drbd wird gestartet, die FailoverIP auch.
Das Device /devdrbd0 wird aber nicht nach /srv/data gemountet und der NFS Server kommt auch nicht hoch.
Ich habe diese Anleitung benutzt, https://help.ubuntu.com/community/HighlyAvailableNFS/ , auch wenn ein wenig abgwandelt, da meine virtuellen Maschinen nur eine Netzwerkkarte haben.
Danke im vorraus, bin für jeden Tipp dankbar.
Gruß goblin