linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Joel Friedly <joelfriedly@gmail.com>
To: linux-lvm@redhat.com
Subject: [linux-lvm] vgmknodes --refresh blocks forever waiting on a semaphore
Date: Thu, 19 Feb 2015 14:19:33 -0800	[thread overview]
Message-ID: <CAEhYyLibaMTiXhyVrmt5bF5U9kaBn_gzXRjkQRaPCFVp88gYmw@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1370 bytes --]

I'm trying to some disk failure testing, and we're using LVM on top of raw
disks.  After replacing the disk, the LV on the disk is unreadable until I
run vgmknodes --refresh.  That command hangs forever, but I can kill -9
it.  After running the command, everything works again and I can read the
LV.

I've seen this twice, so I ran strace the second time and you can find the
output here:  https://gist.github.com/jfriedly/50fe9134c4bc616f9f90 and
Ctrl-F for "425989"

On line 4250, LVM sets the semaphore's value to 1, then it immediately
checks the semaphore's value and confirms that it's 1.

On line 4253, LVM increments the semaphore's value to 2, then it
immediately checks the semaphore's value and confirms that it's 2.

On line 4295, LVM gets the semaphore's value and sees that it's 2, then it
immediately decrements the value to 1 and then waits indefinitely for the
value to hit 0.


Is LVM expecting some other process to decrement the semaphore?  Is this a
bug in vgmknodes --refresh?  Running without the refresh flag doesn't block
forever, but it also doesn't make the LV readable.



System Info:

Ubuntu 12.04
Kernel 3.13.0-39-generic
LVM 2.02.95-4ubuntu1
The disk is part of a VG named "vg.nebula.alexandria" and it is dedicated
to an LV called "alexandria.tlog".


Thanks for your help guys, and let me know if you need any more debugging
info,
Joel

[-- Attachment #2: Type: text/html, Size: 1836 bytes --]

             reply	other threads:[~2015-02-19 22:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-19 22:19 Joel Friedly [this message]
2015-02-20  8:32 ` [linux-lvm] vgmknodes --refresh blocks forever waiting on a semaphore Peter Rajnoha
2015-02-20  8:35   ` Peter Rajnoha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEhYyLibaMTiXhyVrmt5bF5U9kaBn_gzXRjkQRaPCFVp88gYmw@mail.gmail.com \
    --to=joelfriedly@gmail.com \
    --cc=linux-lvm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).