public inbox for linux-bcache@vger.kernel.org
 help / color / mirror / Atom feed
* Replacing the caching device (SSD) of a bcache set
@ 2013-08-08 12:17 Josep Lladonosa
       [not found] ` <CAPBO7TbPW5thQt04kUm6gzHqAJna+2pvKU5rnwLVGc7DdBdMvA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Josep Lladonosa @ 2013-08-08 12:17 UTC (permalink / raw)
  To: linux-bcache-u79uwXL29TY76Z2rM5mHXA

Hello,

I am running a root file system (/) in a bcache set (/dev/sda3 as the
backing device and /dev/sdb -the SSD- as the caching device).

I want to replace the caching device with another hardware.

The question is, which is the best procedure to replace it? I was thinking
about:

- turn off computer.
- replace SSD with the new one.
- turn on computer.

It seems to me very simple, perhaps too much. Does it need any other
step? Reattaching?



--
--
Salutacions...Josep
--

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Replacing the caching device (SSD) of a bcache set
       [not found] ` <CAPBO7TbPW5thQt04kUm6gzHqAJna+2pvKU5rnwLVGc7DdBdMvA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2013-08-09  0:18   ` Kent Overstreet
  2013-08-09  0:25   ` Kent Overstreet
  1 sibling, 0 replies; 7+ messages in thread
From: Kent Overstreet @ 2013-08-09  0:18 UTC (permalink / raw)
  To: Josep Lladonosa; +Cc: linux-bcache-u79uwXL29TY76Z2rM5mHXA

On Thu, Aug 08, 2013 at 02:17:24PM +0200, Josep Lladonosa wrote:
> Hello,
> 
> I am running a root file system (/) in a bcache set (/dev/sda3 as the
> backing device and /dev/sdb -the SSD- as the caching device).
> 
> I want to replace the caching device with another hardware.
> 
> The question is, which is the best procedure to replace it? I was thinking
> about:
> 
> - turn off computer.
> - replace SSD with the new one.
> - turn on computer.
> 
> It seems to me very simple, perhaps too much. Does it need any other
> step? Reattaching?

Detach the bcache device from the cache set first - _definitely_ do that
first if you're using it in writeback mode

echo 1 > /sys/block/bcache0/bcache/detach

Unregistering the cache set detaches it from every attached device too:
echo 1 > /sys/fs/bcache/<cache set>/unregister

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Replacing the caching device (SSD) of a bcache set
       [not found] ` <CAPBO7TbPW5thQt04kUm6gzHqAJna+2pvKU5rnwLVGc7DdBdMvA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2013-08-09  0:18   ` Kent Overstreet
@ 2013-08-09  0:25   ` Kent Overstreet
  2013-08-11  9:28     ` Josep Lladonosa
  1 sibling, 1 reply; 7+ messages in thread
From: Kent Overstreet @ 2013-08-09  0:25 UTC (permalink / raw)
  To: Josep Lladonosa; +Cc: linux-bcache-u79uwXL29TY76Z2rM5mHXA

On Thu, Aug 08, 2013 at 02:17:24PM +0200, Josep Lladonosa wrote:
> Hello,
> 
> I am running a root file system (/) in a bcache set (/dev/sda3 as the
> backing device and /dev/sdb -the SSD- as the caching device).
> 
> I want to replace the caching device with another hardware.
> 
> The question is, which is the best procedure to replace it? I was thinking
> about:
> 
> - turn off computer.
> - replace SSD with the new one.
> - turn on computer.
> 
> It seems to me very simple, perhaps too much. Does it need any other
> step? Reattaching?

Oh, for reattaching - after you boot up with the new SSD, you'll format
it and register it, then reattach

ls /sys/fs/bcache to get the new cache set UUID

