Skip to contentSkip to conversation

Change the fs_passno of nfs to 0

PATCH In review Chao Fan 3 participants 3 messages May 20, 2015 – Jun 2, 2015 1 message not in the archive

lore
Share & tools
lore

Chao Fan

author
#0 lore raw

PATCH v3 1/1 Change the fs_passno of nfs to 0

There is a bug that kdump-initrd contains entry requesting nfs dump filesystem to get filesystemchecked. And there is an erro message said that nfs need be checked. But 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 and it should be set to 0.

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 | 1 +
 1 file changed, 1 insertion(+)
dracut.sh +1 -0
index 6215b36..2d1860f 100755
@@ -1518,6 +1518,7 @@ if [[ $kernel_only != yes ]]; then
         [ -z "${line[3]}" ] && line[3]="defaults"
         [ -z "${line[4]}" ] && line[4]="0"
         [ -z "${line[5]}" ] && line[5]="2"
+        strstr "${line[2]}" "nfs" && line[5]="0"
         echo "${line[@]}" >> "${initdir}/etc/fstab"
     done
 
Signature · 1 line
2.1.0

A message that is not in the archive (sent off-list or not yet received): 1432116434-18050-1-git-send-email-cfan-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org

#3 lore raw
In reply to a message not in the archive

pushed, thanks

Quoted 32 lines · Chao Fan

There is a bug that kdump-initrd contains entry requesting nfs dump filesystem to get filesystemchecked. And there is an erro message said that nfs need be checked. But 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 and it should be set to 0.

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 | 1 +
 1 file changed, 1 insertion(+)
dracut.sh +1 -0
index 6215b36..2d1860f 100755
@@ -1518,6 +1518,7 @@ if [[ $kernel_only != yes ]]; then
         [ -z "${line[3]}" ] && line[3]="defaults"
         [ -z "${line[4]}" ] && line[4]="0"
         [ -z "${line[5]}" ] && line[5]="2"
+        strstr "${line[2]}" "nfs" && line[5]="0"
         echo "${line[@]}" >> "${initdir}/etc/fstab"
     done