Tech:LizardFS

LizardFS is an open source file storage system. It allows us to store files on multiple servers but have it act like it is one server.

Master
Miraheze run's a LizardFS master that is the most critical piece of the file storage infrastructure. It tells the clients which chunkserver to use. It also stores the metadata in /var/lib/lizardfs/.

You can also view information on your lizardfs cluster either using the UI or through the command.

If anything goes wrong on the master, you should check syslog or systemctl status lizardfs-master which should tell you if things are going wrong. If you find that the master is experiencing data corruption (e.g the metadata file) then you should either try to restore from the changeling files using

Chunkservers
LizardFS Chunkservers are essentially where all the data is stored. e.g if you store a png file, the file will be stored on the chunkservers with the metadata stored on the master.

Adding a new Chunkservers
Here are the steps you should follow when adding a chunkserver:

Step 1: Add chunkservers ip to https://github.com/miraheze/puppet/blob/master/modules/lizardfs/data/storage_firewall.yaml Step 2: Watch either https://lizard.miraheze.org/mfs.cgi or /mnt/mediawiki-static (to tell wether the storage has been added correctly).

Removing a Chunkserver
Here are the steps you should follow when removing a chunkserver:

Step 1: Add to hira for the chunkserver `lizardfs_chunkserver_mount_removal: true`. Step 2: Run puppet (you should see it change the `mfshdd.cfg` file. Step 2: Restart the chunkserver `sudo service lizardfs-chunkserver restart`.