linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: "Stuart D. Gathman" <stuart@bmsi.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] LVM on SATA/PATA disks
Date: Sun, 13 May 2007 13:24:15 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.44.0705131307080.6567-100000@bmsred.bmsi.com> (raw)
In-Reply-To: <464740CD.1080807@gmail.com>

On Sun, 13 May 2007, Les Mikesell wrote:

> > Of course, any of the re-ordering (SCSI TCQ, or SATA NCQ) requires
> > filesystem and driver support of write barriers for reliability.
> > Write barriers are not implement in DM, hence LVM, so there is a
> > reliability risk in going with this kind of solution.  Depending on
> > the filesystem this can result in power failures resulting in files
> > having inconsistent data.
> 
> Are you saying that LVM on SCSI is not safe in this scenario?

If out of order writes are enabled, then your server should hold power
to the disk drives for part of a second after disabling further writes
in software.  LVM is a low risk because LVM changes are comparatively
rare, and the modification window is small.  But, theoretically, if
you lost power right at the instant you pressed return on lvcreate,
lvextend, or lvremove, on a system with busy disk io, you could corrupt
the LVM metadata.

Having a UPS and doing a shutdown solves the problem.  However, if your
server enables out of order writes with native queuing, and loses power
without a shutdown, and doesn't keep drives powered long enough after 
stopping the CPUs (this is why high end servers now have a microprocessor
dedicated to power sequencing), then you should not rely on filesystem
journalling, and should do an fsck at reboot.  FS journals rely on physical
writes taking place in-order, or at least having 'sync' calls to finish
previous logical writes before starting a new one (write barrier).
There is a similar issue with creating a database on top of a file.
For example, you have to use 'fsync' after writing a checkpoint, before
beginning updates.

-- 
	      Stuart D. Gathman <stuart@bmsi.com>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.

  reply	other threads:[~2007-05-13 17:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-12 21:42 [linux-lvm] LVM on SATA/PATA disks Bertrand Renuart
2007-05-13  1:12 ` Stuart D. Gathman
2007-05-13  1:23   ` Brian J. Murrell
2007-05-13  1:34     ` Stuart D. Gathman
2007-05-13  2:06       ` David Brown
2007-05-13 16:46         ` Les Mikesell
2007-05-13 17:24           ` Stuart D. Gathman [this message]
2007-05-14  8:38             ` Bryn M. Reeves
2007-05-14  8:30         ` Bryn M. Reeves
2007-05-14 15:24           ` David Brown
2007-05-15 14:35             ` Bryn M. Reeves
2007-05-13 20:25   ` Bertrand Renuart
2007-05-14 14:53     ` Stuart D. Gathman
2007-05-14 14:59     ` Daniel Davidson

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=Pine.LNX.4.44.0705131307080.6567-100000@bmsred.bmsi.com \
    --to=stuart@bmsi.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).