Instead of hard-coding the block device name, use the block device that
is backing the filesystem that the test is running on. We can be quite
sure it won't be an RBD device ;)
Fixes: https://tracker.ceph.com/issues/74529
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit
2b5f0f4e7396114f9944a4987c38e18d4ecfbb1f)
A block device, but not rbd:
- $ sudo rbd device unmap /dev/[sv]da
- rbd: '/dev/?da' is not an rbd device (glob)
+ $ THIS_FS_DEV=$(findmnt -n -o SOURCE -T .)
+ $ sudo rbd device unmap $THIS_FS_DEV
+ rbd: '/dev/.+' is not an rbd device (re)
rbd: unmap failed: (22) Invalid argument
[22]