How to Setup A LizardFS Distributed Filesystem

How to Setup A LizardFS Distributed Filesystem

Setting up Lizard FS

In this section, the speaker introduces Lizard FS and explains its purpose as a distributed file system. They also discuss the components involved in setting up Lizard FS.

Understanding Lizard FS

  • Lizard FS is a distributed file system that combines multiple physical systems into one logical file system.
  • It is designed to manage data across multiple systems, regardless of their size or type of hard drives.
  • The setup includes multiple computers acting as file servers, a master server for managing data distribution, and a client for accessing the file system.

Components of Lizard FS

  • File Servers: These are the systems that hold the data and can be configured with different storage capacities.
  • Master Server: The master server manages which data goes where in the file system.
  • Client: The client allows users to read and access files on the Lizard FS. It is primarily available for Linux distros but can be used on OSX with additional software.

Data Distribution

  • Chunk Service: This service splits data into smaller chunks and distributes them across different systems.
  • Chunks can be distributed in various ways, such as placing one chunk on one system or using mirroring or parity configurations.
  • Parity configurations offer better protection and error correction compared to mirroring.

Backup and Metadata Management

  • Backup Masters: Additional masters can be added as backups to ensure redundancy in case of failure.
  • Metadata Management: Lizard FS maintains metadata that keeps track of where data is stored, allowing efficient retrieval by clients.

Reading and Writing Data in Lizard FS

This section explains how reading and writing operations work in Lizard FS. It also mentions some important considerations when using it.

Reading Data

  • When a client wants to read a file, it queries the master server to determine the locations of the file's chunks.
  • The data is retrieved directly from the systems holding the chunks, bypassing the master server.

Writing Data

  • When a client wants to write a file, Lizard FS determines where each chunk should be stored based on its size and configuration.
  • The data is then written to the appropriate systems and confirmed by Lizard FS.

Considerations

  • Lizard FS is mostly single-threaded and not very CPU-intensive for normal home use.
  • A CGI server provides a web interface to monitor chunks, servers, and errors in Lizard FS.
  • Lizard FS supports running on virtual machines (VMs) for flexibility in deployment.

Additional Features and Recommendations

This section covers some additional features of Lizard FS and offers recommendations for home users.

Additional Features

  • CGI Server: Provides a user-friendly website interface to monitor chunks, servers, and drives with errors.
  • Drives can be configured as RAID or individual drives within each system.
  • Mirroring is automatically distributed across all servers except for the same system as the mirror source.

Recommendations for Home Users

  • Single Master Setup: For most home setups, a single master server is sufficient. However, an additional backup master can be added if desired.
  • Data Protection: Using mirroring or parity configurations ensures data redundancy and protection against drive failures.
  • Parity configurations offer better protection compared to mirroring but may require more disk space.
  • Trashcan Feature: Lizard FS has a built-in trashcan that retains deleted files for one day before permanently deleting them during downtime.

There are more advanced features available in Lizard FS, but they are not covered in this transcript.

Performance and Networking Requirements

The speaker discusses the performance requirements for optimal usage of a system. They recommend having at least gigabit networking, preferably 10 gigabit, for better scalability.

Networking Requirements

  • Gigabit or 10 gigabit networking is recommended for optimal performance.
  • Large installations may require even higher network speeds.
  • Blusterous F is not suitable for virtual machines as it performs poorly in that context.

Distributed Setups and Storage

  • Blusterous F is great for home use when you need more storage than a single system can provide.
  • It allows you to easily add more systems in the future and automatically balances data across them.
  • Adding additional storage does not require reconfiguring existing setups.

Operating System Compatibility

The speaker discusses the compatibility of different operating systems with Blusterous F. They mention an issue they encountered with Debian but state that they personally prefer using CentOS 7.

Operating System Compatibility

  • While the speaker prefers CentOS 7, any operating system can be used with Blusterous F.
  • An issue was encountered when running on Debian, specifically related to the master node's connectivity.
  • For simplicity, the demonstration will focus on using CentOS 7.

Installation Procedure - Part 1

The speaker begins explaining the installation procedure for setting up Blusterous F on CentOS 7. They start by showing the installer interface and discussing various options.

Installer Interface and Initial Setup

  • The installer interface has remained largely unchanged since 2014.
  • Time zone configuration should be set according to your location.
  • Language selection defaults to English but can be changed if desired.
  • Minimal install is recommended, but additional components can be included based on the specific image being used.

Installation Procedure - Part 2

The speaker continues explaining the installation procedure for setting up Blusterous F on CentOS 7. They discuss partitioning options and provide recommendations.

