Note
|
Always build
lizardfs-master
No other image needs to be built. Different roles are achieved by different service names and their |
Important
|
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/ .
|
-
Stop container
docker stop lizardfs-cgiserver docker rm lizardfs-cgiserver
-
Build and start container
docker-compose build lizardfs-master docker-compose up lizardfs-cgiserver -d
-
Renew SSH fingerprint for mount points by logging into
lizardfs-mount
once:ssh -p 22022 lizardfs@localhost
Note
|
These steps are recorded from memory, may not be 100% correct. |
-
Log into metalogger and run
mfsmetarestore
mfsmetarestore -m mfsmetadata_ml.mfs -o /tmp/mfsmetadata.mfs change* cp session_ml.mfs /tmp/session.mfs
-
Copy metadata
/tmp/*mfs
to master’s./data/master/
-
Add
entrypoint: mfsmetarestore -a to master’s docker-compose.yml
-
Run
docker-compose up lizardfs-master
once -
Remove lock files from master dir,
./data/master/*lock
-
Remove
entrypoint: mfsmetarestore -a
from lizardfs-master indocker-compose.yml
-
Start master again,
docker-compose up lizardfs-master -d
-
[error] [1:1] : can’t create lockfile /var/lib/lizardfs/.mfschunkserver.lock: Permission denied
Make sure the
./data/*
volume directories have correct permissions for user running docker.
@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
@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
@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/
Note
|
I am aware you can use services to wait for a network connection, but I have had success with the above method. |