Programming a loopback-device consisting of several files in Linux

Posted by dubbaluga on Stack Overflow See other posts from Stack Overflow or by dubbaluga
Published on 2010-12-23T14:46:32Z Indexed on 2010/12/23 18:54 UTC
Read the original article Hit count: 300

Filed under:
|
|
|

Hej,

it is relatively easy to use a file for emulating a block-device using losetup in Linux:

Can anyone please give me a hint on what to look for in case I want to program my own block-device which is based on several files I'm taking content from? For your understanding, I would like to let's say take bytes 1-500 and 1.000-3.000 from file1 and bytes 501-999 and bytes 3.001 to 5.000 from file2 to offer them as a combined block-device. My prefered programming language is Python and I want to write my program in user-space as much as possible.

For Windows I found such an implementation. It's called FileDisk and HttpDisk and it can be found here:

Thanks in advance and regards, Rainer

© Stack Overflow or respective owner

Related posts about linux

Related posts about files