[systemd-devel] [PATCH] fstab-generator: local-fs.target waits for nofail mounts

Andrey Borzenkov arvidjaar at gmail.com
Mon Apr 7 11:07:20 PDT 2014


В Mon, 7 Apr 2014 13:40:17 -0400
Vivek Goyal <vgoyal at redhat.com> пишет:

> 
> Defining a new target which by default waits for all the local fs target
> sounds interesting. Again, I have the question, what will happen to 
> local-fs-all.target if some device does not show up and say one of the
> mounts specified in /etc/fstab fails.
> 
> What we want is.
> 
> - Wait for all devices to show up as specified in /etc/fstab. Run fsck
>   on devices. Mount devices to mount points specified.
> 
> - If everything is successful, things are fine and local-fs-all.target
>   will be reached.
> 
> - If some device does not show up, or if fsck fails or mount fails, still
>   local-fs-all.target should reach so that kdump module can detect that
>   failure happened and can take alternative action.
>  

You can use OnFailure= to define unit(s) started when
local-fs-all.target fails. But it sounds like you are not really
interested in *all* filesystems, but in specific fileststems defined in
kdump configuration.

>   For example,
> 
>   Asssume a user wants to save vmcore to nfs destination. Now for whatever 
>   reason, nfs target could not be mounted. In that case kdump will still
>   like to get control and alternatively save dump to local root fs.
> 

Without knowing details it sounds like RequiresMountsFor is more
appropriate (and can be set by generator based on actual kdump
configuration).

>   If systemd just hangs because nfs mounting failed and local-fs-all.target
>   was never reached, then we can't take backup action.
> 



More information about the systemd-devel mailing list