mkdumprd removes "noauto" mount option, but it also mistakenly removes "noauto" within a string. For example ext4 has mount option noauto_da_alloc mkdumprd will replace it with _da_alloc.
Use '\b' to match a whole word of "noauto" to fix it.
Signed-off-by: Dave Young dyoung@redhat.com --- mkdumprd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
--- kexec-tools.orig/mkdumprd +++ kexec-tools/mkdumprd @@ -101,7 +101,7 @@ to_mount() { [ -z "$_options" ] && _options=$(findmnt -k -f -n -r -o OPTIONS $_dev) # with 'noauto' in fstab nfs and non-root disk mount will fail in 2nd # kernel, filter it out here. - _options=$(echo $_options | sed 's/noauto//') + _options=$(echo $_options | sed 's/\bnoauto\b//') _options=${_options/#ro/rw} #mount fs target as rw in 2nd kernel
_mntopts="$_target $_fstype $_options"
On 08/30/2017 at 03:54 PM, Dave Young wrote:
mkdumprd removes "noauto" mount option, but it also mistakenly removes "noauto" within a string. For example ext4 has mount option noauto_da_alloc mkdumprd will replace it with _da_alloc.
Use '\b' to match a whole word of "noauto" to fix it.
Signed-off-by: Dave Young dyoung@redhat.com
Reviewed-by: Xunlei Pang xlpang@redhat.com
mkdumprd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
--- kexec-tools.orig/mkdumprd +++ kexec-tools/mkdumprd @@ -101,7 +101,7 @@ to_mount() { [ -z "$_options" ] && _options=$(findmnt -k -f -n -r -o OPTIONS $_dev) # with 'noauto' in fstab nfs and non-root disk mount will fail in 2nd # kernel, filter it out here.
- _options=$(echo $_options | sed 's/noauto//')
_options=$(echo $_options | sed 's/\bnoauto\b//') _options=${_options/#ro/rw} #mount fs target as rw in 2nd kernel
_mntopts="$_target $_fstype $_options"
kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org
On Wed, Aug 30, 2017 at 03:54:40PM +0800, Dave Young wrote:
mkdumprd removes "noauto" mount option, but it also mistakenly removes "noauto" within a string. For example ext4 has mount option noauto_da_alloc mkdumprd will replace it with _da_alloc.
Use '\b' to match a whole word of "noauto" to fix it.
Signed-off-by: Dave Young dyoung@redhat.com
mkdumprd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
--- kexec-tools.orig/mkdumprd +++ kexec-tools/mkdumprd @@ -101,7 +101,7 @@ to_mount() { [ -z "$_options" ] && _options=$(findmnt -k -f -n -r -o OPTIONS $_dev) # with 'noauto' in fstab nfs and non-root disk mount will fail in 2nd # kernel, filter it out here.
- _options=$(echo $_options | sed 's/noauto//')
- _options=$(echo $_options | sed 's/\bnoauto\b//')
could "noauto" be at the beginning or ending of the line and there wouldn't be the extra leading/trailing space?
_options=${_options/#ro/rw} #mount fs target as rw in 2nd kernel _mntopts="$_target $_fstype $_options"
kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org
On 08/31/17 at 10:45am, Jerry Hoemann wrote:
On Wed, Aug 30, 2017 at 03:54:40PM +0800, Dave Young wrote:
mkdumprd removes "noauto" mount option, but it also mistakenly removes "noauto" within a string. For example ext4 has mount option noauto_da_alloc mkdumprd will replace it with _da_alloc.
Use '\b' to match a whole word of "noauto" to fix it.
Signed-off-by: Dave Young dyoung@redhat.com
mkdumprd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
--- kexec-tools.orig/mkdumprd +++ kexec-tools/mkdumprd @@ -101,7 +101,7 @@ to_mount() { [ -z "$_options" ] && _options=$(findmnt -k -f -n -r -o OPTIONS $_dev) # with 'noauto' in fstab nfs and non-root disk mount will fail in 2nd # kernel, filter it out here.
- _options=$(echo $_options | sed 's/noauto//')
- _options=$(echo $_options | sed 's/\bnoauto\b//')
could "noauto" be at the beginning or ending of the line and there wouldn't be the extra leading/trailing space?
It should work for your case, maybe I do not understand the question, can you give an example?
_options=${_options/#ro/rw} #mount fs target as rw in 2nd kernel _mntopts="$_target $_fstype $_options"
kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org
--
Jerry Hoemann Software Engineer Hewlett Packard Enterprise
Thanks Dave
On Fri, Sep 01, 2017 at 08:41:03AM +0800, Dave Young wrote:
On 08/31/17 at 10:45am, Jerry Hoemann wrote:
On Wed, Aug 30, 2017 at 03:54:40PM +0800, Dave Young wrote:
mkdumprd removes "noauto" mount option, but it also mistakenly removes "noauto" within a string. For example ext4 has mount option noauto_da_alloc mkdumprd will replace it with _da_alloc.
Use '\b' to match a whole word of "noauto" to fix it.
Signed-off-by: Dave Young dyoung@redhat.com
mkdumprd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
--- kexec-tools.orig/mkdumprd +++ kexec-tools/mkdumprd @@ -101,7 +101,7 @@ to_mount() { [ -z "$_options" ] && _options=$(findmnt -k -f -n -r -o OPTIONS $_dev) # with 'noauto' in fstab nfs and non-root disk mount will fail in 2nd # kernel, filter it out here.
- _options=$(echo $_options | sed 's/noauto//')
- _options=$(echo $_options | sed 's/\bnoauto\b//')
could "noauto" be at the beginning or ending of the line and there wouldn't be the extra leading/trailing space?
It should work for your case, maybe I do not understand the question, can you give an example?
Sorry, I misremembered what \b stood for. Thought pattern was explicitly looking for a blank.
_options=${_options/#ro/rw} #mount fs target as rw in 2nd kernel _mntopts="$_target $_fstype $_options"
kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org
--
Jerry Hoemann Software Engineer Hewlett Packard Enterprise
Thanks Dave