aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/ceph-deploy/files
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/adapters/ansible/roles/ceph-deploy/files')
-rw-r--r--deploy/adapters/ansible/roles/ceph-deploy/files/create_osd.sh25
1 files changed, 5 insertions, 20 deletions
diff --git a/deploy/adapters/ansible/roles/ceph-deploy/files/create_osd.sh b/deploy/adapters/ansible/roles/ceph-deploy/files/create_osd.sh
index 02860bde..d0c631fb 100644
--- a/deploy/adapters/ansible/roles/ceph-deploy/files/create_osd.sh
+++ b/deploy/adapters/ansible/roles/ceph-deploy/files/create_osd.sh
@@ -5,17 +5,6 @@ umount /var/local/osd
rm -r /var/local/osd
fi
-if [ ! -d "/ceph/images" ]; then
-mkdir -p /ceph/images
-fi
-
-rm -f /ceph/images/ceph-volumes.img
-
-if [ ! -f "/ceph/images/ceph-volumes.img" ]; then
-echo "create ceph-volumes.img"
-dd if=/dev/zero of=/ceph/images/ceph-volumes.img bs=1K seek=$(df / | awk '$3 ~ /[0-9]+/ { print $4 }') count=0 oflag=direct
-sgdisk -g --clear /ceph/images/ceph-volumes.img
-fi
#safe check
ps -ef |grep lvremove |awk '{print $2}' |xargs kill -9
@@ -23,24 +12,20 @@ ps -ef |grep vgremove |awk '{print $2}' |xargs kill -9
ps -ef |grep vgcreate |awk '{print $2}' |xargs kill -9
ps -ef |grep lvcreate |awk '{print $2}' |xargs kill -9
-if [ -L "/dev/ceph-volumes/ceph0" ]; then
+if [ -L "/dev/cinder-volumes/ceph0" ]; then
echo "remove lv vg"
-lvremove -f /dev/ceph-volumes/ceph0
-vgremove -f ceph-volumes
-rm -r /dev/ceph-volumes
+lvremove -f /dev/cinder-volumes/ceph0
fi
-echo "vgcreate"
-vgcreate -y ceph-volumes $(losetup --show -f /ceph/images/ceph-volumes.img)
echo "lvcreate"
-lvcreate -l 100%FREE -nceph0 ceph-volumes
+lvcreate -l 100%FREE -nceph0 cinder-volumes
echo "mkfs"
-mkfs.xfs -f /dev/ceph-volumes/ceph0
+mkfs.xfs -f /dev/cinder-volumes/ceph0
if [ ! -d "/var/local/osd" ]; then
echo "mount osd"
mkdir -p /var/local/osd
-mount /dev/ceph-volumes/ceph0 /var/local/osd
+mount /dev/cinder-volumes/ceph0 /var/local/osd
fi