NEXItaliano

NEXFS › Documentation › Windows workstations

Windows workstations

By Roberto Arato of aratoingegneria.it

NEXFS runs on Linux servers, and Windows workstations use it with what Windows already does well: an SMB network share (the shared folders of File Explorer, network drives such as Z:), served by one or more Linux machines that mount NEXFS. For developers there is also WSL, the Linux inside Windows, which mounts NEXFS like any other node.

What you need Way For whom
Project folders and homes seen from File Explorer, CAD, Office Samba on a Linux machine that mounts NEXFS engineering offices, administration, everyone
The same files from Linux tools on the workstation WSL 2 with nexfs-client developers, users of Linux scripts and compilers

1. With Samba

A Linux machine (a node that mounts NEXFS, or a dedicated machine) exports a NEXFS folder with Samba. What the workstations write over SMB is seen at once by every node through its own mount, and the other way round (test P6.22: large and small files, renames and deletions, seen the same on both sides).

The exporting machine

sudo apt install samba
# NEXFS mounted on /nex (see "The client"), then the share:
sudo tee -a /etc/samba/smb.conf <<'EOF'
[projects]
   path = /nex/projects
   valid users = @projects
   read only = no
   create mask = 0660
   directory mask = 2770
EOF
sudo smbpasswd -a mario          # the user's SMB password
sudo systemctl restart smbd
  • Users and groups must be the same (same numbers) on the exporting machine and on the other nodes: permissions on NEXFS are the usual POSIX ones.
  • Samba writes with the rights of the connected user: what a user cannot do on NEXFS they cannot do over SMB either.
  • When a Windows program saves and asks for the data to really reach the disk, Samba passes it to NEXFS as fsync, and with NEXFS fsync means on the disks of several nodes.
  • For availability, the share can be served by two machines with an address that moves from one to the other (below, with NEX).

With NEX

If the cluster is managed by NEX, NEX does all of this: nexctl smb enable configures Samba on every compute node, homes and project folders become shares, SMB passwords follow the cluster users' passwords, and a virtual address (nex vip, port 445) always stays on a live node: if that node stops, the address moves to another one within seconds. Details in the NEX guide, "SMB share".

On the workstation

In File Explorer, Map network drive, or from the prompt:

net use Z: \\server\projects /user:mario /persistent:yes

With NEX, server is the name of the virtual address (for example smb.nex), so the workstation does not need to know which node is serving.

2. With WSL

WSL 2 is a real Linux inside Windows, with FUSE: it mounts NEXFS like any other client. Use it to run Linux tools (compilers, scripts, rsync) on the workstation over the same files as the cluster.

# inside WSL (Debian or Ubuntu)
sudo apt install ./nexfs-client_0.9.11_amd64.deb ./nexfs-tools_0.9.11_amd64.deb   # the client is enough, no daemon
# the client configuration and certificates, as for any client (see "The client")
sudo nexfs-client -c /etc/nexfs/nexfs.json /nex
  • The workstation must reach the meta nodes and data nodes on their ports (7400 and following): with WSL in mirrored networking mode it uses the Windows addresses.
  • The client certificate is made as for any other machine, with nexfs-setup join ... --client (see "Installation").
  • Windows programs see WSL files under \\wsl$\, but for them the right way is still Samba: it is faster and does not depend on the workstation.

See also