* xfstests fails on nfs4 file system
@ 2011-07-30 15:16 Jim Rees
2011-07-30 16:33 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Jim Rees @ 2011-07-30 15:16 UTC (permalink / raw)
To: xfs
xfstests fails on nfs4 file system:
rhcl1# mount -t nfs -o nfsvers=4,minorversion=1 emc-1:/pnfs2 /mnt/emc-1
rhcl1# cd /home/rees/xfstests
rhcl1# setenv TEST_DEV emc-1:/pnfs2
rhcl1# setenv TEST_DIR /mnt/emc-1/rees/xfstests
rhcl1# ./check -nfs
common.rc: Error: $TEST_DEV (emc-1:/pnfs2) is not a MOUNTED nfs filesystem
/bin/df: `emc-1:/pnfs2': No such file or directory
/bin/df: no file systems processed
Originally nfs4 was a separate file system type, and it still shows up that
way in mtab:
emc-1:/pnfs2/ on /mnt/emc-1 type nfs4 (rw,relatime,vers=4,...
I fixed this by commenting out the type check at the end of common.rc. I
don't know enough about the innards of xfstests to know what the proper fix
is. Maybe a substring match, or explicit check for nfs4?
rhcl1# diff -u common.rc common.rc-ok
--- common.rc 2011-07-29 12:11:34.118251109 -0400
+++ common.rc-ok 2011-07-29 12:33:58.384749553 -0400
@@ -1588,12 +1588,6 @@
fi
fi
- if [ "`_fs_type $TEST_DEV`" != "$FSTYP" ]
- then
- echo "common.rc: Error: \$TEST_DEV ($TEST_DEV) is not a MOUNTED $FSTYP filesystem"
- $DF_PROG $TEST_DEV
- exit 1
- fi
fi
# make sure this script returns success
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: xfstests fails on nfs4 file system
2011-07-30 15:16 xfstests fails on nfs4 file system Jim Rees
@ 2011-07-30 16:33 ` Christoph Hellwig
2011-07-30 17:08 ` Jim Rees
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2011-07-30 16:33 UTC (permalink / raw)
To: Jim Rees; +Cc: xfs
On Sat, Jul 30, 2011 at 11:16:04AM -0400, Jim Rees wrote:
> xfstests fails on nfs4 file system:
>
> rhcl1# mount -t nfs -o nfsvers=4,minorversion=1 emc-1:/pnfs2 /mnt/emc-1
> rhcl1# cd /home/rees/xfstests
> rhcl1# setenv TEST_DEV emc-1:/pnfs2
> rhcl1# setenv TEST_DIR /mnt/emc-1/rees/xfstests
> rhcl1# ./check -nfs
> common.rc: Error: $TEST_DEV (emc-1:/pnfs2) is not a MOUNTED nfs filesystem
> /bin/df: `emc-1:/pnfs2': No such file or directory
> /bin/df: no file systems processed
>
> Originally nfs4 was a separate file system type, and it still shows up that
> way in mtab:
> emc-1:/pnfs2/ on /mnt/emc-1 type nfs4 (rw,relatime,vers=4,...
>
> I fixed this by commenting out the type check at the end of common.rc. I
> don't know enough about the innards of xfstests to know what the proper fix
> is. Maybe a substring match, or explicit check for nfs4?
What about the following patch? I makes sure the nfs4 output gets
normalized to nfs as early as possible.
Index: xfstests-dev/common.rc
===================================================================
--- xfstests-dev.orig/common.rc 2011-07-30 18:24:55.253997462 +0200
+++ xfstests-dev/common.rc 2011-07-30 18:26:41.216756745 +0200
@@ -555,7 +555,13 @@ _fs_type()
exit 1
fi
- _df_device $1 | $AWK_PROG '{ print $2 }'
+ #
+ # The Linux kernel shows NFSv4 filesystems in df output as
+ # filesystem type nfs4, although we mounted it as nfs earlier.
+ # Fix the filesystem type up here so that the callers don't
+ # have to bother with this quirk.
+ #
+ _df_device $1 | $AWK_PROG '{ print $2 }' | sed -e 's/nfs4/nfs/'
}
# return the FS mount options of a mounted device
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: xfstests fails on nfs4 file system
2011-07-30 16:33 ` Christoph Hellwig
@ 2011-07-30 17:08 ` Jim Rees
0 siblings, 0 replies; 3+ messages in thread
From: Jim Rees @ 2011-07-30 17:08 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
Christoph Hellwig wrote:
On Sat, Jul 30, 2011 at 11:16:04AM -0400, Jim Rees wrote:
> xfstests fails on nfs4 file system:
>
> rhcl1# mount -t nfs -o nfsvers=4,minorversion=1 emc-1:/pnfs2 /mnt/emc-1
> rhcl1# cd /home/rees/xfstests
> rhcl1# setenv TEST_DEV emc-1:/pnfs2
> rhcl1# setenv TEST_DIR /mnt/emc-1/rees/xfstests
> rhcl1# ./check -nfs
> common.rc: Error: $TEST_DEV (emc-1:/pnfs2) is not a MOUNTED nfs filesystem
> /bin/df: `emc-1:/pnfs2': No such file or directory
> /bin/df: no file systems processed
>
> Originally nfs4 was a separate file system type, and it still shows up that
> way in mtab:
> emc-1:/pnfs2/ on /mnt/emc-1 type nfs4 (rw,relatime,vers=4,...
>
> I fixed this by commenting out the type check at the end of common.rc. I
> don't know enough about the innards of xfstests to know what the proper fix
> is. Maybe a substring match, or explicit check for nfs4?
What about the following patch? I makes sure the nfs4 output gets
normalized to nfs as early as possible.
Makes sense, and it works.
Tested-by: Jim Rees <rees@umich.edu>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-07-30 17:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-30 15:16 xfstests fails on nfs4 file system Jim Rees
2011-07-30 16:33 ` Christoph Hellwig
2011-07-30 17:08 ` Jim Rees
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox