LVM commands hang with: "flock failed: Interrupted system call"

Solution Unverified - Updated -

Issue

  • LVM commands hang, and can continue with ctrl-c. The ctrl-c interrupts the flock call and allows the command to continue. Using strace, it is found the failure is at _do_flock against the VG lock file; failure message after interrupt: "flock failed: Interrupted system call" and "Can't get lock for vg_name".
#misc/lvm-flock.c:71       Unlocking /var/lock/lvm/V_d6d7afa9-5356-4c12-9659-5817f6767c5e
#misc/lvm-flock.c:48         _undo_flock /var/lock/lvm/V_d6d7afa9-5356-4c12-9659-5817f6767c5e
#device/dev-io.c:587         Closed /dev/mapper/3514f0c51484000e3
#metadata/vg.c:84         Freeing VG d6d7afa9-5356-4c12-9659-5817f6767c5e at 0x7fb560c1da30.
#metadata/vg.c:84         Freeing VG d6d7afa9-5356-4c12-9659-5817f6767c5e at 0x7fb560c19a20.
#misc/lvm-flock.c:200       Locking /var/lock/lvm/V_dc25e385-332e-4feb-8ea2-78a7036ac8d1 RB
#libdm-common.c:903         Preparing SELinux context for /var/lock/lvm/V_dc25e385-332e-4feb-8ea2-78a7036ac8d1 to system_u:object_r:lvm_lock_t:s0.
#misc/lvm-flock.c:101         _do_flock /var/lock/lvm/V_dc25e385-332e-4feb-8ea2-78a7036ac8d1:aux WB
<ctrl-c>
#misc/lvm-signal.c:38   Interrupted...
#misc/lvm-flock.c:121   Giving up waiting for lock.
#misc/lvm-flock.c:126   /var/lock/lvm/V_dc25e385-332e-4feb-8ea2-78a7036ac8d1:aux: flock failed: Interrupted system call
#libdm-common.c:906         Resetting SELinux context to default value.
#misc/lvm-flock.c:214         <backtrace>
#locking/file_locking.c:89         <backtrace>
#locking/locking.c:283         <backtrace>
#locking/locking.c:355         <backtrace>
#metadata/metadata.c:4607   Can't get lock for dc25e385-332e-4feb-8ea2-78a7036ac8d1
#metadata/vg.c:69         Allocated VG (null) at 0x7fb560c19a20.
#toollib.c:223   Cannot process volume group dc25e385-332e-4feb-8ea2-78a7036ac8d1
  • Please note in this article the volume group names are UUIDs; they are created by VDSM. That will not be the case for all systems that see the issue. They may be user friendly names like VG1.

Environment

  • Red Hat Enterprise Linux 6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content