Virtual file system (VFS) or Virtual filesystem switch is an abstraction layer on top of a more concrete file system. The purpose of a VFS is to allow for client applications to access different types of concrete file systems in a uniform way. A VFS can for example be used to access local and network storage devices transparently without the client application noticing the difference. Or it can be used to bridge the differences in Windows, Mac OS and Unix filesystems, so that applications could access files on local file systems of those types without having to know what type of file system they’re accessing.
More info about VFS:
- You can learn more about Linux VFS here
- Vnodes: An Architecture for Multiple File System Types in Sun UNIX
- Book Understanding the Linux Kernel 2nd Ed
Under Linux you can create a Virtual File System as follows
Use dd command to create a VFS disk image (5 MB):
$ dd if=/dev/zero of=/tmp/vfs-disk count=10240
Format your disk image with mkfs.ext3 command:
$ mkfs.ext3 /tmp/vfs-disk
When prompted for confirmation type ‘y’ to format VFS disk image.
Mounting VFS with a loopback device:
# mkdir -p /mnt/vfs0
# mount -o loop=/dev/loop0 /tmp/vfs-disk /mnt/vfs0
It will act as a normal file system. You can take this image to other computer and mount it.