需要将gcc版本升级到高版本,支持C++14
yum install libuuid-devel libibverbs-devel librdmacm-devel libattr-devel redhat-rpm-config \
rpm-build xfsprogs-devel zlib-devel ant gcc-c++ gcc \
redhat-lsb-core java-devel unzip libcurl-devel elfutils-libelf-devel kernel-devel
libblkid-devel
sudo yum install centos-release-scl
sudo yum install devtoolset-7
scl enable devtoolset-7 bash
RPM
make package-rpm PACKAGE_DIR=packages
或者
make package-rpm PACKAGE_DIR=packages RPMBUILD_OPTS="-D 'MAKE_CONCURRENCY <n>'"
DEB
make package-deb PACKAGE_DIR=packages
or
make package-deb PACKAGE_DIR=packages DEBUILD_OPTS="-j<n>"
需要将gcc版本升级到高版本,支持C++14
编译单个模块方法:
make -j4 -C meta/build/
编译Debug
make -j4 -C meta/build BEEGFS_DEBUG=1
meta为模块的目录。
beegfs 3组件 mgmtd meta storage client
mkdir -p /data/mgmt
# setup dir to store mgmt files
/opt/beegfs/sbin/beegfs-setup-mgmtd -p /data/mgmt/
systemctl start beegfs-mgmtd
# set mgmt
echo ${mgmt_ip} mgmt >> /etc/hosts
# 创建 meta 使用的目录
mkdir -p /data/meta
# 可直接使用裸盘或软raid
# 格式化本地文件系统,
#mkfs.ext4 -E nodiscard -i 2048 -I 512 -J size=400 -Odir_index,filetype /dev/${disk} -F 参数有问题
mkfs.ext4 /dev/${disk}
# 挂载到meta使用的目录
mount /dev/${disk} /data/meta/ -onoatime,nodiratime
setup dir to store meta files, -s 1 --> nodeID = 1, -m mgmt --> management node mg
/opt/beegfs/sbin/beegfs-setup-meta -p /data/meta/ -s 1 -m mgmt
# start service
systemctl start beegfs-meta
systemctl status beegfs-meta
# set mgmt
echo ${mgmt_ip} mgmt >> /etc/hosts
# 创建 storage_target 使用的目录
mkdir -p /data/storage/storage-$disk
# 可直接使用裸盘或软raid
# 格式化本地文件系统
mkfs.xfs /dev/${disk}
# 挂载到storage使用的目录
mount /dev/nvme${disk}n1 /data/storage-$disk
# 设置管理节点, nodeID, targetID 注: 一个盘只能做一个节点
/opt/beegfs/sbin/beegfs-setup-storage -p /data/storage/storage-$disk -s 1 -i 101 -m mgmt
/opt/beegfs/sbin/beegfs-setup-storage -p /data/storage/storage-$disk -s 1 -i 102 -m mgmt
systemctl start beegfs-storag
systemctl status beegfs-storage
echo ${mgmt_ip} mgmt >> /etc/hosts
/opt/beegfs/sbin/beegfs-setup-client -m mgmt
# 使用 OFED 网卡时, 需要设置 OFED_INCLUDE_PATH,且网卡驱动要和内核版本匹配
[root@node56 ~]# cat /etc/beegfs/beegfs-client-autobuild.conf |grep ^buildArgs
buildArgs=-j8 OFED_INCLUDE_PATH=/usr/src/ofa_kernel/default/include
systemctl start beegfs-helperd
systemctl start beegfs-client