Hi Adam, On Wed, Feb 01, 2012 at 01:38:12PM -0800, Adam Berkan wrote: > Oh, sorry I misunderstood. > > You have to run make-bcache once to add a bcache superblock to the drive. > After that the drive contents are destroyed and it needs to be formatted > with a filesystem. ah! That's not good... Is there any plan to have the caching device attachable and detachable from *any* backing device without prior "formatting" of this second one? I think bcache is a very interesting and promising project, but formatting the backing device is something, I think, that should be avoided. bye, pg > At that point you can attach or detach the drive while it is in use. > > Adam > > On Wed, Feb 1, 2012 at 12:54 PM, Piergiorgio Sartor < > piergiorgio.sartor@xxxxxxxx> wrote: > > > Hi Adam, > > > > thanks for the answer, see below. > > > > On Wed, Feb 01, 2012 at 11:04:59AM -0800, Adam Berkan wrote: > > > You can attach bcache to a drive with an existing file system, and it > > will > > > continue as normal. If you connect to a drive without a file system, > > then > > > it will continue to not have a file system, but you can format it while > > > attached. > > > > Maybe I misused the term "format". > > > > I did not mean filesystem format, but bcache format. > > > > What I understood, maybe I'm wrong, is that the backing > > device, before being used, must be "initialized" with > > the bcache tool. > > > > From the docs: > > > > Getting started: > > You'll need make-bcache from the bcache-tools repository. Both the cache > > device > > and backing device must be formatted before use. > > make-bcache -B /dev/sdb > > make-bcache -C -w2k -b1M -j64 /dev/sdc > > > > I understand this as the backing device gets something > > on written on it (note the term "formatted"). > > > > Am I wrong? I hope so... > > > > Thanks again, > > > > bye, > > > > pg > > > > > Attach/detach should work while the device is in use. This isn't the > > most > > > tested code path, especially with writeback on, but it's supposed to > > work. > > > Detaching while the cache is dirty requires flushing all that data so > > > performance will be bad until the detach completes. > > > > > > Let us know if you find any bugs. > > > Adam > > > > > > On Wed, Feb 1, 2012 at 2:10 AM, Piergiorgio Sartor < > > > piergiorgio.sartor@xxxxxxxx> wrote: > > > > > > > Hi all, > > > > > > > > first of all I would like to congratulate for this > > > > project, I think it is one of the most promising > > > > feature the Linux kernel can have. > > > > > > > > Wrote that, I've a question about the concept of > > > > formatting the backing device. > > > > > > > > As far as I understood, the first concept of bcache > > > > was to simply "register" or "attach" a cache to a > > > > backing device, that is, the backing device had not > > > > to be formatted. > > > > > > > > Lately, still if I understood it correctly, this > > > > behaviour was changed and, now, the backing device > > > > needs to be formatted. > > > > > > > > So, the question is: > > > > > > > > How about an already running device? Is it still > > > > possible to attach a cache under such situation? > > > > > > > > In general, would it be possible to attach/detach > > > > a cache to any already available device (in the > > > > future)? Or the caching/backing setup must be planned > > > > before the HW is available, so to speak? > > > > > > > > It would be useful (and cool too), to have the > > > > possibility to attach/detach the SSD cache, on > > > > the fly (at run-time) to any device it needs it. > > > > > > > > I hope the question(s) are clear, if not please > > > > let me know. > > > > > > > > Thanks a lot in advance, > > > > > > > > bye, > > > > > > > > -- > > > > > > > > piergiorgio > > > > -- > > > > To unsubscribe from this list: send the line "unsubscribe > > linux-bcache" in > > > > the body of a message to majordomo@xxxxxxxxxxxxxxx > > > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > > > > > > -- > > > > piergiorgio > > -- piergiorgio -- To unsubscribe from this list: send the line "unsubscribe linux-bcache" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html