Network Storage Project - jude-lindale/Wiki GitHub Wiki

Enviroment Minimun requirements

  • 4 Centos 7 minimum
    • 1 Master server (moose1)
      • moose1 IP: 10.0.5.200/24
    • 1 Meta Server(moose2)
      • moose2 IP: 10.0.5.16/24
    • 2 Chunk servers with at least 2HDD or 2 Partition
      • moose3 IP: 10.0.5.17/24
      • moose4 IP: 10.0.5.18/24
    • 2 client
      • moose3 IP: 10.0.5.17/24
      • moose4 IP: 10.0.5.18/24
  • A working DNS on the master server

Installing MooseFS:

As Root on all machines:

  • Add the appropriate key to package manager:

    curl "http://ppa.moosefs.com/RPM-GPG-KEY- MooseFS" > /etc/pki/rpm-gpg/RPM-GPG-KEY-MooseFS 
    
  • Add the repository entry to yum repo:

    curl "http://ppa.moosefs.com/MooseFS-3-el7.repo" > /etc/yum.repos.d/MooseFS.repo
    

MooseFS Master Server(s) installation:

As Root:

  • Install package moosefs-master by running the following command:

    yum install moosefs-master  moosefs-cgi moosefs-cgiserv moosefs-cli
    
  • Sample configuration files will be created in /etc/mfs with the extension *.sample (MooseFS 3.0+). We will use these files as the target configuration files:

    cd /etc/mfs 
    cp mfsmaster.cfg.sample mfsmaster.cfg 
    cp mfsexports.cfg.sample mfsexports.cfg
    
  • mfsexports.cfg specifies which users’ computers can mount the file system and with what privileges. We want to edit this file.

    vi /etc/mfs/mfsexports.cfg ### if you are not in the directory
    vi mfsexports.cfg ### if you are in the direcory
    

We will leave mfsmaster.cfg as is.

  • Start MooseFS Master Server using this command:

    systemctl enable moosefs - master
    systemctl start moosefs - master
    
  • Run MooseFS CGI Monitor with systemd:

    systemctl enable moosefs-cgiserv
    systemctl start moosefs-cgiserv
    
  • Edit firewall:

    firewall-cmd --zone=public --add-service=http --permanent
    firewall-cmd --zone=public --add-port=9425/tcp --permanent
    firewall-cmd --zone=public --add-port=9419/tcp --permanent
    firewall-cmd --zone=public --add-port=9420/tcp --permanent
    firewall-cmd --zone=public --add-port=9421/tcp --permanent
    

Metalogger backup server installation:

  • install metaloger:

    yum install moosefs-metalogger
    
  • Edit MooseFS Metalogger to point to DNS name of Master Server:

    cd /etc/mfs
    vi mfsmetalogger.cfg ### change name of desired master to it ip address
    

  • Start MooseFS Metalogger as a service:

    systemctl enable moosefs-metalogger
    systemctl start moosefs-metalogger
    

Chunk servers installation:

  • install chunkserver:

    yum install moosefs-chunkserver
    
  • prepare basic configuration files for the mfschunkserver:

    cd /etc/mfs
    cp mfschunkserver.cfg.sample mfschunkserver.cfg
    cp mfshdd.cfg.sample mfshdd.cfg
    
  • edit mfschunkserver.cfg to connect with master server:

    MASTER_HOST = 10.0.5.200

  • edit mfshdd.cfg:

    /mnt/mfschunks1 
    /mnt/mfschunks2
    

  • Create/Format Partition:

    mkdir /mnt/mfschunks1 mdkir /mnt/mfschunks2 chown -R mfs:mfs /mnt/mfschunks1 chown -R mfs:mfs /mnt/mfschunks2

  • Start chunk servers:

    systemctl enable moosefs-chunkserver systemctl start moosefs-chunkserver

Client installation:

  • Install the client:

    yum install moosefs-client
    
  • Create a directory and mount it:

    mkdir -p / mnt / mfs
    mfsmount / mnt / mfs -H 10.0.5.200
    
  • Enable MooseFS Client automount during boot:

    vi /etc/fstab
    mfsmount /mnt/mfs fuse defaults, mfsmaster=mfsmaster.example.lan, mfsport=9421 0 0
    

References