From: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
To: Rich Freeman <r-btrfs@thefreemanclan.net>
Cc: Duncan <1i5t5.duncan@cox.net>, Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: device balance times
Date: Fri, 24 Oct 2014 12:07:03 -0400 [thread overview]
Message-ID: <20141024160703.GG17395@hungrycats.org> (raw)
In-Reply-To: <CAGfcS_mVJ0WH0rootEHnXxgHVvRD+oYuF988ZLtV9OABM7x4JQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3092 bytes --]
On Fri, Oct 24, 2014 at 06:58:25AM -0400, Rich Freeman wrote:
> On Thu, Oct 23, 2014 at 10:35 PM, Zygo Blaxell
> <ce3g8jdj@umail.furryterror.org> wrote:
> >
> > - single profile: we can tolerate zero missing disks,
> > so we don't allow rw mounts even if degraded.
>
> That seems like the wrong logic here. By all means mount read-only by
> default for safety, but there should be a way to force a read-write
> mount on any filesystem, precisely because the RAID modes can be mixed
> and even if you lose two devices on a RAID1 system not ALL the data is
> lost if you have more than two drives.
I agree, but https://bugzilla.kernel.org/show_bug.cgi?id=60594 does not:
Stefan Behrens 2013-08-23 13:42:16 UTC
The way out is to mount read-only, copy the data aside and be
happy that no data was lost.
The #1 goal (IMO) is to avoid data loss. Therefore the filesystem
goes read-only if less devices are functional for writing than
required by the selected RAID levels. And in order to avoid
the surprise of a filesystem going read-only 30 seconds after
mounting it, this is also enforced at mount time. [...]
We could also leave this as an option to the user "mount -o
degraded-and-I-want-to-lose-my-data", but in my opinion the use
case is very, very exceptional.
IMHO the use case is common any time restoring the entire filesystem
from backups is inconvenient. That covers a *lot* of users. I never
have a machine with more than 50% of its raw disk space devoted to btrfs
because I need raw space on the disk to do mkfs+rsync from the broken
read-only btrfs filesystems.
Somewhere in the future for btrfs is online fsck; however, we're not there
yet. The kernel still blows up over relatively minor structural errors.
FWIW I'd like to be able to mount a broken btrfs read-write, add more
storage (either grow existing disks or add new ones), and then use the new
storage as temporary space to build a cleaned copy of the old metadata
with unreachable or broken objects dropped (preferably leaving some
object behind that returns EIO when read, but can be written or deleted).
Once there is clean metadata, we can rebuild free space maps (possibly
collecting allocated orphan extents into lost+found), then the surviving
data can be rebalanced or moved fairly easily. The grown/added disks
can be shrunk/removed at the end.
> By all means return an error when reading a file that is completely
> missing. By all means have an extra fsck mode that goes ahead and
> deletes all the missing files (assuming it has metadata) or perhaps
> moves them all to a new "lost+notfound" subvolume or something.
>
> Indeed, if the lost device just happens to not actually contain any
> data you might be lucky and not lose any data at all when losing a
> single device in a filesystem that entirely uses the single profile.
> That would be a bit of an edge case though, but one that is
> automatically handled if you give the admin the ability to force
> read-write/etc.
>
> --
> Rich
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2014-10-24 16:07 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-21 18:59 device balance times Tomasz Chmielewski
2014-10-21 20:14 ` Piotr Pawłow
2014-10-21 20:44 ` Arnaud Kapp
2014-10-22 1:10 ` 5 _thousand_ snapshots? even 160? (was: device balance times) Robert White
2014-10-22 4:02 ` Zygo Blaxell
2014-10-22 4:05 ` Duncan
2014-10-23 20:38 ` 5 _thousand_ snapshots? even 160? Arnaud Kapp
2014-10-22 11:30 ` Austin S Hemmelgarn
2014-10-22 17:32 ` Goffredo Baroncelli
2014-10-22 11:22 ` device balance times Austin S Hemmelgarn
2014-10-22 1:43 ` Chris Murphy
2014-10-22 12:40 ` Piotr Pawłow
2014-10-22 16:59 ` Bob Marley
2014-10-23 7:39 ` Russell Coker
2014-10-23 8:49 ` Duncan
2014-10-23 9:19 ` Miao Xie
2014-10-23 11:39 ` Austin S Hemmelgarn
2014-10-24 1:05 ` Duncan
2014-10-24 2:35 ` Zygo Blaxell
2014-10-24 5:13 ` Duncan
2014-10-24 15:18 ` Zygo Blaxell
2014-10-24 10:58 ` Rich Freeman
2014-10-24 16:07 ` Zygo Blaxell [this message]
2014-10-24 19:58 ` Rich Freeman
2014-10-22 16:15 ` Chris Murphy
2014-10-23 2:44 ` Duncan
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=20141024160703.GG17395@hungrycats.org \
--to=ce3g8jdj@umail.furryterror.org \
--cc=1i5t5.duncan@cox.net \
--cc=linux-btrfs@vger.kernel.org \
--cc=r-btrfs@thefreemanclan.net \
/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.