Partitioning Options

  • LVM and btrfs are available as partitioning options, but the speaker prefers not to use them when running ZFS.
  • The OPM option allows for easy expansion by increasing the drive size or adding a second one.
  • Separate partitions like /home and /tmp are not necessary unless dealing with massive amounts of storage.

Network Configuration

The speaker explains network configuration settings for Blusterous F, including hostname and DNS setup.

Hostname and DNS Configuration

  • Setting the hostname correctly is important, especially when multiple systems are present on the network.
  • By default, the hostname is set to "m FS master" in Blusterous F.
  • DNS configuration should ensure that all systems use the IP address of the Blusterous F master node as their DNS server.

Post-installation Setup

The speaker discusses post-installation setup steps, including SSH access and customizing sudo permissions.

SSH Access and Sudo Configuration

  • After installation, SSH access can be used to connect to the Blusterous F system using username/password authentication.
  • To save time typing sudo repeatedly, it is possible to configure sudo without password prompt. However, this may compromise security.

Additional Software Installation

The speaker demonstrates installing additional software packages on CentOS 7 for enhanced functionality.

Installing Additional Software Packages

  • Use the command sudo yum install -y to install desired packages.
  • The speaker installs key monitoring tools and utilities for system management.
  • CentOS 7 has limited repositories, so additional steps may be required to access more packages.

The transcript provided does not cover the entire video.

Setting up the Terminal and Disabling Firewall

The speaker discusses setting up the terminal and disabling the firewall for home use.

Terminal Setup

  • Use sudo system control on to disable the firewall.
  • Follow instructions on a website to use a file and generate reports.
  • Disabling the firewall is not necessary for most home uses.

Installing LizardFS and Configuring Hosts

The speaker explains how to install LizardFS and configure hosts.

Installing LizardFS

  • Ping MF s master to obtain the IP address.
  • Install LizardFS by going to the website, downloading it, and following installation instructions based on your distribution (CentOS 7 or Red Hat Enterprise Linux 7).
  • Use sudo yum install lizard FS - master to install LizardFS master.
  • Use sudo yum install lizard FS - cgi to install the web interface server (CGI server).

Downloading and Installing LizardFS

The speaker provides step-by-step instructions for downloading and installing LizardFS.

Downloading LizardFS

  • Visit the official website of LizardFS (lizardsystems.com) or search for it on Google.
  • Download LizardFS from their site.
  • Choose the appropriate repository based on your distribution (CentOS 7 or Red Hat Enterprise Linux 7).
  • Paste the provided command in the terminal to install LizardFS.

Updating Packages and Installing LizardFS Master

The speaker demonstrates updating packages and installing LizardFS master.

Updating Packages

  • Use sudo yum update to update all packages.
  • Fetch new repositories using sudo yum update.

Installing LizardFS Master

  • Install LizardFS master by using the command sudo yum install lizard FS - master.
  • Additionally, install LizardFS CGI server with the command sudo yum install lizard FS - cgi.

Configuring Hosts and Pinging MF s Master

The speaker explains how to configure hosts and ping MF s master.

Configuring Hosts

  • Use sudo vim /etc/hosts to edit the hosts file.
  • Ensure that when you ping MF s master, it goes to the correct port.
  • Perform this configuration on all systems being used.

Pinging MF s Master

  • Ping MF s master to verify that it returns its own IP address.

Setting Up Metadata Files and Changing Directory

The speaker discusses setting up metadata files and changing directories.

Setting Up Metadata Files

  • Change directory to /var/lib/lizardfs, where metadata files are stored.
  • Copy the metadata file using cp metadata /metadata.backup (optional).
  • Resetting the metadata is recommended in case of any issues.

Changing Directory

  • Change directory to /mnt/mfs, where most of your files will be located.
  • Edit the configuration file using sudo vim /etc/mfs/mfsexports.cfg.

Editing Configuration Files for LizardFS

The speaker explains how to edit configuration files for LizardFS.

Editing Configuration Files

  • Copy the exports configuration file using sudo cp /etc/mfs/mfsexports.cfg /etc/mfs/export.cfg.
  • By default, allow read and write access for all data and metadata.
  • No security settings are being set up at this point.

Understanding LizardFS Goals Configuration

The speaker provides an overview of LizardFS goals configuration.

LizardFS Goals Configuration

  • The mfs-goals.cfg file contains different configurations for the number of copies.
  • Each configuration represents a different number of copies on different servers or hard drives.
  • By default, there are five different configurations.

Checking LizardFS Master and Editing Configurations

The speaker demonstrates checking LizardFS master and editing configurations.

