All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Turmel <philip@turmel.org>
To: Wols Lists <antlists@youngman.org.uk>,
	ian_bruce@mail.ru, linux-raid@vger.kernel.org
Subject: Re: [BUG] non-metadata arrays cannot use more than 27 component devices
Date: Wed, 1 Mar 2017 12:23:42 -0500	[thread overview]
Message-ID: <27373f29-a8ea-012c-102d-9fadf05cb3c2@turmel.org> (raw)
In-Reply-To: <58B6E287.9020804@youngman.org.uk>

On 03/01/2017 10:02 AM, Wols Lists wrote:

> Sorry to drag this up again, but where are these write intent bits
> going to come from? And it's a backup. Why am I going to re-add,
> unless I'm going to wipe the old backup and create a new one?

Given your process below, it's moot.

> And your way is more complicated - more room for sys-admin cock-up
> :-)

I strongly disagree.  This procedure, as shown, is an admin cock-up:

> mdadm --build /dev/mdbackup --device-count 2 /dev/md/home missing
> ... hotplug sd-big ...
> madam /dev/mdbackup --add /dev/sd-big
> ... wait for sync to finish ...
> mdadm --stop mdbackup
> ... unplug sd-big ...

Are you unmounting /dev/md/home while this is going on?  If not, and
there's any significant activity, your "backup" is corrupt.  If you are
unmounting, your data is unavailable for the duration of the resync.

The corresponding procedure for logical volume in LVM would be:

# lvcreate -n homesnaplv -s homelv --size 10g vg0
# dd if=/dev/vg0/homesnaplv of=/dev/sd-big bs=1M
# lvremove /dev/vg0/homesnaplv

Unlike your solution, the LVM snapshot won't be changing underneath you
during the copy.  The allocated size of the snapshot, shown as 10g
above, only has to be big enough to accommodate the amount of writes to
homelv while the dd is in progress.

Also, LVM understands most mounted filesystems, and will invoke the
proper kernel calls to briefly quiesce the filesystem for the snapshot,
ensuring the filesystem copied out is consistent.  But the user sees
only a few tens or hundreds of milliseconds of hesitation and can keep
going.  Writes to homelv while the snapshot exists generate extra disk
activity (to move the replaced blocks to the snapshot storage, with some
metadata), but is otherwise invisible to the users.

LVM is *made* for this.  You should use it.

Phil

  reply	other threads:[~2017-03-01 17:23 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-24 12:08 [BUG] non-metadata arrays cannot use more than 27 component devices ian_bruce
2017-02-24 15:20 ` Phil Turmel
2017-02-24 16:40   ` ian_bruce
2017-02-24 20:46     ` Phil Turmel
2017-02-25 20:05       ` Anthony Youngman
2017-02-25 22:00         ` Phil Turmel
2017-02-25 23:30           ` Wols Lists
2017-02-25 23:41             ` Phil Turmel
2017-02-25 23:55               ` Wols Lists
2017-02-26  0:07                 ` Phil Turmel
2017-03-01 15:02                   ` Wols Lists
2017-03-01 17:23                     ` Phil Turmel [this message]
2017-03-01 18:13                       ` Phil Turmel
2017-03-01 19:50                         ` Anthony Youngman
2017-03-01 22:20                           ` Phil Turmel
2017-02-27  5:55 ` NeilBrown
2017-02-28 10:25   ` ian_bruce
2017-02-28 20:29     ` NeilBrown
2017-03-01 13:05       ` ian_bruce

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=27373f29-a8ea-012c-102d-9fadf05cb3c2@turmel.org \
    --to=philip@turmel.org \
    --cc=antlists@youngman.org.uk \
    --cc=ian_bruce@mail.ru \
    --cc=linux-raid@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.