SUSE Support

Here When You Need Us

lvremove returns Unable to deactivate open logical volume

This document (7015861) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 11 Service Pack 2 (SLES 11 SP2)
SUSE Linux Enterprise Server 11 Service Pack 3 (SLES 11 SP3)

Situation

'lvremove' is run to remove an unmounted LVM logical volume
snapshot and returns an error indicating that the snapshot is
still open:

# lvremove vg-mylvsnapshot
Unable to deactivate open vg-mylvsnapshot (253:13)
Failed to resume mylvsnapshot.
libdevmapper exiting with 1 device(s) still suspended.


Resolution

Periodically check the output of the 'dmsetup info' command for this snapshot
and retry once the open count is zero.

In the example below, the open count is 2:

# dmsetup info vg-mylvsnapshot
Name:              vg-mylvsnapshot
State:             ACTIVE
Read Ahead:        1024
Tables present:    LIVE
Open count:        2
Event number:      0
Major, minor:      253, 13
Number of targets: 1
UUID: LVM-spdA9rfc0Wc9wUMJVGQ2S8h3RZqErkVOUDwaH6S9LDjTR4ojEUFuBS66005ARP3D-mylvsnapshot


In this example, the open count is zero:

# dmsetup info vg-mylvsnapshot
Name:              vg-mylvsnapshot
State:             ACTIVE
Read Ahead:        1024
Tables present:    LIVE
Open count:        0
Event number:      0
Major, minor:      253, 13
Number of targets: 1
UUID: LVM-spdA9rfc0Wc9wUMJVGQ2S8h3RZqErkVOUDwaH6S9LDjTR4ojEUFuBS66005ARP3D-mylvsnapshot


The snapshot cannot be removed until the open count is zero.

Cause

The snapshot is still considered in use until the open count reaches zero.

This condition is most frequently reported when a script is used to automate
the unmount and lvmremove process for a snapshot.

It's caused by a delay between the time that the snapshot is unmounted and
when the open count reaches zero.

In most cases, this delay is within a few seconds.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7015861
  • Creation Date: 05-Nov-2014
  • Modified Date:03-Mar-2020
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.