Checking LizardFS Master

  • Use ls to list the files in the directory.
  • Check the mfsmaster.cfg file using sudo vim /etc/mfs/mfsmaster.cfg.

Starting LizardFS Master and Trunk Server

The speaker explains how to start LizardFS master and trunk server.

Starting LizardFS Master

  • Start LizardFS master using sudo systemctl start lizard FS - master.

Starting Trunk Server

  • Start trunk server using sudo systemctl start lizard FS - trunk.
  • Enable trunk server by running sudo systemctl enable lizard FS - trunk.

Setting Up File System and Connecting Trunk Servers

The speaker discusses setting up the file system and connecting trunk servers.

Setting Up File System

  • Set up any POSIX file system on Linux (e.g., XFS, OCFS).
  • Use commands like sudo mkfs.xfs /dev/sda1 to format the drive.

Connecting Trunk Servers

  • Connect additional trunk servers to the system.
  • Follow similar steps as before to set up a second trunk server.

Setting up Mount Locations for Drives

In this section, the speaker explains how to set up mount locations for drives and discusses two different approaches: setting up a RAID 5 or showing individual disks.

Mounting the Disk

  • Use the command sudo view ok ID to list all the UUIDs of your drives.
  • Format the disk using sudo mkfs not XF pass slash def such stb-1.
  • Create a permanent mount by editing /etc/fstab using a text editor like nano.
  • Copy and paste the UUID into /etc/fstab and specify the mount point and file system type (e.g., XFS).
  • Save the changes and run sudo mount -a to check if it was successful.

Installing LizardFS

This section covers installing LizardFS, a distributed file system.

Installing LizardFS Packages

  • Install LizardFS by running sudo dnf install lizardfs-chunk-server.
  • Update the system with sudo dnf update.

Configuring LizardFS Chunk Server

Here, we learn about configuring the chunk server in LizardFS.

Editing Configuration Files

  • Edit /etc/hosts to add an entry for MF s master.
  • Edit /etc/mfshdd.cfg to specify which drives you want to use.
  • Make a copy of original files before making any changes for backup purposes.

Chunk Server Configuration

This section focuses on configuring options for the chunk server in LizardFS.

Chunk Server Configuration Options

  • Configure options such as user, group, port number, and amount of space to leave on each hard drive in /etc/mfshdd.cfg.
  • Use sudo systemctl stop filebaldy to stop the filebaldy service.
  • Start the LizardFS chunk server with sudo systemctl start lizardfs-chunk-server.

The transcript is in English, so the summary and headings are also in English.

New Section

The speaker discusses the process of restarting the trunk server, which will allow for the utilization of 1.8 terabytes of storage. They mention that this will show all the disks and servers connected to it, as well as provide information on data movement and file system objects.

Restarting the Trunk Server

  • The trunk server needs to be restarted to enable its functionality.
  • After restarting, it will display information about disks, servers, and charts.
  • This allows for monitoring data movement and file system objects.

New Section

The speaker explains that copying files to the trunk server can be used for testing purposes. They mention that during this process, the number of chunks and file system objects gradually increase.

Copying Files to the Trunk Server

  • Copying files to the trunk server is useful for testing.
  • As files are copied, the number of chunks increases.
  • The amount of file system objects also increases over time.

New Section

The speaker demonstrates how to set goals in a different server with mounted lizard FS. They explain that setting goals helps monitor endangered chunks (with only one copy) and their movement towards valid copies.

Setting Goals in Lizard FS

  • Access a different server with mounted lizard FS using CD command.
  • Use "em FS" command to set goals recursively in directories.
  • Set a custom goal number for a specific directory.
  • Monitor endangered chunks (with only one copy) and their movement towards valid copies.

New Section

The speaker mentions that after setting goals, they can observe on a monitoring page that endangered chunks are being moved to valid copies. They highlight that reloading the page shows more chunks being copied and data being consistently moved in the network status.

Monitoring Chunk Movement

  • After setting goals, monitor endangered chunks on a monitoring page.
  • Endangered chunks are gradually moved to valid copies.
  • Reloading the page shows more chunks being copied.
  • The network status of the server indicates consistent data movement.

New Section

The speaker concludes by expressing hope that the video has helped viewers set up their unloosen FS system and initiate data copying and movement.

Conclusion

  • The video aims to assist in setting up an unloosen FS system.
  • It provides guidance on copying files and monitoring data movement.
  • Viewers are encouraged to follow the instructions for successful setup.
Video description

I show how to setup LizardFS with a few systems. This is a good simple solution to have multiple with one large shared redundant volume. This is a good way to expand storage from a single server to multiple systems.

How to Setup A LizardFS Distributed Filesystem | YouTube Video Summary | Video Highlight