How to register FUSE filesystem type with mount(8) and fstab?

后端 未结 5 1059
醉酒成梦
醉酒成梦 2021-01-31 03:08

I\'ve written a small FUSE-based filesystem and now the only part\'s missing is that I want to register it with fstab(5) to auto-mount it on system startup and/or manually mount

5条回答
  •  孤街浪徒
    2021-01-31 03:49

    In general, one "registers" a new mount filesystem type by creating an executable mount.fstype.

    $ ln -s /usr/bin/vdbfs.py /usr/sbin/mount.vdbfs
    

    If vdbfs.py takes mount-ish arguments (i.e. dev path [-o opts]), then mount -t vdbfs and using vdbfs as the 3rd field in fstab will work. If it doesn't, you can create a wrapper which does take arguments of that form and maps them to whatever your vdbfs.py takes.

    FUSE should also install a mount.fuse executable; mount.fuse 'vdbfs.py#dev' path -o opts will go on and call vdbfs.py dev path -o opts. In that case, you can use fuse as your filesystem type and prefix your device with vdbfs.py#.

提交回复
热议问题