mirror of
https://github.com/ceph/ceph
synced 2024-12-19 09:57:05 +00:00
3aae5ca6fd
/bin/bash is a Linuxism. Other operating systems install bash to different paths. Use /usr/bin/env in shebangs to find bash. Signed-off-by: Alan Somers <asomers@gmail.com>
18 lines
411 B
Bash
Executable File
18 lines
411 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -ex
|
|
|
|
IMAGE_NAME="stable-pages-required-test"
|
|
|
|
rbd create --size 1 $IMAGE_NAME
|
|
DEV=$(sudo rbd map $IMAGE_NAME)
|
|
[[ $(blockdev --getsize64 $DEV) -eq 1048576 ]]
|
|
grep -q 1 /sys/block/${DEV#/dev/}/bdi/stable_pages_required
|
|
|
|
rbd resize --size 2 $IMAGE_NAME
|
|
[[ $(blockdev --getsize64 $DEV) -eq 2097152 ]]
|
|
grep -q 1 /sys/block/${DEV#/dev/}/bdi/stable_pages_required
|
|
sudo rbd unmap $DEV
|
|
|
|
echo OK
|