[systemd-devel] systemd automounts

Steve Dickson SteveD at redhat.com
Tue Aug 2 05:00:33 PDT 2011



On 08/02/2011 04:35 AM, Mirco Tischler wrote:
> 2011/8/2 Steve Dickson <SteveD at redhat.com>:
>>
>>
>> On 08/01/2011 09:10 PM, Mirco Tischler wrote:
>>> Hi
>>> 2011/8/2 Steve Dickson <SteveD at redhat.com>:
>>>>>
>>>>> Yes, this looks like a good usecase.
>>>>>
>>>>> Hmm, does the automount point work after boot?
>>>> It seems so, because if I restart nfs-idmap.service the
>>>> service comes up.
>>>>
>>>>>
>>>>> How does the output of "systemctl list-units" look like for the
>>>>> automount and mount unit?
>>>>>
>>>> attached.
>>>>
>>>> steved.
>>>>
>>> The attached output indicates that your automount unit isn't started,
>>> and I can't see anything causing it to start in your unit files
>>> either. You can verify this with systemctl status
>>> var-lib-nfs-rpc_pipefs.automount.
>> It appears you are correct. systemctl status var-lib-nfs-rpc_pipefs.automount
>> show the status not being started.
>>
>>> Note that After= is only an ordering information and doesn't cause the
>>> unit to be started. Only if the automount is started anyway through
>>> some other path, the After= line causes the service to wait until the
>>> automount point is started.You may need to add a line
>>> Wants=var-lib-nfs-rpc_pipefs.automount to your service file.
>>>
>>> Does that help you?
>> Adding that wants does start var-lib-nfs-rpc_pipefs.automount but
>> now I'm getting two mounts...
>>
>> # mount | grep rpc
>> systemd-1 on /var/lib/nfs/rpc_pipefs type autofs (rw,relatime,fd=16,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
>> sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
>>
>> or is that normal for automounts?
>>
>> steved.
>>
> Yup that's normal. the systemd-1 is the automount point.
Thanks for this tip... but things are still no quite right... 

the "Starting RPC Pipe File System" (i.e. the mount of  /var/lib/nfs/rpc_pipefs) 
was happening later than the "Starting Name to UID/GID mapping for NFSv4" 
(i.e. the nfs-idmap.service) so I added back the After=var-lib-nfs-rpc_pipefs.automount
line nfs-idmap.service which didn't seem to work... Looking at the booting messages, 
the nfs-idmap.service is still being started before the automount.

How I do I guarantee the automount happens and finish before nfs-idmap.service
is started?

Also now when I reboot the system hangs for a bit due to the following
problem:

[  272.510946] systemd[1]: var-lib-nfs-rpc_pipefs.mount mounting timed out. Killing. 
[  362.511271] systemd[1]: var-lib-nfs-rpc_pipefs.mount mount process still around after SIGKILL. Ignoring.                                                     
[  362.609307] systemd[1]: Unit var-lib-nfs-rpc_pipefs.mount entered failed state.

So it appears the ordering of the shutdown is not quite right either...                                                                              

steved.


More information about the systemd-devel mailing list