Device Mapper Errors when Attempting to Create LVM Mirror

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

Environment

SUSE Linux Enterprise Server 12 Service Pack 4 (SLES 12 SP4)

Situation

An LVM volume cannot be successfully converted to an LVM mirrored volume on SLES12 SP4. However, SLES12 SP3 and SLES15 all versions can. The following errors were observed.

Kernel versions tested that have the issue:

kernel-default-4.12.14-94.41
-through-
kernel-default-4.12.14-95.19

sles12sp4:~ # lvs  LV   VG   Attr       LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  vol1 vg00 -wi-a----- 5.00g                                                   

sles12sp4:~ # lvconvert -m+1 -R 2M vg00/vol1 /dev/vdb
Are you sure you want to convert linear LV vg00/vol1 to raid1 with 2 images enhancing resilience? [y/n]: y
  device-mapper: reload ioctl on  (254:0) failed: Invalid argument
  Failed to lock logical volume vg00/vol1.

sles12sp4:~ # lvs
  WARNING: Reading VG vg00 from disk because lvmetad metadata is invalid.
  LV            VG   Attr       LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  vol1          vg00 -wi-a----- 5.00g                                                   
  vol1_rimage_1 vg00 -wi-a----- 5.00g                                                   
  vol1_rmeta_0  vg00 -wi-a----- 4.00m                                                   
  vol1_rmeta_1  vg00 -wi-a----- 4.00m

The mirror is not created, but an rimage_1,  rmeta_0 and rmeta_1 volumes are created associated with the intended mirrored volume. In addition to raid1 mirrors, legacy mirrored volumes likewise fail.

sles12sp4:~ # lvconvert -m1 --type mirror vg00/vol1 /dev/vdb
  device-mapper: reload ioctl on  (254:0) failed: Invalid argument
  Failed to lock logical volume vg00/vol1.

Resolution

This is a known issue with SLES12 SP4. The fix requires an updated kernel from engineering or a patch temporary fix (PTF) and a server reboot. After you have installed the kernel fix, do the following:

1. Remove any extra volumes created in the failed attempt.

sles12sp4:~ # lvremove vg00/vol1_rimage_1
Do you really want to remove active logical volume vg00/vol1_rimage_1? [y/n]: y
  Logical volume "vol1_rimage_1" successfully removed

sles12sp4:~ # lvremove vg00/vol1_rmeta_0
Do you really want to remove active logical volume vg00/vol1_rmeta_0? [y/n]: y
  Logical volume "vol1_rmeta_0" successfully removed

sles12sp4:~ # lvremove vg00/vol1_rmeta_1
Do you really want to remove active logical volume vg00/vol1_rmeta_1? [y/n]: y
  Logical volume "vol1_rmeta_1" successfully removed

sles12sp4:~ # lvs
  LV   VG   Attr       LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  vol1 vg00 -wi-a----- 5.00g

2. Make sure an updated kernel version is applied that includes the fix.
3. Reboot the server to use the updated kernel.
4. Convert the volume as desired.

sles12sp4:~ # lvconvert -m+1 -R 2M vg00/vol1 /dev/vdb
Are you sure you want to convert linear LV vg00/vol1 to raid1 with 2 images enhancing resilience? [y/n]: y
  Logical volume vg00/vol1 successfully converted.

sles12sp4:~ # lvs
  LV   VG   Attr       LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  vol1 vg00 rwi-a-r--- 5.00g                                    100.00

Cause


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:7023995
  • Creation Date: 09-Jul-2019
  • 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.

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