All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Brown <david@westcontrol.com>
To: CoolCold <coolthecold@gmail.com>
Cc: keld@keldix.com, stan@hardwarefreak.com,
	Linux RAID <linux-raid@vger.kernel.org>
Subject: Re: XFS on top RAID10 with odd drives count and 2 near copies
Date: Tue, 14 Feb 2012 10:05:53 +0100	[thread overview]
Message-ID: <4F3A23F1.6090908@westcontrol.com> (raw)
In-Reply-To: <CAGqmV7qoKW-7S26VwOS5szRRfvkr_cKh=ggXkXueMifhjJMhfA@mail.gmail.com>

On 14/02/2012 08:31, CoolCold wrote:
> On Tue, Feb 14, 2012 at 3:02 AM,<keld@keldix.com>  wrote:
>> On Tue, Feb 14, 2012 at 01:40:25AM +0400, CoolCold wrote:
>>> On Mon, Feb 13, 2012 at 4:09 PM, Stan
>>> Hoeppner<stan@hardwarefreak.com>  wrote:
>>>> On 2/12/2012 2:16 PM, CoolCold wrote:
>>>>> First of all, Stan, thanks for such detailed answer, I
>>>>> greatly appreciate this!
>>>>
>>>> You're welcome. ?You may or may not appreciate this reply. ?It
>>>> got really long. ?I tried to better explain the XFS+md linear
>>>> array setup.
>>>>
>>>>> There are several reasons for this - 1) I've made decision to
>>>>> use LMV for all "data" volumes (those are except /, /boot,
>>>>> /home , etc) ?2) there will be mysql database which will need
>>>>> backups with snapshots 3)
>>>>
>>>> So you need LVM for snaps, got it.
>>
>>
>> Well, I do not think LVM gives you snaps. I think you need to close
>> down the mysql database to have a consistent DB, then make backup,
>> then reactivate mysql. I may be wrong, tho.
> You are a bit wrong here. MySQL in general supports two storage
> types - MyISAM&  InnoDB. While InnoDB is ACID transactional engine,
> MyISAM isn't. So, one should be able to backup InnoDB with snapshots
> without interrupting workload and it will do recovery/transaction
> rollbackup on startup. For MyISAM engine, snapshots will produce
> unpredictable results as partial update may happen. But, snapshots
> are useful in any case, because they allow to do backup in 4 steps:
> 1) "FLUSH TABLES WITH READ LOCK" - this will flush all buffers and
> close databases 2) lvcreate -s&&  unlock tables.... - doing snapshot
> of data and releasing lock 3) copying it somewhere 4) lvremove .... -
> releasing snapshot
>
> So, in such situation, work will stop for 1)&  2) , not cosuming time
> for 3) .
>
>

Very roughly speaking, taking an LVM snapshot is like pulling the plug 
on the system - if the database engine is able to recover reliably from 
a power fail (by replaying logs, or whatever), then it can restore data 
copied by a snapshot.  I don't know MySQL well enough to say if it can 
do such recovery.

I believe that if you have XFS on LVM, then making a snapshot will first 
"freeze" the filesystem, take the snapshot, then "thaw" the filesystem. 
  This process will sync the system, flushing out outstanding writes, 
and delay new writes until the "thaw" - thus you get a bit better than a 
"power-off copy".  In particular, you don't get zeroed-out files no 
matter what you've done with your barrier settings.

I think ext4 also freezes in the same way, but only with later kernels.

mvh.,

David



  reply	other threads:[~2012-02-14  9:05 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-10 15:17 XFS on top RAID10 with odd drives count and 2 near copies CoolCold
2012-02-11  4:05 ` Stan Hoeppner
2012-02-11 14:32   ` David Brown
2012-02-12 20:16   ` CoolCold
2012-02-13  8:50     ` David Brown
2012-02-13  9:46       ` CoolCold
2012-02-13 11:19         ` David Brown
2012-02-13 13:46       ` Stan Hoeppner
2012-02-13  8:54     ` David Brown
2012-02-13  9:49       ` CoolCold
2012-02-13 12:09     ` Stan Hoeppner
2012-02-13 12:42       ` David Brown
2012-02-13 14:46         ` Stan Hoeppner
2012-02-13 21:40       ` CoolCold
2012-02-13 23:02         ` keld
2012-02-14  3:49           ` Stan Hoeppner
2012-02-14  8:58             ` David Brown
2012-02-14 11:38             ` keld
2012-02-14 23:27               ` Stan Hoeppner
2012-02-15  8:30                 ` Robin Hill
2012-02-15 13:30                   ` Stan Hoeppner
2012-02-15 14:03                     ` Robin Hill
2012-02-15 15:40                     ` David Brown
2012-02-17 13:16                       ` Stan Hoeppner
2012-02-17 14:57                         ` David Brown
2012-02-17 19:30                           ` Peter Grandi
2012-02-18 13:59                             ` David Brown
2012-02-19 14:46                           ` Peter Grandi
2012-02-17 19:03                         ` Peter Grandi
2012-02-17 22:12                           ` Stan Hoeppner
2012-02-18 17:09                           ` Peter Grandi
2012-02-15  9:24                 ` keld
2012-02-15 12:10                 ` David Brown
2012-02-15 13:08                   ` keld
2012-02-17 18:44                 ` Peter Grandi
2012-02-18 17:39                   ` Peter Grandi
2012-02-14  7:31           ` CoolCold
2012-02-14  9:05             ` David Brown [this message]
2012-02-14 11:10               ` Stan Hoeppner
2012-02-14  2:49         ` Stan Hoeppner

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=4F3A23F1.6090908@westcontrol.com \
    --to=david@westcontrol.com \
    --cc=coolthecold@gmail.com \
    --cc=keld@keldix.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=stan@hardwarefreak.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 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.