- How do I completely reset a cluster ?
The simplest way is to create a new metadata file. Go to your metadata directory on your current master server (look at the DATA_PATH in the mfsmaster.cfg file), than stop the master and create a new empty metadata file by executing:
echo -n "MFSM NEW" > metadata.mfs
Start the master and your cluster will be clear, all remaining chunks will be deleted.
- How do I create a full backup of all my metadata (in case of recreating a master etc...)
Copy your data directory somewhere safe (default path: /var/lib/mfs).
Files you should be interested in keeping are primarily:
- metadata.mfs - your metadata set in binary form. This file is updated hourly + on master server shutdown. You can also trigger a metadata dump with lizardfs-admin save-metadata HOST PORT, but an admin password needs to be set in the mfsmater.cfg first.
- sessions.mfs - additional information on user sessions.
- changelog*.mfs - changes to metadata that weren’t dumped to metadata.mfs yet.