blkdeactivate command examples
blkdeactivate — utility to deactivate block devices
Deactivate all supported block devices found in the system. If a device is mounted, skip its deactivation.
blkdeactivate
Deactivate all supported block devices found in the system. If a device is mounted, unmount it first if possible.
blkdeactivate -u
Deactivate supplied device together with all its holders. If any of the devices processed is mounted, unmount it first if possible.
blkdeactivate -u /dev/vg/lvol0
Deactivate all supported block devices found in the system. Retry deactivation of device-mapper devices in case the deactivation fails. Deactivate the whole Volume Group at once when processing an LVM Logical Volume.
blkdeactivate -u -d retry -l wholevg
Deactivate all supported block devices found in the system. Retry deactivation of device-mapper devices in case the deactivation fails and force removal.
blkdeactivate -d force,retry