RE: Moving a backing device between 2 cachesets
From: Patrick Zwahlen <hidden>
Date: 2014-01-29 07:49:25
-----Original Message----- From: matthew patton [mailto:pattonme@yahoo.com] Sent: mardi 28 janvier 2014 23:36 To: Patrick Zwahlen; linux-bcache@vger.kernel.org Subject: Re: Moving a backing device between 2 cachesetsquoted
Scenario - md attached to cacheset1 and working (on node 1) - md detached from cacheset1You can't just detach, you must flush everything out of cacheset1 and destroy/revoke/disassemble the relationship between the cache and MD. 'destroy-bcache(8) or make-bcache -D' if you will. Not that such a tool exists AFAIK.
Doc says: detach Write to this file to detach from a cache set. If there is dirty data in the cache, it will be flushed first. As we're in write-through mode, I don't care about dirty data
quoted
- md stopped on node 1 - md started on node 2 - md attached to cacheset2 on node 2No, you don't attache it, you have to create a new relationship; ala 'make-bcache -C ...'
Hmmm. The local ssd (cacheset) is shared between multiple backing devices, so having to "make-bcache -C" at this point is painful.
quoted
At this point, cacheset1 is attached to nothing, but still has validblocksquoted
"linked" to the backing md deviceIf you do, your data is hopelessly gone.
Again, write-through means all the writes should be safe. I mostly care about reads that were cached in a previous cacheset and might be delivered again. The setup is maybe hard to describe, so for the sake of simplicity it can be summarized like that: One node with 2 independent SSDs configured as write-through cachesets (-C) and multiple storage devices configured as backing devices (-B). I want to be able to safely move any single backing device from one SSD to the other (and vice-versa) in a safe way. Would that work ? Regards, - Patrick -
Attachments
- smime.p7s [application/pkcs7-signature] 6043 bytes