Linux LVM users
 help / color / mirror / Atom feed
From: Steve McIntyre <smcintyre@software.plasmon.com>
To: andrew@fc.hp.com
Cc: linux-lvm@sistina.com
Subject: Re: [linux-lvm] Oops when running snapshots
Date: Wed Jan 21 05:35:02 2004	[thread overview]
Message-ID: <20040121102732.GA1037@software.plasmon.com> (raw)
In-Reply-To: <1074018946.627.19.camel@bluto.andrew>

On Tue, Jan 13, 2004 at 11:35:46AM -0700, Andrew Patterson wrote:
>
>We worked over this problem with Heinz on LVM 1.07.  One of our kernel
>hackers (along with Heinz) came up with several possible solutions to a
>race condition in the snapshot code.  They are presented below.  We
>found that option #1 worked, but sometimes it could take a long time to
>create multiple snapshots of the same LV under extremely heavy load. 
>The first snapshot is fine, but the second or more can take hours. 
>Option #2 created a huge performance penalty to writes on the original
>LV (90-99%).  I don't remember that option #3 helped any, and we never
>tried #4.  We settled with option #1 and solved the long snapshot
>creation time by stopping I/O while creating the snapshot.

Ok, thanks. We had another hard lockup overnight caused by this
problem. I've just applied #1; I'll let you know how it goes.

<snip>

>Options to fix (included as attachments and inline):
>
>1) don't do the hash table optimization in lvm_find_exception_table,
>which
>we tried last night.  No crashes, but slow.  Doesn't fix the "get the
>write
>semaphore while holding the read semaphore" problem in
>__remap_snapshot().
>
>--- lvm-snap.c~ Mon Aug 25 15:28:50 2003
>+++ lvm-snap.c-erik     Thu Aug 28 13:33:28 2003
>@@ -130,11 +130,13 @@ static inline lv_block_exception_t *lvm_
>                exception = list_entry(next, lv_block_exception_t,
>hash);
>                if (exception->rsector_org == org_start &&
>                    exception->rdev_org == org_dev) {
>+#if 0
>                        if (i) {
>                                /* fun, isn't it? :) */
>                                list_del(next);
>                                list_add(next, hash_table);
>                        }
>+#endif
>                        ret = exception;
>                        break;
>                }

-- 
Steve McIntyre, Plasmon                      smcintyre@software.plasmon.com
Getting a SCSI chain working is perfectly simple if you remember that there
must be exactly three terminations: one on one end of the cable, one on the
far end, and the goat, terminated over the SCSI chain with a silver-handled
knife whilst burning *black* candles. --- Anthony DeBoer

  reply	other threads:[~2004-01-21  5:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-05  4:36 [linux-lvm] Oops when running snapshots Steve McIntyre
2004-01-12  9:36 ` Steve McIntyre
2004-01-14  8:37   ` Andrew Patterson
2004-01-21  5:35     ` Steve McIntyre [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-01-12 10:27 Little, Chris
2003-07-09 17:27 Andrew Patterson
2003-07-10  4:34 ` Heinz J . Mauelshagen
2003-07-10 12:28   ` Andrew Patterson
2003-08-15 17:16   ` Andrew Patterson

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=20040121102732.GA1037@software.plasmon.com \
    --to=smcintyre@software.plasmon.com \
    --cc=andrew@fc.hp.com \
    --cc=linux-lvm@sistina.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