Skip to contentSkip to conversation

Change the fs_passno of nfs to 0

PATCH Superseded Chao Fan 3 participants 4 messages May 19, 2015 – May 20, 2015 2 messages not in the archive

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Chao Fan

author
#0 lore raw

PATCH 1/1 Change the fs_passno of nfs to 0

Set fs_passno, the sixth variable of fstab to "0" when the device is nfs.

The link of Bug 1186699: bugzilla.redhat.com/show_bug.cgi?id=1186699 The bug is that kdump-initrd contains entry requesting nfs dump filesystem to get filesystemchecked. And there is an erro message said that nfs need be checked.

In this issue, there's no fsck for nfs utility, e.g fsck.nfs like other file system. Whatever fs_passno 0 or 2 are passed, no fsck is executed at all for nfs mount.But in dracut, set it to be 2 always, so the erro message appear.

In the fstab,the sixth variable fs_passno stands for that the device need checked or not,and dracut set it to "2".To fix this issue, it should be "0" when the device is nfs.The third variable stands for the type of the filesystem and we can use it to judge whether the device is nfs. So when the third variable of fstab contains "nfs", the sixth variable fs_passno should be set to "0".

---
 dracut.sh | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
dracut.sh +7 -1
index 6215b36..c22a8c0 100755
@@ -1517,7 +1517,13 @@ if [[ $kernel_only != yes ]]; then
         line=($line)
         [ -z "${line[3]}" ] && line[3]="defaults"
         [ -z "${line[4]}" ] && line[4]="0"
-        [ -z "${line[5]}" ] && line[5]="2"
+        [ -z "${line[5]}" ] && {
+        if strstr "${line[2]}" "nfs" ; then
+                line[5]="0"
+        else
+                line[5]="2"
+        fi
+}
         echo "${line[@]}" >> "${initdir}/etc/fstab"
     done
 
Signature · 1 line
2.1.0
#3 lore raw
In reply to a message not in the archive
Quoted 12 lines · Chao Fan

Set fs_passno, the sixth variable of fstab to "0" when the device is nfs.

The link of Bug 1186699: bugzilla.redhat.com/show_bug.cgi?id=1186699 The bug is that kdump-initrd contains entry requesting nfs dump filesystem to get filesystemchecked. And there is an erro message said that nfs need be checked.

In this issue, there's no fsck for nfs utility, e.g fsck.nfs like other file system. Whatever fs_passno 0 or 2 are passed, no fsck is executed at all for nfs mount.But in dracut, set it to be 2 always, so the erro message appear.

Quoted 6 lines

In the fstab,the sixth variable fs_passno stands for that the device need checked or not,and dracut set it to "2".To fix this issue, it should be "0" when the device is nfs.The third variable stands for the type of the filesystem and we can use it to judge whether the device is nfs. So when the third variable of fstab contains "nfs", the sixth variable fs_passno should be set to "0".

Could you rearrange your patch log to make it more clear? And erase the redhat bugzilla stuff. This is dracut upstream mailing list, not a certain distro.

Quoted 11 lines
---
 dracut.sh | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
dracut.sh +0 -0
index 6215b36..c22a8c0 100755

dracut.sh if [[ $kernel_only != yes ]]; then · line 1520

Quoted 4 lines
dracut.sh +0 -1
@@ -1517,7 +1517,13 @@ if [[ $kernel_only != yes ]]; then
         line=($line)
         [ -z "${line[3]}" ] && line[3]="defaults"
         [ -z "${line[4]}" ] && line[4]="0"
-        [ -z "${line[5]}" ] && line[5]="2"

Could it be like this? The curly braces looks uncomfortable. Surely you need retest it if you would like to take my suggestion.

          [ -z "${line[5]}" ] && line[5]="2"
        strstr "${line[2]}" "nfs" && line[5]="0"

Thanks
Baoquan

Quoted 17 lines
dracut.sh +7 -0
+        [ -z "${line[5]}" ] && {
+        if strstr "${line[2]}" "nfs" ; then
+                line[5]="0"
+        else
+                line[5]="2"
+        fi
+}
         echo "${line[@]}" >> "${initdir}/etc/fstab"
     done
 
Signature · 6 lines
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
author
#5 lore raw
In reply to a message not in the archive

OK, thank you for your comment, I will update my patch according to your email. Thanks,
Chao Fan

----- Original Message -----
From: "Baoquan He" <[email protected]>
To: "Chao Fan" <[email protected]>
Cc: [email protected]
Sent: Wednesday, May 20, 2015 5:25:34 PM
Subject: Re: [PATCH] Change the fs_passno of nfs to 0

Quoted 12 lines · Chao Fan

Set fs_passno, the sixth variable of fstab to "0" when the device is nfs.

The link of Bug 1186699: bugzilla.redhat.com/show_bug.cgi?id=1186699 The bug is that kdump-initrd contains entry requesting nfs dump filesystem to get filesystemchecked. And there is an erro message said that nfs need be checked.

In this issue, there's no fsck for nfs utility, e.g fsck.nfs like other file system. Whatever fs_passno 0 or 2 are passed, no fsck is executed at all for nfs mount.But in dracut, set it to be 2 always, so the erro message appear.

Quoted 6 lines

In the fstab,the sixth variable fs_passno stands for that the device need checked or not,and dracut set it to "2".To fix this issue, it should be "0" when the device is nfs.The third variable stands for the type of the filesystem and we can use it to judge whether the device is nfs. So when the third variable of fstab contains "nfs", the sixth variable fs_passno should be set to "0".

Could you rearrange your patch log to make it more clear? And erase the redhat bugzilla stuff. This is dracut upstream mailing list, not a certain distro.

Quoted 11 lines
---
 dracut.sh | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
dracut.sh +0 -0
index 6215b36..c22a8c0 100755

dracut.sh if [[ $kernel_only != yes ]]; then · line 1520

Quoted 4 lines
dracut.sh +0 -1
@@ -1517,7 +1517,13 @@ if [[ $kernel_only != yes ]]; then
         line=($line)
         [ -z "${line[3]}" ] && line[3]="defaults"
         [ -z "${line[4]}" ] && line[4]="0"
-        [ -z "${line[5]}" ] && line[5]="2"

Could it be like this? The curly braces looks uncomfortable. Surely you need retest it if you would like to take my suggestion.

          [ -z "${line[5]}" ] && line[5]="2"
        strstr "${line[2]}" "nfs" && line[5]="0"

Thanks
Baoquan

Quoted 17 lines
dracut.sh +7 -0
+        [ -z "${line[5]}" ] && {
+        if strstr "${line[2]}" "nfs" ; then
+                line[5]="0"
+        else
+                line[5]="2"
+        fi
+}
         echo "${line[@]}" >> "${initdir}/etc/fstab"
     done
 
Signature · 6 lines
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html