标签:bsp read 挂载 删除 use oop img nbsp set
loop设备
loop设备
一。参考命令
[root@localhost a]# losetup
usage:
losetup loop_device # give info
losetup -d loop_device # delete
losetup -f # find unused
losetup -a # list all used
losetup -r # read-only loop
losetup [-e encryption] [-o offset] [-r] {-f|loop_device} file # setup
[root@localhost a]#
二。loop挂载
2.1挂载到空闲的loop设备上
[root@localhost a]# losetup -f -o $[208845*512] /lvm/vm/vm41.img
2.2挂载到指定的loop设备上
[root@localhost a]# losetup /dev/loop4 -o $[208845*512] /lvm/vm/vm41.img
2.3查看所有使用中的loop设备
[root@localhost a]# losetup -a
/dev/loop0: [fd00]:327683 (/lvm/vm/vm42.img), offset 106928640
/dev/loop4: [fd00]:327682 (/lvm/vm/vm41.img), offset 106928640
三。loop删除
losetup -a
losetup -d /dev/loop1
标签:bsp read 挂载 删除 use oop img nbsp set
原文地址:https://www.cnblogs.com/noxy/p/9330956.html