2

does anyone know how to create a shared folder in any distribution of Linux that could be accessible by Windows and would be HA (high available)?

Background: I have Windows Server cluster and it needs a witness. Two types are available – shared folder and shared disk. Having only one witness is pretty dangerous, so a high available witness is needed.

Basically, it should be a shared folder (preferably by samba) that is clustered between two computers and accessible from single IP address. Data should be written to both storages simultaneously or first to primary and then immediately to secondary (both storages must be the same). When one computer dies, other should take its place with the same IP. There is no shared storage.

What I found so far is that there should be two solutions - DRBD and CTDB. Somewhere says both of those together. There is some information scattered over the internet, but no complete solutions. I found this to be probably the best instructions https://wiki.samba.org/index.php/5.0:_Heartbeat_HA_Configuration, but I don't need any DNS, LDAP or User Management.

Any Linux superuser that could create this cluster?

TBS
  • 21
  • 2

3 Answers3

1

I have Windows Server cluster and it needs a witness. Two types are available – shared folder and shared disk. Having only one witness is pretty dangerous, so a high available witness is needed.

You're over-engineering this! Windows Server Failover Cluster (WSFC) does NOT require any HA voting entities. Cluster-in-a-Cluster?! It kinda compromises the whole idea of having a cluster. All you need is odd number of combined servers, witness disks and / or file shares to create an initial quorum.

(Configure and manage quorum)

https://learn.microsoft.com/en-us/windows-server/failover-clustering/manage-cluster-quorum

(WSFC Quorum Modes and Voting Configuration, SQL Server)

https://learn.microsoft.com/en-us/sql/sql-server/failover-clusters/windows/wsfc-quorum-modes-and-voting-configuration-sql-server?view=sql-server-ver16

OK, that's for SQL Server, but it's a very good reading as it's about WSFC first way.

TL;DR: Just stick with a non-HA "normal" SMB2/3 file share and call it a day! Witness disks aren't recommended as they are tricker to configure (for file share you don't need to do virtually anything except set the access rights, see the link follows) and MSFT is rumored to deprecate this functionality at the long run.

(Deploy a file share witness)

https://learn.microsoft.com/en-us/windows-server/failover-clustering/file-share-witness

Moreover, it's strongly recommended to avoid DRBD in production. It's prone to creating a split brain scenarios and requires lots of manual tinkering and babysitting.

(What is DRBD split-brain?)

https://www.ibm.com/support/pages/qradar-what-drbd-split-brain

RiGiD5
  • 1,241
  • 1
  • 8
  • 12
0

I wouldn't recommend it because you are mixing up two filesystems, a Windows cluster uses system users for the cluster which need access to the shares which the linux filesystem isn't aware of.

Create a windows fileserver or add an extra disk to the cluster nodes.

You might be able to create an iSCSI server: https://www.howtoforge.com/tutorial/how-to-setup-iscsi-storage-server-on-ubuntu-2004-lts/ in linux

Ace
  • 478
  • 1
  • 6
  • Thank you for the advice, but Windows cluster needs only to write some data (couple MBs) to the folder with a simple user/password access. There shouldn't be any problem with that. I am also exploring the possibility of clustered iSCSI disk over two Linux boxes. The important thing here is that it must be HA - that link doesn't using it. – TBS Jun 27 '22 at 22:31
  • No, it’s not. You don’t need any HA quorum disks. – BaronSamedi1958 Jul 14 '23 at 12:54
-2

Pacemaker is the cluster resource manager for Linux that you're looking for (Heartbeat is old and unmaintained). You can use that to control DRBD primary/secondary, moving virtual IP addresses (your single shared IP), starting stopping Samba via systemd (or maybe there is a specific resource agent for Pacemaker), and any other services you might want to tack onto the cluster.

This questions is almost definitely going to get removed since you're looking for recommendations instead of asking a specific question. So come back once you've tried setting something up with Pacemaker.

Matt Kereczman
  • 1,899
  • 9
  • 12