On Tue, Apr 08, 2014 at 06:35:03PM +0800, WANG Chao wrote: > On 04/08/14 at 02:14am, Zbigniew Jędrzejewski-Szmek wrote: > > On Mon, Apr 07, 2014 at 03:10:14PM -0400, Vivek Goyal wrote: > > > On Mon, Apr 07, 2014 at 10:07:20PM +0400, Andrey Borzenkov wrote: > > > > В Mon, 7 Apr 2014 13:40:17 -0400 > > > > Vivek Goyal <vgo...@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. > > It result is different for Requires= and for Wants=. Iff there's a chain > > of Requires= from the failing unit (.device in this case) to the target unit > > it will fail. Otherwise, it'll just be delayed. If, as I suggested above > > local-fs-all.target > > would have Requires= on the .mount units, then your unit could still have > > Wants=/After=local-fs-all.target, and it'll be started even if some mounts > > fail. > > > > > > > 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. > > Alternatively, you can specify a soft depenendency on local-fs-all.target by > > using Wants=local-fs-all.target. I think this is preferable, because we want > > local-fs-all.target to be as similar as possible to local-fs.target, which > > has Requires= on the mount points. > > Actually, With current implementation, whether "Wants" or "Requires" > depends on if "nofail" is specified. It is specified for local-fs.target, which doesn't necessarilly influence local-fs-all.target, and anyway, here we're talking about the relationship between local-fs-all.target and some dracut units.
Zbyszek _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel