test: avoid potential data inconsistency on zapping disk
Data inconsistency might happen if the disk is accessed just after disk zapping because direct I/O is not synchronous by itself. Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
This commit is contained in:
1 parent
18b19de639
commit
3bbffd1e4d
2 files changed
+2
-2
No files matched your search
@@ -50,7 +50,7 @@ function purge_ceph_vms {
|
||||
vagrant ssh "$i" -c "cat << 'EOF' > /tmp/purge-ceph.sh
|
||||
sudo rm -rf /var/lib/rook
|
||||
for disk in \$(sudo blkid | awk '/ROOK/ {print \$1}' | sed 's/[0-9]://' | uniq); do
|
||||
sudo dd if=/dev/zero of=\$disk bs=1M count=20 oflag=direct
|
||||
sudo dd if=/dev/zero of=\$disk bs=1M count=20 oflag=direct,dsync
|
||||
done
|
||||
EOF"
|
||||
vagrant ssh "$i" -c "bash /tmp/purge-ceph.sh"
|
||||
|
||||
Reference in new issue
Block a user