[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Nbd] bcache on NBD block devices



Op woensdag 26 februari 2014 09:31:50 schreef Juan Antonio Martinez:
> El mar, 25-02-2014 a las 11:37 -0500, Paul Clements escribió:
> > On Tue, Feb 25, 2014 at 9:40 AM, Juan Antonio Martinez
> > 
> > <jantonio@...1345...> wrote:
> > > Hi all
> > > (This is my first post on this list. I'm still a novice on bcache and
> > > proper nettiquete on this list, so apologize for my mistakes)
> > > Scenario: several NBD LTSP Fat Clients on (a bit) obsolete hardware
> > > kernel 3.11.0-15 on Ubuntu 13.10
> > > /dev/sda1 as local cache device
> > > /dev/nbd1 as remote NBD backing bcache device
> > > - I've created and registered /dev/sda1 as cache device without problems
> > > - To create nbd file to be exported I've typed following sequence:
> > > # create an empty file
> > > root# dd if=/dev/zero of=bcache_test.img bs=1M count=64
> > > # use it as loop block device
> > > root# losetup /dev/loop0
> > > # make it a backing bcache device
> > > root# make-bcache -B /dev/loop0
> > 
> > have you tried doing this step from the client machine instead, i.e.:
> > make-bache -B /dev/nbd1
> > after the nbd connection is up? does that work?
> 
> Just tested: works fine.... but only in the LTSP client where I did the
> changes, and had to tell nbd-server to export imagefile in read-write
> mode

In that case, I'm not entirely sure what you're trying to do.

Can you explain what you are trying to cache? How do you expect performance 
improvements by that caching?

> Remember that my configuration consist in several (>250!) LTSP-NBD
> clients sharing _the_same_ mounted squashfs image file. I cannot for
> obious reasons make the image file to be shared read-write on every
> clients at the same time...

No, that would not work.

> and seems that bcache needs write access to
> the backing block device to work
> 
> ¿Is this correct? If so, bcache is not for me :-( ¿Any alternatives?
> 
> Perhaps I coult try to create bcache'd image file, and then modify NBD
> server permissions to export in copy-on-write-mode... but this would
> work if bcache only writes in bcache superblock ( my image files are
> typically 8Gb size each) as this will create one cow file per client on
> server

The cow file only contains the changes for the relevant client; it never 
copies the entire image -- so, this shouldn't be an issue.

-- 
This end should point toward the ground if you want to go to space.

If it starts pointing toward space you are having a bad problem and you
will not go to space today.

  -- http://xkcd.com/1133/




Reply to: