<br><div class="gmail_quote">On Wed, May 2, 2012 at 1:25 AM, Stef Bon <span dir="ltr"><<a href="mailto:stefbon@gmail.com" target="_blank">stefbon@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2012/4/29 Nikolaus Rath <<a href="mailto:Nikolaus@rath.org">Nikolaus@rath.org</a>>:<br>
> Hello,<br>
><br>
> I am struggling to come up with the correct way to define a unit<br>
> configuration for a FUSE based network file system.<br>
><br>
> Generally, the file system needs to be mounted and unmounted with its<br>
> own programs (rather than with mount and umount). The main reason for<br>
> the custom umount command, however, is that it uses some /proc based<br>
> hacks to block until the mount process has actually exited (this may<br>
> take quite some time even after the mountpoint has been freed, because<br>
> cached data is may still be transferred over the network).<br>
><br>
> Things I am confused about:<br>
><br>
> Is there a way to express this in a .mount unit, or do I need to declare<br>
> this as a more general .service?<br>
<br>
Hi,<br>
<br>
the way I see it is that FUSE filesystems are not just like any other<br>
mount, more a program which happens to be a filesystem.<br>
<br>
So I think it's the best choice to handle it like a "normal" program,<br>
and make use of a pidfile, which systemd can watch (or make use of a<br>
dbus service, but that's probably not the case).<br><br></blockquote><div><br></div><div>I'm going to leave it in the middle as to what the best method is, but, with little trouble I made a fuse mount unit myself, and it seems to work correctly. It needs 2 parts:</div>
<div><br></div><div>- the mount unit. This looks exactly like every other mount unit, except, the filetype is now something special. In my case, I have "Type=fuse.libsqlfs"</div><div><br></div><div>- a /sbin/mount.fuse.libsqlfs wrapper script or executable. mount itself doesn't know any filesystems, but it calls helpers for the unknown ones. The helper for libsqlfs merely exec's libsqlfs_mount (the daemon providing the fuse fs) with the right parameters, and in my case, I threw a modprobe fuse in there as well.</div>
<div><br></div><div>unmounting seems to work fine.</div><div><br></div><div>Cheers,</div><div><br></div><div><br></div><div>Auke</div></div><br>