grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] lvm: add lvm cache logical volume handling


From: Daniel Kiper
Subject: Re: [PATCH] lvm: add lvm cache logical volume handling
Date: Thu, 24 Oct 2019 17:21:04 +0200
User-agent: NeoMutt/20170113 (1.7.2)

On Thu, Oct 24, 2019 at 04:43:58AM +0000, Michael Chang wrote:
> On Wed, Oct 23, 2019 at 12:48:23PM +0200, Daniel Kiper wrote:
> > On Wed, Oct 16, 2019 at 06:15:30AM +0000, Michael Chang wrote:
> > > The lvm cache logical volume is the logical volume consisting of the
> > > original and the cache pool logical volume. The original is usually on a
> > > larger and slower storage device while the cache pool is on a smaller
> > > and faster one. The performance of the original volume can be improved
> > > by storing the frequently used data on the cache pool to utilize the
> > > greater performance of faster device.
> > >
> > > The default cache mode "writethrough" ensures that any data written will
> > > be stored both in the cache and on the origin LV, therefore grub can go
> > > straight to read the original lv as no data loss is guarenteed.
> > >
> > > The second cache mode is "writeback", which delays writing from the
> > > cache pool back to the origin LV to have increased performance. The
> > > drawback is potential data loss if losing the associated cache device.
> > >
> > > During the boot time grub reads the LVM offline i.e. LVM volumes are not
> > > activated and mounted, IMHO it should be fine to read directly from
> > > original lv since all cached data should have been flushed back in the
> > > process of taking it offline.
> >
> > Is it possible to enforce all GRUB writes to the original device instead
> > of cache during installation process?
>
> I couldn't give concrete answer whether it is possible, but it sounds to
> me not good idea because in general bypassing the cache could
> potentially break the consistency of data and the data being cached.
>
> Perhaps some system calls could help to sync the data out of the lvm
> cache to the original LV during installation process. It seems fsync
> does it for us, but I didn't have good idea either if it is enough.

May I ask you to investigate that and if it is needed add required
install code. I mean fsync(), etc.

Daniel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]