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

Re: [Nbd] wishlist: read-only bcache for nbd / LTSP devices



On Thu, Aug 28, 2014 at 03:09:53PM +0200, Juan Antonio Martinez wrote:
> Hi all,
> 
> Short question: how to use bcache with read-only devices such as
> CD's or read-only NBD devices?
> 
> Long text :-)
> I'm trying to setup 200+ LTSP Fat clients based on NBD remote block
> devices.
> LTSP mounts NBD devices in read-only mode and then their internal
> squashfs is remounted via copy-on-write and exposed to the client
> 
> I'd like to create a local disk cache for /dev/nbdX by mean of BCache,
> but have a little problem: due to BCache superblock issues, I need to
> export NBD files in read/write (or copy-on-write mode) in order to get
> caching/cached devices superblock info synced.
> 
> I cannot make assumption on client's local disk status, so its easy to
> lost sync with bcache info on server.
> So need:
> 
> - An easy way to erase cache info and start in a "clean,uncached" state
> in server and client on client boot
> 
> - A Read-Only BCache (or similar) that don't need to store any
> information on server side, just a list of blocks already in disk/memory
> in client
> 
> - (For NBD guys) an extension to nbd-server to allow specify where to
> store copy/on/write diff files, and let postrun/prerun scripts use not
> only %s (file to be served) but %h (client ip being served), to erase
> diff files on connection
> 
> Additionally Seems that there is no "blocks" package available for
> Ubuntu-14.04, as the one provided in ppa:g2p/storage has failed
> dependencies for python-3.4. I need command "blocks to-bcache" to
> provide proper squasfs-to-bcache files conversion (Any link on how to
> create BCache superblock and add it to an already created fs)
> 
> Thanks in advance
> Juan Antonio

Can't you use the device mapper caching support? You probably want to
destroy all cache on reboot, which means you can just set this up
fresh on every boot without persistent metadata.

MfG
	Goswin



Reply to: