Re: [Nbd] bcache on NBD block devices
- To: nbd-general@lists.sourceforge.net
- Cc: linux-bcache@...25...
- Subject: Re: [Nbd] bcache on NBD block devices
- From: Juan Antonio Martinez <jantonio@...1345...>
- Date: Wed, 26 Feb 2014 11:18:37 +0100
- Message-id: <1393409917.17548.21.camel@...1346...>
- In-reply-to: <1393403510.17548.15.camel@...1346...>
- References: <CAECXXi68Q=5aXQ_NnubkMNsGxPPefCiz77pnYthNU-Jk88qQeg@...18...> <1393403510.17548.15.camel@...1346...>
I answer mySelf: exporting NBD image file in copy-on-write mode, and
starting several clients at the same time I can see that diff file is
only 4096 bytes long ( the size of backing device bcache superblock) and
seems not to increase size. So I can continue working with bcache :-)
Thanks for your time. Cheers
Juan Antonio
El mié, 26-02-2014 a las 09:31 +0100, Juan Antonio Martinez escribió:
> 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: