From: Zachary Palmer <zep_bcache-J5qI5MFTcs8@public.gmane.org>
To: linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: bcache and SSD over provisioning
Date: Wed, 13 Nov 2013 09:32:20 -0500 [thread overview]
Message-ID: <52838D74.6020502@bahj.com> (raw)
In-Reply-To: <op.w6hq4v0of3gqgg-r49W/1Cwd2cba4AQcYcrVKxOck334EZe@public.gmane.org>
On 11/13/2013 09:13 AM, Matthew Patton wrote:
> On Wed, 13 Nov 2013 03:42:54 -0500, Francis Moreau
> <francis.moro-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
>> And finally, can I create the over-provisioning without lost the
>> content of my backing device ?
>
> hell no.
>
I'm a bit confused: why not? Francis seems to be asking if the entire
bcache device needs to be recreated. It definitely is necessary to
rebuild the cache device, but the backing device shouldn't be affected.
Let's call the backing device /dev/backdev and the cache device
/dev/cachedev. Then it should be possible to do the following:
0. If you are using writeback caching, "echo none >
/sys/block/backdev/bcache/cache_mode" to tell bcache to flush the
contents of the cache and then wait until "cat
/sys/block/backdev/bcache/dirty_data" yields a zero
1. "echo 1 > /sys/block/backdev/bcache/detach" to remove the caching
device from the bcache volume
2. "echo 1 > /sys/fs/bcache/$UUID/unregister" to remove the caching
device from the kernel
3. repartition the caching device so that /dev/cachedev is only e.g. 75%
of the SSD
4. "make-bcache -C /dev/cachedev" to recreate the cache device
5. "echo /dev/cachedev > /sys/fs/bcache/register" to make the kernel
aware of the new device
6. "ls /sys/fs/bcache" or just pay attention to make-bcache to find the
cache volume UUID
7. "echo $UUID > /sys/block/backdev/bcache/attach" to reattach the
caching device
8. "echo whatever-mode > /sys/block/backdev/bcache/cache_mode" to put it
back into whichever mode you wish
Is there something wrong with my reasoning? I may also have
misunderstood the situation. I'm just hoping I understand bcache as
well as I think I do. :)
Cheers,
Zach
next prev parent reply other threads:[~2013-11-13 14:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-13 8:42 bcache and SSD over provisioning Francis Moreau
[not found] ` <CAC9WiBiuQ2zG6C9XJio-STz-ScnfzzYb+Rz23u6JW+vFni8PNA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-11-13 14:13 ` Matthew Patton
[not found] ` <op.w6hq4v0of3gqgg-r49W/1Cwd2cba4AQcYcrVKxOck334EZe@public.gmane.org>
2013-11-13 14:32 ` Zachary Palmer [this message]
[not found] ` <52838D74.6020502-J5qI5MFTcs8@public.gmane.org>
2013-11-13 14:42 ` Matthew Patton
[not found] ` <op.w6hshrv5f3gqgg-r49W/1Cwd2cba4AQcYcrVKxOck334EZe@public.gmane.org>
2013-11-13 15:17 ` Zachary Palmer
[not found] ` <5283981B.8090900-J5qI5MFTcs8@public.gmane.org>
2013-11-13 19:58 ` Francis Moreau
2013-11-13 18:23 ` Adam Berkan
[not found] ` <CAHYUNGZAp8_LNqTJ6ufnVjLEnK-8cn0SKYgtH+YpVw_ki2+ONQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-11-13 19:54 ` Francis Moreau
2013-11-13 20:12 ` Paul B. Henson
2013-11-13 19:51 ` Francis Moreau
2013-11-13 22:30 ` Alex Elsayed
2013-11-14 6:12 ` Francis Moreau
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=52838D74.6020502@bahj.com \
--to=zep_bcache-j5qi5mftcs8@public.gmane.org \
--cc=linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/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).