sudo nano /etc/systemd/system/lucidlink.service
[Unit]
Description=LucidLink filespace Daemon
After=network-online.target
[Service]
Type=simple
#User=<user>
#Group=<group>
#WorkingDirectory=/home/<user>
ExecStart=/usr/local/bin/lucid daemon --fs <filespace.domain> --user <fsuser> --password <fsusrpwd> --mount-point <mount>
ExecStop=/usr/local/bin/lucid exit
Restart=on-abort
[Install]
WantedBy=multi-user.target
Passwords with special characters will require single ' ' or double " " quoting, or sufficient escaping, depending on the special characters or consult our KB which leverages systemd-escape.
Modify the command-line arguments accordingly
lucid daemon
--fs filespace.domain --user user1 --password password1 --mount-point
/media/filespace
You can create multiple systemd unit files to start multiple instances, either the same filespace, different filespaces, or perhaps snapshots. Using the option --instance
within the daemon
sub-command on both the ExecStart
and ExecStop
lines. If you do not specify this then the instance number will default to 0 and 2 daemons cannot use the same instance number simultaneously on the same system.
Also consider including the --root-path </cache/location>
option if you want to specify the data, and metadata, cache location.
Uncomment and modify the systemd unit file's User, Group and WorkDirectory variables should you choose to run the service as a different Linux user. The default is root when no user or group is specified.
If you require a Linux User, other than the one specified in the systemd unit file, to access the mountpoint you should consider the --fuse-allow-other
option, see below for more information.
Reload systemd unit files (to pick up modifications to the unit files):
systemctl daemon-reload
Start the LucidLink daemon systemd service:
systemctl start lucidlink.service
Check the LucidLink systemd service:
systemctl status lucidlink.service
If you have a systemd error or the filespace did not mount, or if you make changes to the systemd service, you will need to reload the systemd daemon systemctl daemon-reload
.
If there are no errors in the systemd service check that the filespace mount-point exists.
ls /media/<mount>
Review the systemd service history:
journalctl -u lucidlink.service
Enable the LucidLink systemd service:
systemctl enable lucidlink.service
Optionally if you would like to run your systemd service as a different user other than root, you can uncomment and specify the appropriate systemd unit User, Group and WorkingDirectory.
You can then provide the daemon with the --fuse-allow-other
option, to enable other users on the same Linux machine to access the mount-point.
Note: Filesystem in Userspace (FUSE) allow_other
is separate to user permissions. The user running the daemon controls their permissions, other users on the Linux system must have appropriate permissions.
Edit fuse.conf
and uncomment (remove #
) if you'd like the mount-point to be accessible to other users.
sudo nano /etc/fuse.conf
user_allow_other
Alternatively, run sed -i 's/#user_allow_other/user_allow_other/g' /etc/fuse.conf
[Unit]
Description=LucidLink filespace Daemon
After=network-online.target
[Service]
Type=simple
User=<user>
Group=<group>
WorkingDirectory=/home/<user>
ExecStart=/usr/local/bin/lucid daemon --fs <filespace.domain> --user <fsuser> --password <fsusrpwd> --mount-point <mount> --fuse-allow-other
ExecStop=/usr/local/bin/lucid exit
Restart=on-abort
[Install]
WantedBy=multi-user.target
If you are seeing timeouts due to slow network initialisation in a virtual environment, try adding the following extra line after WorkingDirectory ExecStartPre=/bin/sleep 30
to inject a sleep before ExecStart
.
Advanced post operations such as increasing the client cache and or configuring the object storage maximum upload and download rates can be achieved with ExecStartPost
systemd unit option.