Support checking /dev/nbdX nodes in Docker
parent
e0fb17bfee
commit
cfcf4f4355
|
@ -117,3 +117,14 @@ check_qemu()
|
||||||
sudo ln -s "$(realpath .)/build/src/block-vitastor.so" /usr/lib/x86_64-linux-gnu/qemu/block-vitastor.so
|
sudo ln -s "$(realpath .)/build/src/block-vitastor.so" /usr/lib/x86_64-linux-gnu/qemu/block-vitastor.so
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
check_nbd()
|
||||||
|
{
|
||||||
|
if [[ -d /sys/module/nbd && ! -e /dev/nbd0 ]]; then
|
||||||
|
max_part=$(cat /sys/module/nbd/parameters/max_part)
|
||||||
|
nbds_max=$(cat /sys/module/nbd/parameters/nbds_max)
|
||||||
|
for i in $(seq 1 $nbds_max); do
|
||||||
|
mknod /dev/nbd$((i-1)) b 43 $(((i-1)*(max_part+1)))
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
|
@ -4,6 +4,8 @@ OSD_COUNT=7
|
||||||
PG_COUNT=32
|
PG_COUNT=32
|
||||||
. `dirname $0`/run_3osds.sh
|
. `dirname $0`/run_3osds.sh
|
||||||
|
|
||||||
|
check_nbd
|
||||||
|
|
||||||
IMG_SIZE=256
|
IMG_SIZE=256
|
||||||
|
|
||||||
$ETCDCTL put /vitastor/config/inode/1/1 '{"name":"testimg","size":'$((IMG_SIZE*1024*1024))'}'
|
$ETCDCTL put /vitastor/config/inode/1/1 '{"name":"testimg","size":'$((IMG_SIZE*1024*1024))'}'
|
||||||
|
|
Loading…
Reference in New Issue