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

Re: [Nbd] bcache on NBD block devices



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

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... 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

Cheers
Juan Antonio




Reply to: