diff options
author | Pjotr Prins | 2023-12-03 09:35:19 -0600 |
---|---|---|
committer | Pjotr Prins | 2023-12-03 09:35:21 -0600 |
commit | 42e6f37e9d1b0cf7d903dfdc4c5ee53fa625999d (patch) | |
tree | ed3ceecb3233b87c55422756e06f82715087ffdf /topics/octopus/lizardfs | |
parent | e03f2fa628cdc4d464c8e8b2cd185ec5a1880eb4 (diff) | |
download | gn-gemtext-42e6f37e9d1b0cf7d903dfdc4c5ee53fa625999d.tar.gz |
Notes on lizardfs
Diffstat (limited to 'topics/octopus/lizardfs')
-rw-r--r-- | topics/octopus/lizardfs/README.gmi | 53 |
1 files changed, 52 insertions, 1 deletions
diff --git a/topics/octopus/lizardfs/README.gmi b/topics/octopus/lizardfs/README.gmi index 3a07505..78316ef 100644 --- a/topics/octopus/lizardfs/README.gmi +++ b/topics/octopus/lizardfs/README.gmi @@ -118,13 +118,64 @@ It has not yet been tested to see how much this affects reading and writing to t # Adding a node to the pool +We can add a mount point using mfsmount using systemd + +``` +[Unit] +Description=LizardFS mounts +After=syslog.target network.target + +[Service] +Type=forking +TimeoutSec=600 +ExecStart=/usr/local/guix-profiles/octo/bin/mfsmount -c /etc/lizardfs/mfsmount.cfg +ExecStop=/usr/bin/umount /lizardfs + +[Install] +WantedBy=multi-user.target +``` + +note it runs as the root user. + +It is a good idea to also run a chunk server on the node, so it effectively can cache information locally. For this we create a lizard account: + ``` addgroup -gid 600 lizardfs adduser -uid 600 -gid 600 lizardfs ``` -In password +In password file ``` lizardfs:x:600:600:Lizard,,,:/var/lib/lizardfs:/bin/sbin/nologin ``` + +Now we can run + +``` +/usr/local/guix-profiles/octo/sbin/mfschunkserver -c /etc/lizardfs/mfschunkserver_hdd.cfg -d start +``` + +and set up systemd with something like + +``` +[Unit] +Description=LizardFS chunkserver daemon +Documentation=man:mfschunkserver +After=local-fs.target network.target lizardfs-master.service +Wants=local-fs.target network-online.target + +[Service] +Type=notify +ExecStart=/usr/local/guix-profiles/octo/sbin/mfschunkserver -c /etc/lizardfs/mfschunkserver_hdd.cfg -d start +ExecReload=/bin/kill -HUP $MAINPID +Restart=on-abort +OOMScoreAdjust=-999 +IOAccounting=true +IOWeight=250 +StartupIOWeight=100 +KeyringMode=inherit + +[Install] +WantedBy=multi-user.target +``` |