From 7829f82fb3c20f6262a45e74c0e22fa02d3bccdd Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 18 Feb 2018 21:06:28 +0100 Subject: [PATCH] Get the real device name to match wtih lsblk --- ceph-osd-create-start | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ceph-osd-create-start b/ceph-osd-create-start index a0d957a..e38db4e 100755 --- a/ceph-osd-create-start +++ b/ceph-osd-create-start @@ -86,7 +86,8 @@ chown -R ceph:ceph "$mountpath" if [ $# -eq 1 ]; then WEIGHT=$1; shift else - nodev=$(echo $dev_block | sed 's,/dev/,,') + devname=$(readlink -f $dev_block) + nodev=$(echo $devname | sed 's,/dev/,,') WEIGHT=$(lsblk -l -b | awk "/^$nodev/ { print \$4/(1024^4) }") fi