From c997d26b4acbd86df3d331cbd4405d166d094589 Mon Sep 17 00:00:00 2001 From: davidplunkett Date: Tue, 29 Oct 2019 14:55:21 +0000 Subject: [PATCH] Use block device for ceph instead of folders Airship 1.3 now uses block device (partitions) instead of folders. Signed-off-by: davidplunkett Change-Id: I823f28c36b7ba2dd886cd4840c49dd3ad100b798 --- firstboot-genesis.sh.template | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/firstboot-genesis.sh.template b/firstboot-genesis.sh.template index ba30e23..9f53d98 100644 --- a/firstboot-genesis.sh.template +++ b/firstboot-genesis.sh.template @@ -58,41 +58,17 @@ fdisk -l /dev/sd? | grep "Ceph OSD" | grep -oP "/dev/sd." | xargs -n 1 wipefs -a echo "Creating Ceph journal partition and filesystem" devices=@@SRV_CEPH_DEVICE@@ -echo "creating partions for ceph journal:" +echo "Creating block device for ceph journal:" echo $devices for d in $devices do - parted -s /dev/${d} mklabel msdos - parted -s -a optimal /dev/${d} -- mkpart primary ext4 1 -1s + wipefs -a -f /dev/${d} + parted -s /dev/${d} mklabel GPT done partprobe sleep 5 #let udev settle down -devnum=1 -for d in $devices -do - mountpoint=/var/lib/ceph/journal - mkfs.ext4 -F /dev/${d}${devnum} - UUID=$(blkid -o export /dev/${d}${devnum} | sed -ne /^UUID/s/UUID=//p) - mkdir -p ${mountpoint} - echo "UUID=$UUID ${mountpoint} ext4 defaults,nofail 0 0" >>/etc/fstab - devnum=$((devnum+1)) -done - -/bin/mount -a -devnum=1 -for d in $devices -do - df -lh /dev/${d}${devnum} - if [ $? -eq 0 ] - then - echo " ${d}${devnim} Filesystem Created successfully" - else - echo " ${d}${devnim} Filesystem not Found" - fi -done - # Creating Network interfaces for Calico, Neutron and Storage echo " Creating Additional Network interfaces" bond=@@SRV_BOND@@"." -- 2.16.6