Virtual filesytem over multiples files

221 views Asked by At

is it possible to create and mount a virtual filesystem what is made over normal files and not over disk/partition?

Firstly I though in LVM, and instead of use disks or partitions, use files. But it isn't possible, or I don't know how to dot it.

I'm think in something like use Truecrypt over Dropbox with a large Truecrypt container (1Gb for example). Because synchronize 1Gb in Dropbox is very slow, I thint that if the virtual filesystem is made over small files (with size of 100Kb for example), it would be equivalent as blocks (with size of 100Kb) of a conventional filesystem. All modifications in the virtual filesystem will correspond to some physical files which will be synchronized over Dropbox.

This synchronization is light compared to the size of the virtual filesystem, and would enable the Truecryp container.

I would be it possible to Linux operating system, but it would be good idea to be possible to Windows/Mac/etc OS.

What do you think about it?

Any other alternative?

3

There are 3 answers

1
Fernando On

Not sure what exactly you want but I think "synchronize securely an encrypted containter" is ok? I suggest you to synchronize securely the content of your containter becouse to sync all the containter will take always too much time. To do that you can sync the containter while you are working in the files that is unencrypted(truecrypt). Take a look at http://sparkleshare.org/ It syncronize your files through ssh that is a secure connection and you can store remotely in an encrypted manner. Hope it helps, regards.

0
lodopidolo On

I've discovered one solution, perhaps it isn't the best. It is based on lvm on files.

Example of creation:

# dd if=/dev/zero of=test00.lvm count=10k bs=1024
# dd if=/dev/zero of=test01.lvm count=10k bs=1024
# losetup /dev/loop0 test00.lvm
# losetup /dev/loop1 test01.lvm
# pvcreate /dev/loop0
# pvcreate /dev/loop1
# vgcreate testvg /dev/loop0
# vgextend testvg /dev/loop1
# lvcreate -l 100%FREE -n testlv testvg
# mkfs.ext3 /dev/mapper/testvg-testlv
# mount /dev/mapper/testvg-testlv /mnt

Example of use (after dismount):

# losetup /dev/loop0 test00.lvm
# losetup /dev/loop1 test01.lvm
# pvscan; vgscan; lvscan
# mount /dev/mapper/testvg-testlv /mnt
0
lodopidolo On

This is my best solution. What I wanted was to dispose of a encrypted container efficient and compatible with some File Hosting services like Dropbox, Barracuda Copy, etc.

The problem of using TrueCrypt is that the container is fixed and when it is synchronized over internet it is not efficient (when it is big).

My solution is use EncFS. It is ported to Linux, Windows, OSX, Android and iOS. I've been making test in Linux and Windows using Barracuda Copy and it runs very well, because it run encrypting file per file and syncing each one.

Another solution is ECryptfs but I prefer EncFS because is easier to use and is ported to more platform.