When suspending a device using the command dmsetup suspend, any I/O that has already been mapped by the device but has not yet completed will be flushed. For example, lvextend command was executed and for some reason, it did not finish. This will keep the volume in suspended mode and all I/O will be blocked. Most of the time, this indicates a problem with the underlying physical volumes and should be investigated further.
How to confirm if PV is SUSPENDED
Check for the
# dmsetup info vg_example Name: vg_example State: SUSPENDED Read Ahead: 256 Tables present: LIVE Open count: 18 Event number: 0 Major, minor: 249, 4 Number of targets: 1 UUID: LVM-1234567890987xxxxxxxx-fake-id-xxxxxxxxxxxxxxx123456789
Reactivate the PV (resume PV)
To reactivate the PV or resume the suspended PV, use the command “dmsetup resume”:
# dmsetup resume vg_example
Above command should re-enable the block device and I/O should be un-blocked.
# dmsetup info vg_example Name: vg_example State: ACTIVE Read Ahead: 256 Tables present: LIVE Open count: 1 Event number: 0 Major, minor: 249, 4 Number of targets: 1 UUID: LVM-1234567890987xxxxxxxx-fake-id-xxxxxxxxxxxxxxx123456789
Another way to check is using the command “dmsetup -c info“.
# dmsetup -c info Name Maj Min Stat Open Targ Event UUID vg_example 253 69 L-sw 11 1 1 LVM-xytllwFjoxRXeeeMmUzgtdYWt53sE9HP7Buf5rOEpM2H1uMUpPGQB6ZZKFRu8BU3
Here, the “s” in the stat column indicates that the device is in a SUSPENDED state.
It is important to understand why the device went into SUSPENDED state first, before resuming it. Only resume the device when you are sure that the device can be resumed. Without it, if you resumed the device, it may lead to corruption. If there is permanent damage to the underlying device, it can be removed, which in turn will result in pending I/O to fail.
# dmsetup remove [device]