Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1697531

Re: bcache with existing ext4 filesystem

From Pavel Machek <pavel@ucw.cz>
Newsgroups linux.kernel
Subject Re: bcache with existing ext4 filesystem
Date 2017-07-26 22:10 +0200
Message-ID <u7AN3-4TN-3@gated-at.bofh.it> (permalink)
References (5 earlier) <u75SW-20T-15@gated-at.bofh.it> <u762B-25M-15@gated-at.bofh.it> <u7cB4-6fC-37@gated-at.bofh.it> <u7gbE-eH-19@gated-at.bofh.it> <u7yBA-3lo-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Hi!

> > > > > > Unfortunately, that would mean shifting 400GB data 8KB forward, and
> > > > > > compatibility problems. So I'd prefer adding bcache superblock into
> > > > > > the reserved space, so I can have caching _and_ compatibility with
> > > > > > grub2 etc (and avoid 400GB move):
> > > > > 
> > > > > The common way to do that is to move the beginning of the partition,
> > > > > assuming your ext4 lives in a partition.
> > > > 
> > > > Well... if I move the partition, grub2 (etc) will be unable to access
> > > > data on it. (Plus I do not have free space before some of the
> > > > partitions I'd like to be cached).
> > > 
> > > Why not use dm-linear and prepend space for the bcache superblock?  If 
> > > this is your boot device, then you would need to write a custom 
> > > initrd hook too.
> > 
> > Thanks for a pointer. That would actually work, but I'd have to be
> > very, very careful using it...
> > 
> > ...because if I, or systemd or some kind of automounter sees the
> > underlying device (sda4) and writes to it (it is valid ext4 after
> > all), I'll have inconsistent base device and cache ... and that will
> > be asking for major problems (even in writethrough mode).
> 
> Sigh.  Gone are the days when distributions would only mount filesystems 
> if you ask them to.  
> 
> If this is a desktop, then I'm not sure what to suggest.  But for

This is a desktop.

> with no GUI, turn off the grub2 osprober (GRUB_DISABLE_OS_PROBER="true" in 
> /etc/sysconfig/grub).  If this was LVM, then I would suggest also setting 
> global_filter in lvm.conf.  If you find other places that need poked to 
> prevent automounting then please let me know!
> 
> As for ext4 feature bits, can they be arbitrarily named? (I think they are 
> bits, so maybe not).  Maybe propose a patch to ext4 to provide a

Hmm. I guess I could just set "read-only compatible" bit "this device
has a cache"... but last time I checked, ext3 still replayed log
during read-only mount...
									Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

bcache with existing ext4 filesystem Pavel Machek <pavel@ucw.cz> - 2017-07-24 21:00 +0200
  Re: bcache with existing ext4 filesystem Pavel Machek <pavel@ucw.cz> - 2017-07-24 21:20 +0200
    Re: bcache with existing ext4 filesystem Theodore Ts'o <tytso@mit.edu> - 2017-07-24 21:30 +0200
      Re: bcache with existing ext4 filesystem Pavel Machek <pavel@ucw.cz> - 2017-07-24 22:10 +0200
        Re: bcache with existing ext4 filesystem Theodore Ts'o <tytso@mit.edu> - 2017-07-25 07:00 +0200
          Re: bcache with existing ext4 filesystem Pavel Machek <pavel@ucw.cz> - 2017-07-25 08:50 +0200
            Re: bcache with existing ext4 filesystem Vojtech Pavlik <vojtech@ucw.cz> - 2017-07-25 13:10 +0200
              Re: bcache with existing ext4 filesystem Pavel Machek <pavel@ucw.cz> - 2017-07-25 13:20 +0200
                Re: bcache with existing ext4 filesystem Theodore Ts'o <tytso@mit.edu> - 2017-07-25 18:20 +0200
                Re: bcache with existing ext4 filesystem Eric Wheeler <bcache@lists.ewheeler.net> - 2017-07-25 20:20 +0200
                Re: bcache with existing ext4 filesystem Pavel Machek <pavel@ucw.cz> - 2017-07-26 00:10 +0200
                Re: bcache with existing ext4 filesystem Eric Wheeler <bcache@lists.ewheeler.net> - 2017-07-26 19:50 +0200
                Re: bcache with existing ext4 filesystem "Austin S. Hemmelgarn" <ahferroin7@gmail.com> - 2017-07-26 21:10 +0200
                Re: bcache with existing ext4 filesystem Eric Wheeler <bcache@lists.ewheeler.net> - 2017-07-26 21:20 +0200
                Re: bcache with existing ext4 filesystem Pavel Machek <pavel@ucw.cz> - 2017-07-26 22:10 +0200
          Re: bcache with existing ext4 filesystem Pavel Machek <pavel@ucw.cz> - 2017-07-25 15:50 +0200
            Re: bcache with existing ext4 filesystem Theodore Ts'o <tytso@mit.edu> - 2017-07-25 20:10 +0200
              Re: bcache with existing ext4 filesystem Pavel Machek <pavel@ucw.cz> - 2017-07-25 23:00 +0200
  Re: bcache with existing ext4 filesystem Reindl Harald <h.reindl@thelounge.net> - 2017-07-24 21:30 +0200

csiph-web