Last active
September 7, 2018 08:40
-
-
Save maniankara/d4cd6ea36496af6e57b3333c1e882828 to your computer and use it in GitHub Desktop.
Script for provisioning moosefs chunk server on redhat/amazon based distros
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ip=$1 | |
size=$2 | |
device=$3 | |
# Install certificates and Repository | |
curl "https://ppa.moosefs.com/RPM-GPG-KEY-MooseFS" > /etc/pki/rpm-gpg/RPM-GPG-KEY-MooseFS | |
curl "http://ppa.moosefs.com/MooseFS-3-el7.repo" > /etc/yum.repos.d/MooseFS.repo | |
# Install moosefs-chunkserver, fuse and others | |
yum install -y gnupg2 ca-certificates e2fsprogs xfsprogs moosefs-chunkserver | |
# Provision and mount volume | |
mkfs -t xfs $device | |
mkdir -p /mnt/xvdh | |
mount $device /mnt/xvdh | |
# Configure moosefs chunk server | |
chown -R mfs:mfs /mnt/xvdh | |
echo "/mnt/xvdh $sizeGiB" > /etc/mfs/mfshdd.cfg | |
# Add master | |
echo "MASTER_HOST = $ip" > /etc/mfs/mfschunkserver.cfg | |
# Start the chunkserver service | |
/usr/sbin/mfschunkserver start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment