mkdumprd: remove useless "x-initrd.mount"
After the following systemd commit, "x-initrd.mount" option became useless actually, we can safely remove it now. commit ce3f6d82b003f365f718f24e48f55b8a0372b924 Author: nmartensen <nis.martensen@web.de> Date: Fri Jan 15 07:55:25 2016 +0100 fstab-generator: remove bogus condition The sysroot mount is already taken care of by the add_sysroot_mount function. With this condition left in, we can we can get something like this: initrd-root-fs.target.requires `-- usr.mount -> /run/systemd/generator/usr.mount in the main system (i.e., not in the initramfs). In the initramfs, the previous condition already kicks in. [snip] "mount_in_initrd(me)" is true with "x-initrd.mount" option, the behaviour of systemd fstab generator changed after the above-mentioned patch, it always generates local mount units required by local-fs.target regardless of "x-initrd.mount". After failure, it enters dracut emergency, further triggers kdump emergency service, thus there is no problem. Signed-off-by: Xunlei Pang <xlpang@redhat.com> Acked-by: Dave Young <dyoung@redhat.com>
This commit is contained in:
parent
9df0cbbeed
commit
8fd9f017b2
15
mkdumprd
15
mkdumprd
@ -103,20 +103,7 @@ to_mount() {
|
||||
# kernel, filter it out here.
|
||||
_options=$(echo $_options | sed 's/noauto//')
|
||||
_options=${_options/#ro/rw} #mount fs target as rw in 2nd kernel
|
||||
# "x-initrd.mount" mount failure will trigger isolate emergency service
|
||||
# W/o this, systemd won't isolate, thus we won't get to emergency.
|
||||
# This is not applicable to remote fs mount, because if we use
|
||||
# "x-initrd.mount", remote mount will become required by
|
||||
# "initrd-root-fs.target", instead of "remote-fs.target". That's how it is
|
||||
# handled within systemd internal. We need remote mount to be required
|
||||
# "remote-fs.target", because we need to bring up network before any remote
|
||||
# mount and "remote-fs.target" can be a checkpoint of that.
|
||||
# If remote mount fails, dracut-initqueue will still start and once
|
||||
# dracut-initqueue finishes, kdump service will start. Because remote mount
|
||||
# failed, kdump service will fail and it will lead to kdump error handler.
|
||||
if ! is_nfs_dump_target; then
|
||||
_options="$_options,x-initrd.mount"
|
||||
fi
|
||||
|
||||
_mntopts="$_target $_fstype $_options"
|
||||
#for non-nfs _dev converting to use udev persistent name
|
||||
if [ -b "$_source" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user