LucidLink Linux systemd service

David Bull
David Bull
  • Updated

Install LucidLink client systemd service to survive system reboot, re-activate and automatically mount Filespace in the preferred system location, running as root and allowing all users to access the Filespace.

In this article we have an automated script which takes various arguments and generates a systemd service, alternatively a manual configuration.

Pre-requisite: Download install LucidLink OS client for Linux

wget https://www.lucidlink.com/download/latest/lin64/stable/ -O lucidinstaller.deb
sudo apt update -y
sudo apt upgrade -y
sudo apt install ./lucidinstaller.deb -y

Automated script components:

LucidLinkInstall.sh (script to install systemd service based on template)

LucidLink.service.config (lucidlink filespace daemon service template)

Configuration:

wget -O LucidLinkInstall.sh https://lucidlink.zendesk.com/hc/article_attachments/5778431478925/LucidLinkInstall.sh
wget -O LucidLink.service.config https://lucidlink.zendesk.com/hc/article_attachments/10854485047821/LucidLink.service.config
chmod +x LucidLinkInstall.sh
sudo ./LucidLinkInstall.sh <filespace.domain> <filespace-user> <filespace-password> <mountpoint>

Example:

sudo ./LucidLinkInstall.sh filespace.lucidlink root 12345 /mnt/Lucid
Installs LucidLink.service within /etc/systemd/system
Passwords with special characters will require strong quoting ' '
 
Notes:
Make sure the lucid daemon is successfully connected (linked to the filespace and mounted) before applying any additional commands in your ExecStartPost steps. Otherwise, these steps might fail and trigger the ExecStop command. 
 
Manual configuration:
 

Create lucidlink.service within /etc/systemd/system as you indicated you require sudo on the VM assume you will need to run systemd with appropriate user/group and FUSE allow-other. 

Create <llmount> mount-point with `777` everyone for example /mnt/filespace

sudo mkdir /mnt/<llmount>
sudo chmod -R 777 /mnt/<llmount>

Edit fuse.conf and uncomment (remove #)

sudo nano /etc/fuse.conf

    `user_allow_other`
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/bin/lucid daemon --fs <filespace.domain> --user <lluser> --password <llpassword> --mount-point <llmount> --fuse-allow-other
    ExecStop=/usr/bin/lucid exit
    Restart=on-abort
    [Install]
    WantedBy=multi-user.target 

Modify accordingly for example: `lucid daemon --fs myfilespace.mydomain --user user1 --password password1 --mount-point /media/filespace --root-path /mnt/data/lucid --fuse-allow-other`
If seeing timeouts to due to slow network coming online in a virtual environment try adding extra line after WorkingDirectory `ExecStartPre=/bin/sleep 30` to inject a sleep before `ExecStart`.

Reload systemd daemon

systemctl daemon-reload

Enable the LucidLink systemd service

systemctl enable lucidlink.service

Start LucidLink daemon systemd service

systemctl start lucidlink.service

Check LucidLink systemd service

systemctl status lucidlink.service 

If you have systemd error or the Filespace did not mount, if you make changes to the systemd service you will need to reload the systemd "daemon" - `systemctl daemon-reload`.

If no error in systemd service check Filespace mount-point exists.

ls /media/<llmount>

Review the systemd service history

journalctl -u lucidlink.service

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Article is closed for comments.