调整创建磁盘、挂载磁盘及卸载磁盘的脚本

This commit is contained in:
hwzzy666
2022-07-06 08:21:46 +08:00
parent 9bf52cf2ab
commit 339570a2f3
5 changed files with 19 additions and 22 deletions

5
tools/umount_virt_disk.sh Normal file → Executable file
View File

@ -1,3 +1,4 @@
LOOP_DEVICE=$(lsblk | grep disk_mount)
sudo umount -f ../bin/disk_mount/
# rm -rf ../bin/disk_mount/
sudo losetup -d /dev/loop1
sudo losetup -d /dev/${LOOP_DEVICE:2:5}
echo ${LOOP_DEVICE:2:5}