Linux block device simulation and fuse

My project involves modeling a block device with a remote host.

For testing, I use FUSE, my file system is a simple change to the hello sample application, instead of which I just read the data directly from the file instead of the constant line.

When I try to install the file normally (mount -o loop = / dev / loop1), it works well. When I load a fuse and expose this file through it, all normal file operations work. But the installation fails with a "Permission denied" error.

Does anyone have an idea where the "access denied" came from?

Any other methods will allow me to create a virtual device (only support for access to the block) in the user space that will be mounted?

Thanks in advance

+6
linux embedded fuse
source share
3 answers

Presumably the problem is that the FUSE file system does not support the functions necessary to install loops on it.

Did you consider using a network block device such as NBD or an iSCSI target instead?

+4
source share

Run with Root privileges. You can trace the program with "strace" and then check where exactly this happens.

+2
source share

The mount command is real hell when it starts typing errors. Try "-v", but more often than not an additional output will help :(

+1
source share

All Articles