Skip to main content

Test failover

Mount the share on Windows:

PS C:\Users\tux> net use z: \\SMBCLUSTER\SH1 /USER:[email protected] <password>

Create a test file with the following syntax:

fsutil file createnew "FilePath\FileName.FileType" FileSize

FileSize is designated in bytes:

  • 1 MB = 1048576 bytes
  • 100 MB = 104857600 bytes
  • 1 GB = 1073741824 bytes
  • 10 GB = 10737418240 bytes
  • 100 GB =107374182400 bytes
  • 1 TB = 1099511627776 bytes
  • 10 TB =10995116277760 bytes Copy the test file from local client volume to SMB share. While copy is ongoing, place cluster services on one node in standby:
$ tux@dhcp-236:~$ sudo pcs node standby

Copy should continue without interruption. Confirm successful failover of resources: Before failover:

tux@dhcp-236:~$ sudo pcs status
Cluster name: tsmb_ha
Stack: corosync
Current DC: dhcp-236.tux.local (version 1.1.18-2b07d5c5a9) - partition with quorum
Last updated: Wed Apr 21 09:53:25 2021
Last change: Tue Apr 20 10:59:10 2021 by root via cibadmin on dhcp-236.tux.local
2 nodes configured
4 resources configured
Online: [ dhcp-236.tux.local dhcp-237.tux.local ]
Full list of resources:
virtual_ip_A (ocf::heartbeat:IPaddr2): Started dhcp-236.tux.local
virtual_ip_B (ocf::heartbeat:IPaddr2): Started dhcp-237.tux.local
Clone Set: tsmb_ha-clone [tsmb_ha]
Started: [ dhcp-236.tux.local dhcp-237.tux.local ]
Daemon Status:
corosync: active/disabled
pacemaker: active/disabled
pcsd: active/enabled

Failover:

tux@dhcp-236:~$ sudo pcs node standby
tux@dhcp-236:~$ sudo pcs status
Cluster name: tsmb_ha
Stack: corosync
Current DC: dhcp-236.tux.local (version 1.1.18-2b07d5c5a9) - partition with quorum
Last updated: Wed Apr 21 09:54:03 2021
Last change: Wed Apr 21 09:53:49 2021 by root via cibadmin on dhcp-236.tux.local
2 nodes configured
4 resources configured
Node dhcp-236.tux.local: standby
Online: [ dhcp-237.tux.local ]
Full list of resources:
virtual_ip_A (ocf::heartbeat:IPaddr2): Started dhcp-237.tux.local
virtual_ip_B (ocf::heartbeat:IPaddr2): Started dhcp-237.tux.local
Clone Set: tsmb_ha-clone [tsmb_ha]
Started: [ dhcp-237.tux.local ]
Stopped: [ dhcp-236.tux.local ]
Daemon Status:
corosync: active/disabled
pacemaker: active/disabled
pcsd: active/enabled