Sim disk failure in VM

This commit is contained in:
kneutron 2022-06-30 11:06:41 -05:00 committed by GitHub
parent a84264bb2d
commit 24725fd747
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

9
VIRTBOX/faildisk.sh Normal file
View File

@ -0,0 +1,9 @@
#!/bin/bash
#d2f=$(ls -l /sys/dev/block |awk '/'$1'/ {print $9}')
echo "Failing $1"
echo offline > /sys/block/$1/device/state
echo 1 > /sys/block/$1/device/delete
sleep 2
dmesg|grep $1