Re: [systemd-devel] handling mount failure in initramfs context

2014-05-29 Thread Przemyslaw Rudy
Yes, explicit requires/after, all in dependency.

On 05/28/2014 10:05 AM, WANG Chao wrote:
 On 05/28/14 at 09:57am, Przemyslaw Rudy wrote:
 I use 'auto,fail' in fstab line options, however I have rootfs
 dependency to it so fail means all will fail.
 
 How do you do that? Are you saying that you create a explicit
 dependency on sysroot.mount to your xxx.mount from /etc/fstab?
 
 Thanks
 WANG Chao
 

 On 05/26/2014 09:12 AM, WANG Chao wrote:
 Hi, all

 In a pure initramfs enviroment, I want to mount a filesystem and I put
 an mount entry in /etc/fstab, so that fstab-generator could generate a
 mount unit and systemd will mount it at some time.

 I have a question about mount failure in such case:

 How can I make sure that upon a mount failure, systemd would stop
 booting and switch to emergency handling?

 Thanks in advance!

 WANG Chao
 ___
 systemd-devel mailing list
 systemd-devel@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/systemd-devel

 
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] handling mount failure in initramfs context

2014-05-28 Thread Przemyslaw Rudy
I use 'auto,fail' in fstab line options, however I have rootfs
dependency to it so fail means all will fail.

On 05/26/2014 09:12 AM, WANG Chao wrote:
 Hi, all
 
 In a pure initramfs enviroment, I want to mount a filesystem and I put
 an mount entry in /etc/fstab, so that fstab-generator could generate a
 mount unit and systemd will mount it at some time.
 
 I have a question about mount failure in such case:
 
 How can I make sure that upon a mount failure, systemd would stop
 booting and switch to emergency handling?
 
 Thanks in advance!
 
 WANG Chao
 ___
 systemd-devel mailing list
 systemd-devel@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/systemd-devel
 
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] handling mount failure in initramfs context

2014-05-28 Thread WANG Chao
On 05/28/14 at 09:57am, Przemyslaw Rudy wrote:
 I use 'auto,fail' in fstab line options, however I have rootfs
 dependency to it so fail means all will fail.

How do you do that? Are you saying that you create a explicit
dependency on sysroot.mount to your xxx.mount from /etc/fstab?

Thanks
WANG Chao

 
 On 05/26/2014 09:12 AM, WANG Chao wrote:
  Hi, all
  
  In a pure initramfs enviroment, I want to mount a filesystem and I put
  an mount entry in /etc/fstab, so that fstab-generator could generate a
  mount unit and systemd will mount it at some time.
  
  I have a question about mount failure in such case:
  
  How can I make sure that upon a mount failure, systemd would stop
  booting and switch to emergency handling?
  
  Thanks in advance!
  
  WANG Chao
  ___
  systemd-devel mailing list
  systemd-devel@lists.freedesktop.org
  http://lists.freedesktop.org/mailman/listinfo/systemd-devel
  
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] handling mount failure in initramfs context

2014-05-27 Thread Vivek Goyal
On Mon, May 26, 2014 at 04:12:56PM +0800, WANG Chao wrote:
 Hi, all
 
 In a pure initramfs enviroment, I want to mount a filesystem and I put
 an mount entry in /etc/fstab, so that fstab-generator could generate a
 mount unit and systemd will mount it at some time.
 
 I have a question about mount failure in such case:
 
 How can I make sure that upon a mount failure, systemd would stop
 booting and switch to emergency handling?

I will give little more context to the problem at hand.

So kdump uses --mount option of dracut to mount file systems in initramfs
context. dracut puts right values in /etc/fstab of initramfs which in
turn are parsed by systemd and mount units are generated.

Now question is what will happen if one of the mount failed? I think
currently systemd does not drop us to emergency shell and instead
continues to boot.

We are trying to figure out how to change this behavior where we can
tell systemd to drop into an emergency shell instead.

I think Chao used x-initrd.mount option as mount option and that changes
the behavior. With this option the mount unit becomes required by
initrd-root-fs.target rather than it used to be local-fs.target. And
the way these targets are configured, we drop into emergency shell with
other untis isolated.

Point being that usage of x-initrd.mount to achieve the desired behavior
sounded hackish to me. Nowhere systemd guarantees that usage of this 
option will ensure certain dependencies. I think this option just means
that file system will be mounted in initramfs.

So is there a better way to achieve what we are looking for.

Thanks
Vivek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel