LVM snapshot changed state to Invalid and should be removed

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

Environment

SUSE Linux Enterprise Server 15
SUSE Linux Enterprise Server 12
 

Situation

LVM snapshots have been created and are full, they are no longer accessible and are generating errors in the system logs.
Errors seen in messages logs:

kernel: Buffer I/O error on dev dm-X, logical block X, async page read

lvm[3036]: Monitoring snapshot osvolgrp-rootsnapshot.
lvm[3036]: WARNING: Snapshot osvolgrp-rootsnapshot is now 80.48% full.
lvm[3036]: WARNING: Snapshot osvolgrp-rootsnapshot is now 85.11% full.
lvm[3036]: WARNING: Snapshot osvolgrp-rootsnapshot is now 94.02% full.
lvm[3036]: WARNING: Snapshot osvolgrp-rootsnapshot is now 95.08% full.

kernel: [ 8406.332418] device-mapper: snapshots: Invalidating snapshot: Unable to allocate exception.

lvm[3036]: WARNING: Snapshot osvolgrp-rootsnapshot changed state to: Invalid and should be removed.

lvm[3036]: No longer monitoring snapshot osvolgrp-rootsnapshot.



Also the state seen with the "lvs" command shows an "I" in the Attribute column for "Invalid":
lvs
LV        VG          Attr          LSize  Pool  Origin   Data%  
rootsnapshot osvolgrp swi-I-s---  2.00g          rootlv    100.00
rootlv      osvolgrp   owi-aos--- 36.00g

Resolution

Once the snapshot is full it cannot be used and must be removed.
"When the snapshot is full, it is disabled, which prevents you from remounting the source logical volume."

Remove the LV snapshot with:

lvremove VOLUME_GROUP/SNAPSHOT_VOLUME
lvremove SNAPSHOT_VOLUME_PATH

Examples:
lvremove osvolgrp/rootsnapshot

lvremove /dev/osvolgrp/rootsnapshot

 

Additional Information

In addition the "snapshot_autoextend_threshold" can be used to automatically extend the snapshot as the source volume grows.
By default, this is disabled on SLES.

From /etc/lvm/lvm.conf
# Configuration option activation/snapshot_autoextend_threshold.
# Auto-extend a snapshot when its usage exceeds this percent.
# Setting this to 100 disables automatic extension.
# The minimum value is 50 (a smaller value is treated as 50.)
# Also see snapshot_autoextend_percent.
# Automatic extension requires dmeventd to be monitoring the LV.

# Example
# Using 70% autoextend threshold and 20% autoextend size, when a 1G
# snapshot exceeds 700M, it is extended to 1.2G, and when it exceeds
# 840M, it is extended to 1.44G:
# snapshot_autoextend_threshold = 70
#
snapshot_autoextend_threshold = 100

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:000019858
  • Creation Date: 05-Feb-2021
  • Modified Date:05-Feb-2021
    • SUSE Linux Enterprise High Availability Extension
    • SUSE Linux Enterprise Server
    • SUSE Linux Enterprise Server for SAP Applications

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback@suse.com

SUSE Support Forums

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

Join Our Community

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.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

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

Go to Customer Center