Sending reads/writes to a userspace program?
Does dm provide any way for a custom target type to redirect a read or write to a userspace program? Or even for it to notify the program of the read/write and wait until it gives the goahead, somewhat like the way page faulting works? I'm wondering if it's possible to create a target type that implements a 'remote' block device with blocks stored on something like Amazon S3, keeping only a local cache of mapped blocks, and fetching / writing blocks as needed.
-Nick Johnson
NJ> Does dm provide any way for a custom target type to redirect a read or NJ> write to a userspace program? Or even for it to notify the program of NJ> the read/write and wait until it gives the goahead, somewhat like the NJ> way page faulting works?
I have been working on a userspace target, which allows you to do just what you describe. I have an hg tree up with some userspace tools, as well as an out-of-body version of the kernel module:
http://static.danplanet.com/hg/dm-userspace.ring/
I also have an actual kernel tree with dm-userspace support, from which I could generate a patch if the above does not work well for you.
NJ> I'm wondering if it's possible to create a target type that NJ> implements a 'remote' block device with blocks stored on something NJ> like Amazon S3, keeping only a local cache of mapped blocks, and NJ> fetching / writing blocks as needed.
Yep, I have done similar things with dm-userspace.
Signature · 4 lines
Dan Smith IBM Linux Technology Center Open Hypervisor Team email: [email protected]
Quoted 15 lines · Dan Smith
NJ> Does dm provide any way for a custom target type to redirect a read or NJ> write to a userspace program? Or even for it to notify the program of NJ> the read/write and wait until it gives the goahead, somewhat like the NJ> way page faulting works?
I have been working on a userspace target, which allows you to do just what you describe. I have an hg tree up with some userspace tools, as well as an out-of-body version of the kernel module:
http://static.danplanet.com/hg/dm-userspace.ring/
I also have an actual kernel tree with dm-userspace support, from which I could generate a patch if the above does not work well for you.
Quoted 6 lines
NJ> I'm wondering if it's possible to create a target type that NJ> implements a 'remote' block device with blocks stored on something NJ> like Amazon S3, keeping only a local cache of mapped blocks, and NJ> fetching / writing blocks as needed.
Yep, I have done similar things with dm-userspace.
The dm-userspace target is very interesting to me because it would allow me to use block devices that were based on arbitrary and experimental aggregations of local and remote storage coordinated by a simple userland program.
I see in the archives that there were some attempts to get dm-userspace into the mainline kernel by way of the development device mapper code, but I don't think there have been recent attempts to get dm-userspace merged.
Is there a problem with dm-userspace that is keeping it out of the mainline? If not, can it be resubmitted?
Signature · 1 line
Ed Cashin <[email protected]>