linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: matthew patton <pattonme@yahoo.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] thin handling of available space
Date: Tue, 3 May 2016 12:00:45 +0000 (UTC)	[thread overview]
Message-ID: <1870050920.5354287.1462276845385.JavaMail.yahoo@mail.yahoo.com> (raw)
In-Reply-To: 1870050920.5354287.1462276845385.JavaMail.yahoo.ref@mail.yahoo.com

> written as required. If the file system has particular areas
> of importance that need to be writable to prevent file
> system failure, perhaps the file system should have a way of
> communicating this to the volume layer. The naive approach
> here might be to preallocate these critical blocks before
>  proceeding with any updates to these blocks, such that the
> failure situations can all be "safe" situations,
> where ENOSPC can be returned without a danger of the file
> system locking up or going read-only.

why all of a sudden does each and every FS have to have this added code to second guess the block layer? The quickest solution is to mount the FS in sync mode. Go ahead and pay the performance piper. It's still not likely to be bullet proof but it's a sure step closer.

What you're saying is that when mounting a block device the layer needs to expose a "thin-mode" attribute (or the sysdmin sets such a flag via tune2fs). Something analogous to mke2fs can "detect" LVM raid mode geometry (does that actually work reliably?). 

Then there has to be code in every FS block de-stage path:
IF thin {
  tickle block layer to allocate the block (aka write zeros to it? - what about pre-existing data, is there a "fake write" BIO call that does everything but actually write data to a block but would otherwise trigger LVM thin's extent allocation logic?)
   IF success, destage dirty block to block layer ELSE
   inform userland of ENOSPC
}

In a fully journal'd FS (metadata AND data) the journal could be 'pinned' and likewise the main metadata areas if for no other reason they are zero'd at onset and or constantly being written to. Once written to, LVM thin isn't going to go back and yank away an allocated extent.

This at least should maintain FS integrity albeit you may end up in a situation where the journal can never get properly de-staged, so you're stuck on any further writes and need to force RO.

> just want a sanely behaving LVM + XFS...)
 

IMO if the system admin made a conscious decision to use thin AND overprovision (thin by itself is not dangerous), it's up to HIM to actively manage his block layer. Even on million dollar SANs the expectation is that the engineer will do his job and not drop the mic and walk away. Maybe the "easiest" implementation would be a MD layer job that the admin can tailor to fail all allocation requests once extent count drops below a number and thus forcing all FS mounted on the thinpool to go into RO mode.

But in any event it won't prevent irate users from demanding why the space they appear to have isn't actually there.

       reply	other threads:[~2016-05-03 12:00 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1870050920.5354287.1462276845385.JavaMail.yahoo.ref@mail.yahoo.com>
2016-05-03 12:00 ` matthew patton [this message]
2016-05-03 14:38   ` [linux-lvm] thin handling of available space Xen
2016-05-04  1:25   ` Mark Mielke
2016-05-04 18:16     ` Xen
     [not found] <799090122.6079306.1462373733693.JavaMail.yahoo.ref@mail.yahoo.com>
2016-05-04 14:55 ` matthew patton
2016-05-03 18:19 Xen
     [not found] <1614984310.1700582.1462280490763.JavaMail.yahoo.ref@mail.yahoo.com>
2016-05-03 13:01 ` matthew patton
2016-05-03 15:47   ` Xen
2016-05-04  0:56   ` Mark Mielke
     [not found] <1684768750.3193600.1461851163510.JavaMail.yahoo.ref@mail.yahoo.com>
2016-04-28 13:46 ` matthew patton
     [not found] <929635034.3140318.1461840230292.JavaMail.yahoo.ref@mail.yahoo.com>
2016-04-28 10:43 ` matthew patton
2016-04-28 18:20   ` Xen
2016-04-28 18:25   ` Xen
2016-04-29 11:23     ` Zdenek Kabelac
2016-05-02 14:32       ` Mark Mielke
2016-05-03  9:45         ` Zdenek Kabelac
2016-05-03 10:41           ` Mark Mielke
2016-05-03 11:18             ` Zdenek Kabelac
2016-05-03 10:15         ` Gionatan Danti
2016-05-03 11:42           ` Zdenek Kabelac
2016-05-03 13:15             ` Gionatan Danti
2016-05-03 15:45               ` Zdenek Kabelac
2016-05-03 12:42       ` Xen
     [not found] <518072682.2617983.1461760017772.JavaMail.yahoo.ref@mail.yahoo.com>
2016-04-27 12:26 ` matthew patton
2016-04-27 21:28   ` Xen
2016-04-28  6:46     ` Marek Podmaka
2016-04-28 10:33       ` Xen
  -- strict thread matches above, loose matches on Subject: below --
2016-04-23 17:53 Xen
2016-04-27 12:01 ` Xen

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=1870050920.5354287.1462276845385.JavaMail.yahoo@mail.yahoo.com \
    --to=pattonme@yahoo.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).