{"id":27021709,"url":"https://github.com/hmknapp/lizardfs-docker","last_synced_at":"2026-05-20T05:04:09.384Z","repository":{"id":229223903,"uuid":"675117323","full_name":"HMKnapp/lizardfs-docker","owner":"HMKnapp","description":"Decided to open source my personal lizardfs cluster setup. This works (with qemu) on aarch64 hosts.","archived":false,"fork":false,"pushed_at":"2025-04-04T11:34:20.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T12:29:00.648Z","etag":null,"topics":["docker","lizardfs","moosefs"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HMKnapp.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-05T20:51:18.000Z","updated_at":"2025-04-04T11:34:24.000Z","dependencies_parsed_at":"2024-03-24T11:45:22.642Z","dependency_job_id":null,"html_url":"https://github.com/HMKnapp/lizardfs-docker","commit_stats":null,"previous_names":["hmknapp/lizardfs-docker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/HMKnapp/lizardfs-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HMKnapp%2Flizardfs-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HMKnapp%2Flizardfs-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HMKnapp%2Flizardfs-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HMKnapp%2Flizardfs-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HMKnapp","download_url":"https://codeload.github.com/HMKnapp/lizardfs-docker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HMKnapp%2Flizardfs-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276899391,"owners_count":25724564,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-25T02:00:09.612Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","lizardfs","moosefs"],"created_at":"2025-04-04T19:52:06.790Z","updated_at":"2025-09-25T10:21:58.824Z","avatar_url":"https://github.com/HMKnapp.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Notes\n\n\n\n== Services\n\n- ``lizardfs-cgiserver``\n- ``lizardfs-master``\n- ``lizardfs-metalogger``\n- ``lizardfs-chunkserver``\n- ``lizardfs-mount``\n\n=== Master\n\nUse default ``.env`` from ``master`` branch.\n\n=== Chunkserver\n\nIMPORTANT: Give each chunkserver its own branch with its own ``.env`` file. This is because ``.env`` is used to configure ``LABEL`` and disk mount points.\n\n== Build\n\n.Always build ``lizardfs-master``\n[NOTE]\n====\n``lizardfs-master`` in ``docker-compose.yml`` contains the image that all services share: ``hmknapp/lizardfs``\n\nNo other image needs to be built. Different roles are achieved by different service names and their ``ROLE`` environment variable.\n====\n\n=== Upgrade or rebuild\n\nIMPORTANT: Before upgrading, make sure you have a backup of all ``./data/*`` folders of all nodes, especially master and metalogger. Also keep ``authorized_keys`` from ``./data/mount/ssh/``.\n\n. Stop container\n+\n```\ndocker stop lizardfs-cgiserver\ndocker rm lizardfs-cgiserver\n```\n+\n. Build and start container\n+\n```\ndocker-compose build lizardfs-master\ndocker-compose up lizardfs-cgiserver -d\n```\n+\n. Renew SSH fingerprint for mount points by logging into ``lizardfs-mount`` once: ``ssh -p 22022 lizardfs@localhost``\n\n\n\n== Tips and tricks\n\n=== Disaster recovery using metaloggers\n\nNOTE: These steps are recorded from memory, may not be 100% correct.\n\n. Log into metalogger and run ``mfsmetarestore``\n+\n```\nmfsmetarestore -m mfsmetadata_ml.mfs -o /tmp/mfsmetadata.mfs change*\ncp session_ml.mfs /tmp/session.mfs\n```\n+\n. Copy metadata ``/tmp/*mfs`` to master’s ``./data/master/``\n. Add ``entrypoint: mfsmetarestore -a to master’s docker-compose.yml``\n. Run ``docker-compose up lizardfs-master`` once\n. Remove lock files from master dir, ``./data/master/*lock``\n. Remove ``entrypoint: mfsmetarestore -a`` from lizardfs-master in ``docker-compose.yml``\n. Start master again, ``docker-compose up lizardfs-master -d``\n\n\n\n\n=== Common Errors\n\n- ``[error] [1:1] : can't create lockfile /var/lib/lizardfs/.mfschunkserver.lock: Permission denied``\n+\nMake sure the ``./data/*`` volume directories have correct permissions for user running docker.\n\n\n=== Startup\n.Example: Crontab on chunkserver (192.168.111.3)\n[source]\n----\n@reboot while ! timeout 2 ping -c 1 -n supernode.ntop.org; do sleep 5; done; sleep 5; sudo edge -c SWARM_NAME -k SECRET_KEY -a 192.168.111.3 -l supernode.ntop.org:7777\n\n@reboot while ! [[ -d /mnt/wd-elements-16T/docker ]]; do sleep 3; done; while ! timeout 2 ping -c 1 -n 192.168.111.1; do sleep 0.5; done; sleep 10; sudo systemctl start docker\n\n@reboot while ! timeout 2 ping -c 1 -n 192.168.111.1; do sleep 0.5; done; while ! netcat -z localhost 22022; do sleep 1; done; sleep 1m; sshfs -p 22022 -o allow_root,allow_other,reconnect,ServerAliveInterval=15,ServerAliveCountMax=999,max_conns=12 lizardfs@localhost:/lfs /mnt/lizardfs/\n----\n\nNOTE: I am aware you can use services to wait for a network connection, but I have had success with the above method.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmknapp%2Flizardfs-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhmknapp%2Flizardfs-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmknapp%2Flizardfs-docker/lists"}