> -----Original Message-----
> From: Marc MERLIN <m...@merlins.org>
> Sent: Tuesday, 3 July 2018 2:07 PM
> To: Paul Jones <p...@pauljones.id.au>
> Cc: linux-btrfs@vger.kernel.org
> Subject: Re: how to best segment a big block device in resizeable btrfs
> filesystems?
> 
> On Tue, Jul 03, 2018 at 12:51:30AM +0000, Paul Jones wrote:
> > You could combine bcache and lvm if you are happy to use dm-cache
> instead (which lvm uses).
> > I use it myself (but without thin provisioning) and it works well.
> 
> Interesting point. So, I used to use lvm and then lvm2 many years ago until I
> got tired with its performance, especially as asoon as I took even a single
> snapshot.
> But that was a long time ago now, just saying that I'm a bit rusty on LVM
> itself.
> 
> That being said, if I have
> raid5
> dm-cache
> dm-crypt
> dm-thin
> 
> That's still 4 block layers under btrfs.
> Am I any better off using dm-cache instead of bcache, my understanding is
> that it only replaces one block layer with another one and one codebase with
> another.

True, I didn't think of it like that.

> Mmmh, a bit of reading shows that dm-cache is now used as lvmcache, which
> might change things, or not.
> I'll admit that setting up and maintaining bcache is a bit of a pain, I only 
> used it
> at the time because it seemed more ready then, but we're a few years later
> now.
> 
> So, what do you recommend nowadays, assuming you've used both?
> (given that it's literally going to take days to recreate my array, I'd 
> rather do it
> once and the right way the first time :) )

I don't have any experience with this, but since it's the internet let me tell 
you how I'd do it anyway 😝
raid5
dm-crypt
lvm (using thin provisioning + cache)
btrfs

The cache mode on lvm requires you to set up all your volumes first, then add 
caching to those volumes last. If you need to modify the volume then you have 
to remove the cache, make your changes, then re-add the cache. It sounds like a 
pain, but having the cache separate from the data is quite handy.
Given you are running a backup server I don't think the cache would really do 
much unless you enable writeback mode. If you can split up your filesystem a 
bit to the point that btrfs check doesn't OOM that will seriously help 
performance as well. Rsync might be feasible again.

Paul.

N�����r��y���b�X��ǧv�^�)޺{.n�+����{�n�߲)���w*jg��������ݢj/���z�ޖ��2�ޙ���&�)ߡ�a�����G���h��j:+v���w�٥

Reply via email to