Difference between revisions of "OS4X Portal - shared storage"

From OS4X
Jump to navigation Jump to search
 
Line 36: Line 36:
  
 
=== systemd ===
 
=== systemd ===
 +
''Beware: your network config must also rely on systemd to work properly with automatic mounts at system boot. See https://wiki.debian.org/SystemdNetworkd.
 +
''
 +
 
Create a new systemd target file including the correct target directory name. In this example it is mounted in "<code>/opt/os4x/portal</code>", so the corresponding systemd name is "<code>opt-os4x-portal.mount</code>":
 
Create a new systemd target file including the correct target directory name. In this example it is mounted in "<code>/opt/os4x/portal</code>", so the corresponding systemd name is "<code>opt-os4x-portal.mount</code>":
 
  /etc/systemd/system/opt-os4x-portal.mount
 
  /etc/systemd/system/opt-os4x-portal.mount

Latest revision as of 10:21, 6 February 2025

Storage for portal jobs is typically provided by the DMZ, making communication possible from the internal zone to the DMZ. The shared storage saves the following information:

  • Outgoing portal jobs (from internal to DMZ)
    • outgoing job data
  • Incoming portal jobs
    • incoming job data
    • incoming job XML information

The storage can be located anywhere in the DMZ, offering a wide range of protocols usable to be implemented, such as:

  • NFS (most common, see example below)
  • CIFS
  • SSHFS
  • others

The storage must be read/writable by the user running the daemons.

NFS example

DMZ - NSF server

The DMZ server acts as NFS server, so the NFS server functionality must be available there. For OS4Xvirtual, the following package must be installed:

apt update && apt install nfs-server

On OS4X portal server side (DMZ), export a directory. Configuration file:

/etc/exports

Content (example):

/nfs 192.168.2.1(rw,sync,no_root_squash,no_subtree_check)

Activate export on DMZ side:

exportfs -a

internal zone - NFS client

The internal zone server acts as NFS client, so the NFS client functionality must be available there. For OS4Xvirtual, the following package must be installed:

apt update && apt install nfs-client

The NFS mount can be done in various ways, two of them are:

/etc/fstab

Add a line to the file "/etc/fstab":

192.168.40.64:/opt/os4x/portal /opt/os4x/portal	nfs rw,sync,hard,intr  0     0

systemd

Beware: your network config must also rely on systemd to work properly with automatic mounts at system boot. See https://wiki.debian.org/SystemdNetworkd.

Create a new systemd target file including the correct target directory name. In this example it is mounted in "/opt/os4x/portal", so the corresponding systemd name is "opt-os4x-portal.mount":

/etc/systemd/system/opt-os4x-portal.mount

The content is:

[Unit]
Description=OS4X Portal share
After=network.target

[Mount]
What=192.168.40.64:/opt/os4x/portal
Where=/opt/os4x/portal
Type=nfs
Options=_netdev,auto

[Install]
WantedBy=multi-user.target

Reload systemd to make the change effect:

systemctl daemon-reload

Enable the mount at boot-up:

systemctl enable opt-os4x-portal.mount

Configure shared storage (DMZ)

The path of the shared folder has to be defined in "Configuration" -> "OS4X Enterprise" -> "Portals" -> "Base directory for portal":

Bildschirmfoto 2019-04-08 um 13.34.47.png

Configure shared storage (internal)

The path of the shared directory has to be defined per attached portal server in the corresponding portal configuration in "Configuration" -> "OS4X Enterprise" -> "Portals" -> "Portal server", there in the editing/add window in the field "Base path":

Bildschirmfoto 2019-04-08 um 13.36.32.png