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-142:~$ sudo pcs node standby

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

tux@dhcp-142:~$ sudo pcs status
Cluster name: tsmb_ha
Stack: corosync
Current DC: dhcp-144.tux.local (version 1.1.18-2b07d5c5a9) - partition with quorum
Last updated: Fri Jun 11 12:21:55 2021
Last change: Fri Jun 11 12:15:18 2021 by root via cibadmin on dhcp-142.tux.local
2 nodes configured
2 resources configured
Online: [ dhcp-142.tux.local dhcp-144.tux.local ]
Full list of resources:
tsmb_ha (ocf::heartbeat:anything): Started dhcp-142.tux.local
virtual_ip (ocf::heartbeat:IPaddr2): Started dhcp-144.tux.local

Daemon Status:
corosync: active/disabled
pacemaker: active/disabled
pcsd: active/enabled

Failover:

tux@dhcp-142:~$ sudo pcs node standby
tux@dhcp-142:~$ sudo pcs status
Cluster name: tsmb_ha
Stack: corosync
Current DC: dhcp-144.tux.local (version 1.1.18-2b07d5c5a9) - partition with quorum
Last updated: Fri Jun 11 12:27:05 2021
Last change: Fri Jun 11 12:27:00 2021 by root via cibadmin on dhcp-142.tux.local
2 nodes configured
2 resources configured
Node dhcp-142.tux.local: standby
Online: [ dhcp-144.tux.local ]
Full list of resources:
tsmb_ha (ocf::heartbeat:anything): Started dhcp-144.tux.local
virtual_ip (ocf::heartbeat:IPaddr2): Started dhcp-144.tux.local

Daemon Status:
corosync: active/disabled
pacemaker: active/disabled
pcsd: active/enabled