Hello,
now it nearly works, but I get "already mounted or mount point busy". I cannot find any reasons.
rbd ls pool2-1 :
vm-100-disk-0
vm-101-disk-1
rbd --pool pool2-1 snap create pool2-1/vm-101-disk-1@test
rbd --pool pool2-1 snap ls vm-101-disk-1 :
SNAPID NAME SIZE PROTECTED TIMESTAMP
28 test 20 GiB Tue Dec 10 16:20:40 2019
rbd map --read-only pool2-1/vm-101-disk-1@test :
/dev/rbd0
rbd showmapped :
id pool namespace image snap device
0 pool2-1 vm-101-disk-1 test /dev/rbd0
mkdir -p /mnt/tmp
kpartx -va /dev/rbd/pool2-1/vm-101-disk-1@test :
add map vm-101-disk-1@test1 (253:3): 0 8388608 linear 252:0 2048
add map vm-101-disk-1@test2 (253:4): 0 33552384 linear 252:0 8390656
mount -o noload /dev/rbd/pool2-1/vm-101-disk-1@test-part2 /mnt/tmp :
mount: /mnt/tmp: /dev/rbd0p2 already mounted or mount point busy.
lsof /dev/rbd0p2 : <nothing>
lsof /dev/rbd/pool2-1/vm-101-disk-1@test-part2 : <nothing>
kpartx -vd /dev/rbd/pool2-1/vm-101-disk-1@test :
del devmap : vm-101-disk-1@test2
del devmap : vm-101-disk-1@test1
rbd unmap /dev/rbd/pool2-1/vm-101-disk-1@test
sync
rbd --pool pool2-1 snap ls vm-101-disk-1 :
SNAPID NAME SIZE PROTECTED TIMESTAMP
28 test 20 GiB Tue Dec 10 16:20:40 2019
rbd snap rm pool2-1/vm-101-disk-1@test :
Removing snap: 100% complete...done.