FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 07-29-2011, 03:16 PM
Steve Dickson
 
Default systemd automounts

I'm trying to automount /var/lib/nfs/rpc_pipefs
for the nfs-idmap.service

var-lib-nfs-rpc_pipefs.mount is:
[Unit]
Description=RPC Pipe File System
DefaultDependencies=no

[Mount]
What=sunrpc
Where=/var/lib/nfs/rpc_pipefs
Type=rpc_pipefs

var-lib-nfs-rpc_pipefs.automount is:
[Unit]
Description=RPC Pipe File System
DefaultDependencies=no

[Automount]
Where=/var/lib/nfs/rpc_pipefs

and the nfs-idmap.service is:
[Unit]
Description=Name to UID/GID mapping for NFSv4.
After=syslog.target network.target var-lib-nfs-rpc_pipefs.automount
ConditionPathIsDirectory=/sys/module/sunrpc

[Service]
Type=forking
EnvironmentFile=-/etc/sysconfig/nfs
ExecStart=/usr/sbin/rpc.idmapd $RPCIDMAPDARGS

[Install]
WantedBy=multi-user.target


Now I know for a fact that /var/lib/nfs/rpc_pipefs
is being mount *after* the nfs-idmap.service
is run, because:

rpc.idmapd is failing because
rpc.idmapd[819]: main: open(/var/lib/nfs/rpc_pipefs//nfs): No such file or
directory

and the startup message clearly show the service is being
run before the mount:

Starting Name to UID/GID mapping for NFSv4....
Starting OpenSSH server daemon....
Started OpenSSH server daemon..
Starting RPC bind service...
Starting Sendmail Mail Transport Agent...
Started LSB: Mount and unmount network filesystems..
[ 25.803165] RPC: Registered named UNIX socket transport module.
[ 25.804236] RPC: Registered udp transport module.
[ 25.805327] RPC: Registered tcp transport module.
[ 25.806283] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 25.889822] SELinux: initialized (dev rpc_pipefs, type rpc_pipefs), uses genfs_contexts

So any idea what on what I'm doing wrong? Is this how autmounts are
suppose be used?

tia...

steved.
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 08-01-2011, 09:43 PM
Lennart Poettering
 
Default systemd automounts

On Fri, 29.07.11 11:16, Steve Dickson (SteveD@redhat.com) wrote:

> I'm trying to automount /var/lib/nfs/rpc_pipefs
> for the nfs-idmap.service
>
> var-lib-nfs-rpc_pipefs.mount is:
> [Unit]
> Description=RPC Pipe File System
> DefaultDependencies=no
>
> [Mount]
> What=sunrpc
> Where=/var/lib/nfs/rpc_pipefs
> Type=rpc_pipefs

Looks good.

>
> var-lib-nfs-rpc_pipefs.automount is:
> [Unit]
> Description=RPC Pipe File System
> DefaultDependencies=no
>
> [Automount]
> Where=/var/lib/nfs/rpc_pipefs

Looks good, too. But I'd recommend adding After=local-fs.target here, to
ensure your automount unit is established after /var is, if that's on a
separate partition.

> and the nfs-idmap.service is:
> [Unit]
> Description=Name to UID/GID mapping for NFSv4.
> After=syslog.target network.target var-lib-nfs-rpc_pipefs.automount
> ConditionPathIsDirectory=/sys/module/sunrpc

Is this really dependent on the network? If not I'd recommend to
ordering this after network.target.

Also, in F16 we will no longer support non-socket-activated syslogs (all
existing implementations have support for socket actviation upstream),
so the After=syslog.target is not necessary anymore.

> [Service]
> Type=forking
> EnvironmentFile=-/etc/sysconfig/nfs
> ExecStart=/usr/sbin/rpc.idmapd $RPCIDMAPDARGS
>
> [Install]
> WantedBy=multi-user.target
>
> Now I know for a fact that /var/lib/nfs/rpc_pipefs
> is being mount *after* the nfs-idmap.service
> is run, because:

being mounted?

You mean the automount point being established, not the backing mount, right?

> rpc.idmapd is failing because
> rpc.idmapd[819]: main: open(/var/lib/nfs/rpc_pipefs//nfs): No such file or
> directory
>
> and the startup message clearly show the service is being
> run before the mount:
>
> Starting Name to UID/GID mapping for NFSv4....
> Starting OpenSSH server daemon....
> Started OpenSSH server daemon..
> Starting RPC bind service...
> Starting Sendmail Mail Transport Agent...
> Started LSB: Mount and unmount network filesystems..
> [ 25.803165] RPC: Registered named UNIX socket transport module.
> [ 25.804236] RPC: Registered udp transport module.
> [ 25.805327] RPC: Registered tcp transport module.
> [ 25.806283] RPC: Registered tcp NFSv4.1 backchannel transport module.
> [ 25.889822] SELinux: initialized (dev rpc_pipefs, type rpc_pipefs), uses genfs_contexts
>
> So any idea what on what I'm doing wrong? Is this how autmounts are
> suppose be used?

Yes, this looks like a good usecase.

Hmm, does the automount point work after boot?

How does the output of "systemctl list-units" look like for the
automount and mount unit?

Lennart

--
Lennart Poettering - Red Hat, Inc.
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 

Thread Tools




All times are GMT. The time now is 07:11 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org