[systemd-devel] Unit configuration for FUSE file system
Kok, Auke-jan H
auke-jan.h.kok at intel.com
Wed May 2 09:19:12 PDT 2012
On Wed, May 2, 2012 at 1:25 AM, Stef Bon <stefbon at gmail.com> wrote:
> 2012/4/29 Nikolaus Rath <Nikolaus at rath.org>:
> > Hello,
> >
> > I am struggling to come up with the correct way to define a unit
> > configuration for a FUSE based network file system.
> >
> > Generally, the file system needs to be mounted and unmounted with its
> > own programs (rather than with mount and umount). The main reason for
> > the custom umount command, however, is that it uses some /proc based
> > hacks to block until the mount process has actually exited (this may
> > take quite some time even after the mountpoint has been freed, because
> > cached data is may still be transferred over the network).
> >
> > Things I am confused about:
> >
> > Is there a way to express this in a .mount unit, or do I need to declare
> > this as a more general .service?
>
> Hi,
>
> the way I see it is that FUSE filesystems are not just like any other
> mount, more a program which happens to be a filesystem.
>
> So I think it's the best choice to handle it like a "normal" program,
> and make use of a pidfile, which systemd can watch (or make use of a
> dbus service, but that's probably not the case).
>
>
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:
- 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"
- 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.
unmounting seems to work fine.
Cheers,
Auke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20120502/49ad45f0/attachment.html>
More information about the systemd-devel
mailing list