/blockv

FUSE created to provide access to network and memory based block devices.

Primary LanguageC++GNU General Public License v2.0GPL-2.0

FUSE created to provide access to network (TBD) and memory based block devices.

Further information about network-based block device:
https://en.wikipedia.org/wiki/Network_block_device

Getting started
-----

1) Compile project with:
   g++ --std=c++14 `pkg-config fuse --cflags --libs` blockv_fuse.cc -o blockv_fuse;

   NOTE: Depends on FUSE.

2) Run project as follow:
   mkdir ./mount_point;
   ./blockv_fuse -d ./mount_point -o allow_root;

   NOTE: allow_root option requires adding 'user_allow_other' to /etc/fuse.conf

3) Create a memory-based block device of 30MB:
   truncate -s 30M ./mount_point/virtual_block_device;

3) Format the memory-based block device with ext2 file system:
   mkfs.ext2 ./mount_point/virtual_block_device;

   NOTE: ext2 filesystem was chosen arbitrarily. Any other file system supported by Linux should work as fine.

4) Mount the ext2 filesystem with:
   mkdir ./mount_point2;
   sudo mount -t ext2 -o loop ./mount_point/virtual_block_device ./mount_point2;

   NOTE: ./mount_point2 is now home for a ext2 filesystem backed by memory RAM.