1

I have a /dev/dm-# block device file and a link to it from /dev/mapper/somename even after detaching the physical device.

Is it safe to just use rm on both? Is there a way to rescan physical devices and remove unneeded links in /dev/mapper? And, possibly, reset alphabetic counter for new block devices (as in /dev/sdc)?

partprobe isn't helping, and I don't see anything related in blockdev manual.

int_ua
  • 8,892

1 Answers1

1
sudo cryptsetup luksClose somename

In my case it was the result of using cryptsetup luksOpen and detaching the device without closing it.

int_ua
  • 8,892