[dm-devel] [RFC] File backed target for device-mapper

Alasdair G Kergon agk at uk.sistina.com
Tue Jul 22 16:59:01 UTC 2003


On Tue, Jul 22, 2003 at 11:17:39PM +0200, Christophe Saout wrote:
> I just wrote a dm target uses a file as backend instead of another block
> device.

Another suggestion:

  A target that always returns a block of zeros [or more generally,
  some other repeating pattern e.g. if the read goes beyond the end
  of your file - required to be multiple of sector size - it loops 
  round to the beginning; writes get dropped]

So you can easily create, for example a /dev/zero-like block device of
arbitrary size, which might be useful for replacing a lost disk that
contained a stripe if you want to read off the data from the other
stripes at correct offsets.

Alasdair
-- 
agk at uk.sistina.com




More information about the dm-devel mailing list