echo <uuid> /sys/block/bcache0/bcache/attach

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Replacing the caching device (SSD) of a bcache set
  2013-08-09  0:25   ` Kent Overstreet
@ 2013-08-11  9:28     ` Josep Lladonosa
       [not found]       ` <CAPBO7TYh36a1ON=4zT6qvwQYAwsOy5KAu0qQLNMtLP9+ySdoMA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Josep Lladonosa @ 2013-08-11  9:28 UTC (permalink / raw)
  To: Kent Overstreet; +Cc: linux-bcache-u79uwXL29TY76Z2rM5mHXA

On 9 August 2013 02:25, Kent Overstreet <kmo-PEzghdH756F8UrSeD/g0lQ@public.gmane.org> wrote:
> On Thu, Aug 08, 2013 at 02:17:24PM +0200, Josep Lladonosa wrote:
>> Hello,
>>
>> I am running a root file system (/) in a bcache set (/dev/sda3 as the
>> backing device and /dev/sdb -the SSD- as the caching device).
>>
>> I want to replace the caching device with another hardware.
>>
>> The question is, which is the best procedure to replace it? I was thinking
>> about:
>>
>> - turn off computer.
>> - replace SSD with the new one.
>> - turn on computer.
>>
>> It seems to me very simple, perhaps too much. Does it need any other
>> step? Reattaching?
>
> Oh, for reattaching - after you boot up with the new SSD, you'll format
> it and register it, then reattach
>
> ls /sys/fs/bcache to get the new cache set UUID
>
> echo <uuid> /sys/block/bcache0/bcache/attach


Hello,

Thanks to eveybody. All working now.

Just a comment. I find that with kernel 3.11.0-rc4 hard disk writes
are teeeeeerribly slow (for example when installing a deb package, for
example, a new kernel. It runs, but very slow comparing to a system
running without bcache.

Josep


-- 
--
Salutacions...Josep
--

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Replacing the caching device (SSD) of a bcache set
       [not found]       ` <CAPBO7TYh36a1ON=4zT6qvwQYAwsOy5KAu0qQLNMtLP9+ySdoMA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2013-08-11 10:13         ` Huub Bouma
       [not found]           ` <520763C3.9080605-CuspTiYYhYk@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Huub Bouma @ 2013-08-11 10:13 UTC (permalink / raw)
  To: Josep Lladonosa; +Cc: linux-bcache-u79uwXL29TY76Z2rM5mHXA

On 08/11/2013 11:28 AM, Josep Lladonosa wrote:
> Hello, Thanks to eveybody. All working now. Just a comment. I find
> that with kernel 3.11.0-rc4 hard disk writes are teeeeeerribly slow
> (for example when installing a deb package, for example, a new kernel.
> It runs, but very slow comparing to a system running without bcache.
> Josep 

Hi Josep,

I had the exact same issue, when running dpkg it took half an hour or
so.. after chatting on IRC to Kent Overstreet I was told this was fixed,
so you might need to patch the kernel with the latest changes. I haven't
seen this issue since, but haven't done a lot of testing since either..

Cheers, Huub

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Replacing the caching device (SSD) of a bcache set
       [not found]           ` <520763C3.9080605-CuspTiYYhYk@public.gmane.org>
@ 2013-08-11 11:19             ` Josep Lladonosa
       [not found]               ` <CA+res+TDPvuqj1A=6OznPRyA+OZnfHSo7=d=82gTrELaby7vPg@mail.gmail.com>
  0 siblings, 1 reply; 7+ messages in thread
From: Josep Lladonosa @ 2013-08-11 11:19 UTC (permalink / raw)
  To: Huub Bouma; +Cc: linux-bcache-u79uwXL29TY76Z2rM5mHXA

On 11 August 2013 12:13, Huub Bouma <bouma-CuspTiYYhYk@public.gmane.org> wrote:
> On 08/11/2013 11:28 AM, Josep Lladonosa wrote:
>> Hello, Thanks to eveybody. All working now. Just a comment. I find
>> that with kernel 3.11.0-rc4 hard disk writes are teeeeeerribly slow
>> (for example when installing a deb package, for example, a new kernel.
>> It runs, but very slow comparing to a system running without bcache.
>> Josep
>
> Hi Josep,
>
> I had the exact same issue, when running dpkg it took half an hour or
> so.. after chatting on IRC to Kent Overstreet I was told this was fixed,
> so you might need to patch the kernel with the latest changes. I haven't
> seen this issue since, but haven't done a lot of testing since either..
>
> Cheers, Huub

Thanks. I wanted to git clone http://evilpiepirate.org/git/linux-bcache.git
but it gives me timeout. I am very new to git and so. Is there an easy
way to the patch from git to patch 3.11.0-rc4 with the latest? (Or how
getting just the drivers/md/bcache folder and replace it would do,
yes?)



-- 
--
Salutacions...Josep
--

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Replacing the caching device (SSD) of a bcache set
       [not found]                 ` <CA+res+TDPvuqj1A=6OznPRyA+OZnfHSo7=d=82gTrELaby7vPg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2013-08-12  8:21                   ` Josep Lladonosa
  0 siblings, 0 replies; 7+ messages in thread
From: Josep Lladonosa @ 2013-08-12  8:21 UTC (permalink / raw)
  To: Jack Wang
  Cc: Huub Bouma, linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

On 11 August 2013 16:17, Jack Wang <jack.wang.usish-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hi Josep,
>
> I think what you need is patch below
>
> http://evilpiepirate.org/git/linux-bcache.git/patch/?id=2c19adf62316ff0bb9db85b11845d18b7009ab4b
>
> http://evilpiepirate.org/git/linux-bcache.git/commit/?h=bcache-for-3.11
>
> Apply that patch and re complile your bcache should work

Thanks Jack. Unfortunately long writes to drive are still slow.
Checked the patch against 3.11.0-rc4 and 3.11.0-rc5...

Josep

>
> KR
>
> Jack
>
>
> 2013/8/11 Josep Lladonosa <jlladono-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>
>> On 11 August 2013 12:13, Huub Bouma <bouma-CuspTiYYhYk@public.gmane.org> wrote:
>> > On 08/11/2013 11:28 AM, Josep Lladonosa wrote:
>> >> Hello, Thanks to eveybody. All working now. Just a comment. I find
>> >> that with kernel 3.11.0-rc4 hard disk writes are teeeeeerribly slow
>> >> (for example when installing a deb package, for example, a new kernel.
>> >> It runs, but very slow comparing to a system running without bcache.
>> >> Josep
>> >
>> > Hi Josep,
>> >
>> > I had the exact same issue, when running dpkg it took half an hour or
>> > so.. after chatting on IRC to Kent Overstreet I was told this was fixed,
>> > so you might need to patch the kernel with the latest changes. I haven't
>> > seen this issue since, but haven't done a lot of testing since either..
>> >
>> > Cheers, Huub
>>
>> Thanks. I wanted to git clone
>> http://evilpiepirate.org/git/linux-bcache.git
>> but it gives me timeout. I am very new to git and so. Is there an easy
>> way to the patch from git to patch 3.11.0-rc4 with the latest? (Or how
>> getting just the drivers/md/bcache folder and replace it would do,
>> yes?)
>>
>>
>>
>> --
>> --
>> Salutacions...Josep
>> --
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
>> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>



-- 
--
Salutacions...Josep
--

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-08-12  8:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-08 12:17 Replacing the caching device (SSD) of a bcache set Josep Lladonosa
     [not found] ` <CAPBO7TbPW5thQt04kUm6gzHqAJna+2pvKU5rnwLVGc7DdBdMvA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-08-09  0:18   ` Kent Overstreet
2013-08-09  0:25   ` Kent Overstreet
2013-08-11  9:28     ` Josep Lladonosa
     [not found]       ` <CAPBO7TYh36a1ON=4zT6qvwQYAwsOy5KAu0qQLNMtLP9+ySdoMA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-08-11 10:13         ` Huub Bouma
     [not found]           ` <520763C3.9080605-CuspTiYYhYk@public.gmane.org>
2013-08-11 11:19             ` Josep Lladonosa
     [not found]               ` <CA+res+TDPvuqj1A=6OznPRyA+OZnfHSo7=d=82gTrELaby7vPg@mail.gmail.com>
     [not found]                 ` <CA+res+TDPvuqj1A=6OznPRyA+OZnfHSo7=d=82gTrELaby7vPg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-08-12  8:21                   ` Josep Lladonosa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox