Basic guide to deploying a simple three-node Lustre cluster on Centos 7. Updated fork of [joshuar/Three-Node-LustreFS-Cluster-Quickstart.md](https://gist.github.com/joshuar/4e283308c932ec62fc05), which was based on Intel's [How to Create and Mount a Lustre Filesystem](https://wiki.hpdd.intel.com/display/PUB/Create+and+Mount+a+Lustre+Filesystem). ## Overview (Note: I am a newbie to Lustre so this overview is extremely light and hopefully what depth there is isn't full of mistakes!) ### Note on changes The original document was * based on Centos 6; this is for Centos 7 * assumed use of ZFS; this one uses Ext ### Note on instructions The commands are presented in shell-script form, so that they can be easily copied and pasted into a terminal window. *You should never blindly copy strings of commands into a terminal, especially as a privileged user.* They are presented here because many of the commands must be replicated in multiple nodes. ## Instructions **The following is needed for ZFS which is not required for this cluster, which uses the Ext filesystem as a basis for Lustre.** * Downgrade kernel if needed (an upgrade may be required instead): * `yum remove kernel-$(uname -r)` * Enable EPEL repo: * `yum install epel-release` * Enable ZFS on Linux repo (**not sure why this is necessary**): * `yum localinstall --nogpgcheck http://archive.zfsonlinux.org/epel/zfs-release.el7_3.noarch.rpm` * Enable lustre repos: ```bash sudo sh -c 'cat >/etc/yum.repos.d/lustre.repo' < /etc/modprobe.d/lnet.conf' < /etc/sysconfig/modules/lnet.module' </dev/null 2>&1 fi EOF sudo chmod 744 /etc/sysconfig/modules/lnet.module ``` * On the MGS/MDT/MDS: * Intialise a disk or partition to use for lustre. * Create a lustre MDT: * `mkfs.lustre --fsname=whatevs --mgs --mdt --index=0 /dev/sdX` * Create a mount point and mount the lustre FS: * `mkdir /mnt/mdt && mount -t lustre /dev/sdX /mnt/mdt` * On the OST/OSS: * Intialise a disk or partition to use for lustre. * Create a lustre OST: * `mkfs.lustre --ost --fsname=whatevs --mgsnode=192.168.N.N@tcp0 --index=0 /dev/sdX` * Adjust the `--mgsnode` parameter for the address and protocol used for the MGS. * Create a mount point and mount the lustre FS: * `mkdir /ostoss_mount && mount -t lustre /dev/sdX /ostoss_mount` * On the client: ```bash # load the Lustre kernel module sudo modprobe lustre # create script to load Lustre module on boot sudo sh -c 'cat > /etc/sysconfig/modules/lustre.modules' </dev/null 2>&1 if [ ! $? ] ; then /sbin/modprobe lustre >/dev/null 2>&1 fi EOF sudo chmod 744 /etc/sysconfig/modules/lustre.modules ``` * Create a mount point: `mkdir /mnt/lustre`. * Mount the lustre FS: * `mount -t lustre 192.168.N.N@tcp0:/whatevs /mnt/lustre`