• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to activate a “SUSPENDED” LVM physical volume

by admin

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.

Conclusion

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]

Filed Under: CentOS/RHEL 6, CentOS/RHEL 7, CentOS/RHEL 8, Linux

Some more articles you might also be interested in …

  1. pw-link Command Examples in Linux
  2. raspistill: command not found
  3. How to Find the Original Installation OS Version in CentOS/RHEL
  4. RHEL 7 – RHCSA Notes – vi/vim editor
  5. How to Mask or Unmask a Service in CentOS/RHEL 7 and 8
  6. 14 Useful “cat” Command Examples in Linux
  7. rtcwake Command Examples in Linux
  8. “-bash: route: command not found” on CentOS/RHEL 7
  9. LVM Configuration : Volume Group (VG) Operations/Utilities
  10. Running repairs on XFS Filesystems

You May Also Like

Primary Sidebar

Recent Posts

  • diffstat: Create a histogram from the output of the diff command
  • diffoscope: Compare files, archives, and directories
  • diff-pdf: Tool for comparing two PDFs
  • dict: Command line dictionary using the DICT protocol

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright