Added local ssd support and removed some redundant code.

This commit is contained in:
Cormac Garvey 2019-08-01 16:39:54 -06:00
Родитель 5ef8ba1257
Коммит 31f286b4fb
2 изменённых файлов: 14 добавлений и 11 удалений

Просмотреть файл

@ -5,7 +5,12 @@ node_type=$2
pools=$3
MGMT_HOSTNAME=$4
#
if [ $disk_type == "local_ssd" ]; then
BEEGFS_DISK=/mnt/resource/beegfs
else
BEEGFS_DISK=/mnt/beegfs
fi
BEEGFS_METADATA=${BEEGFS_DISK}/meta
#
yum install -y beegfs-meta
@ -138,14 +143,9 @@ else
metadataDevices="`fdisk -l | grep '^Disk /dev/' | grep -v '/dev/md' | grep -v $hddDiskSize | grep -v $rootDevice | grep -v $tmpDevice | grep $metadataDiskSize | awk '{print $2}' | awk -F: '{print $1}' | sort | tr '\n' ' ' | sed 's|/dev/||g'`"
fi
#
if [ $disk_type == "nvme" ]; then
mkdir -p $BEEGFS_DISK
mkdir -p $BEEGFS_DISK/meta
elif [ $disk_type == "data_disk" ]; then
mkdir -p $BEEGFS_DISK/meta
mkdir -p $BEEGFS_METADATA
if [ $disk_type == "data_disk" ]; then
setup_data_disks $BEEGFS_METADATA "ext4" "$metadataDevices" "md20"
else
mkdir -p /mnt/resource/beegfs/meta
fi
#
mount -a

Просмотреть файл

@ -6,7 +6,12 @@ pools=$3
pools_restart=$4
MGMT_HOSTNAME=$5
#
if [ $disk_type == "local_ssd" ]; then
BEEGFS_DISK=/mnt/resource/beegfs
else
BEEGFS_DISK=/mnt/beegfs
fi
BEEGFS_HDD=/mnt/beegfs/hdd
BEEGFS_STORAGE=${BEEGFS_DISK}/storage
#
@ -154,15 +159,13 @@ if [ $pools == "true" ] && [ $pools_restart == "false" ]; then
mkdir -p $BEEGFS_HDD
setup_data_disks $BEEGFS_HDD "xfs" "$hddDevices" "md40"
fi
mkdir -p $BEEGFS_STORAGE
if [ $disk_type == "nvme" ]; then
mkdir -p $BEEGFS_DISK
setup_data_disks $BEEGFS_DISK "xfs" "$storageDevices" "md30"
mkdir -p $BEEGFS_DISK/storage
elif [ $disk_type == "data_disk" ]; then
mkdir -p $BEEGFS_DISK/storage
setup_data_disks $BEEGFS_STORAGE "xfs" "$storageDevices" "md30"
else
mkdir -p /mnt/resource/beegfs/storage
fi
#
mount -a