jessie: help debugging NFS shares not mounted at boot, double mounts with mount -a, and @reboot cronjobs
Felipe Sateler
fsateler at debian.org
Fri Mar 18 03:04:39 GMT 2016
On 17 March 2016 at 08:42, Sandro Tosi <morph at debian.org> wrote:
> On Thu, Mar 17, 2016 at 10:38 AM, Sandro Tosi <morph at debian.org> wrote:
>> Hey Felipe,
>> thanks for keep looking into this!
>>
>> On Wed, Mar 16, 2016 at 1:23 PM, Felipe Sateler <fsateler at debian.org> wrote:
>>> On 4 March 2016 at 18:13, Sandro Tosi <morph at debian.org> wrote:
>>>>> Could you attach one? Or mail me privately if you prefer, and I can
>>>>> take a look to see if there is anything else that may be fishy.
>>>>
>>>> we are extremely protective of what we do on our system, so i am not
>>>> able to provide a pristine boot log. I am attaching an anonymized
>>>> version of the first minutes of boot, hope that's good enough.
>>>
>>> I see this that looks possibly interesting:
>>>
>>> Feb 23 06:50:43 SERVER systemd[1]: Reached target Network is Online.
>>> Feb 23 06:50:43 SERVER systemd[1]: Mounting /mnt/NFSSERVER12_VOL...
>>> <snip>
>>> Feb 23 06:50:43 SERVER systemd[1]: Starting LSB: RPC portmapper replacement...
>>> <snip>
>>> Feb 23 06:50:43 SERVER systemd[1]: Starting LSB: NFS support files
>>> common to client and server...
>>> <snip>
>>>
>>> So it looks like systemd is starting the mounts in parallel to
>>> starting the nfs support infrastructure.
>>
>> uh nice catch!!
>>
>>> What happens if you add the following content:
>>>
>>> [Unit]
>>> Wants=remote-fs-pre.target
>>> Before=remote-fs-pre.target
>>>
>>> To snippets for nfs-common and rpcbind ? That would be
>>> /etc/systemd/system/{nfs-common,rpcbind}.service.d/00-remote-fs-ordering.conf
>>>
>>> Ensure systemd is picking up the files by issuing a systemctl
>>> daemon-reload, and then doing systemctl cat rpcbind nfs-common and
>>> making sure the output includes the snippets.
>>
>> so I created the dirs
>> /etc/systemd/system/{nfs-common,rpcbind}.service.d/ , added
>> 00-remote-fs-ordering.conf in each of them with the the config you
>> suggested, then systemctl daemon-reload then
>>
>> # systemctl cat rpcbind
>> ...
>> # /etc/systemd/system/rpcbind.service.d/00-remote-fs-ordering.conf
>> [Unit]
>> Wants=remote-fs-pre.target
>> Before=remote-fs-pre.target
>>
>> # systemctl cat nfs-common.service
>> ...
>> # /etc/systemd/system/nfs-common.service.d/00-remote-fs-ordering.conf
>> [Unit]
>> Wants=remote-fs-pre.target
>> Before=remote-fs-pre.target
>>
>> and I've now set the test machine in a reboot loop until it detects an
>> error, I'll let you know what happens
>
> sadly it didnt take long to fail :( (that change still makes sense, so
> I'm going to apply it to our systems anyway)
:(
>
> attached is the boot log (anonymized)
All I can think of is to try to add a low timeo= option (200?), and
lower retry value (1). The first should cause mount to retry faster if
the mount fails, and the second should cause it to exit with error
(hopefully this causes systemd to notice the mount failed).
--
Saludos,
Felipe Sateler
More information about the Pkg-systemd-maintainers
mailing list