Hi Emmanuel,
There have been some adjustments in trunk since 2.7.1 that are related
to the mount option parsing. Could you try the attached patch and see
if that helps?
thanks,
-Phil
Emmanuel Florac wrote:
Using pvfs 2.7.1 and Linux 2.6.24.7 (tried x86 and x86_64, same thing),
"mount -t pvfs2" doesn't accept any option and it's quite annoying
because that means automatic mounting thru either /etc/fstab
or /etc/pvfs2tab fails. Here's a sample :
# cat /etc/pvfs2tab
tcp://storiq-cluster1:3334/pvfs2-fs /mnt/pvfs2 pvfs2 rw 0 0
Let's mount :
# /etc/init.d/mountpvfs2.sh
mounting PVFS2 filesystems:mount: wrong fs type, bad option, bad
superblock on tcp://storiq-cluster1:3334/pvfs2-fs,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
Failed
Let's see dmesg output :
Error: mount option [] is not supported.
pvfs2_get_sb: mount request failed with -22
Ensure that all pvfs2-servers have the same FS configuration files
Look at pvfs2-client-core log file (typically /tmp/pvfs2-client.log)
for more details
Strange, it reports that there is no option, though there's one (rw).
So let's check pvfs2-client.log
# tail /var/log/pvfs2-client.log
[E 12:36:55.695817] Configuration server MUST be of the form
protocol://address/fs_name
[E 12:36:55.695870] Failed to umount via host
Let's try nonsense as option :
# mount -t pvfs2 -o zaegzregh*$
tcp://storiq-cluster1:3334/pvfs2-fs /mnt/pvfs2
dmesg says :
Error: mount option [zaegzregh*$] is not supported.
pvfs2_get_sb: mount request failed with -22
Ensure that all pvfs2-servers have the same FS configuration files
Look at pvfs2-client-core log file (typically /tmp/pvfs2-client.log)
for more details
So it looks like somehow wrong options are rejected properly, but valid
options (such as rw,ro,defaults, etc) simply don't go thru. Any idea?
---------------------
PatchSet 6752
Date: 2008/05/01 14:18:18
Author: pcarns
Branch: HEAD
Tag: (none)
Log:
make the mount command fail (rather than ignore silently) if someone tries
to use a mount option that is not supported
Members:
src/kernel/linux-2.6/super.c:1.97->1.98
Index: pvfs2-1/src/kernel/linux-2.6/super.c
diff -u pvfs2-1/src/kernel/linux-2.6/super.c:1.97 pvfs2-1/src/kernel/linux-2.6/super.c:1.98
--- pvfs2-1/src/kernel/linux-2.6/super.c:1.97 Tue Feb 19 12:38:09 2008
+++ pvfs2-1/src/kernel/linux-2.6/super.c Thu May 1 14:18:18 2008
@@ -149,6 +149,7 @@
/* option string did not match any of the known keywords */
if (j == num_possible_keywords)
{
+#ifdef PVFS2_LINUX_KERNEL_2_4
/* assume we have a device name */
if (got_device == 0)
{
@@ -167,6 +168,13 @@
gossip_debug(GOSSIP_SUPER_DEBUG, "pvfs2: multiple device names specified: "
"ignoring %s\n", options[i]);
}
+#else
+ /* in the 2.6 kernel, we don't pass device name through this
+ * path; we must have gotten an unsupported option.
+ */
+ gossip_err("Error: mount option [%s] is not supported.\n", options[i]);
+ return(-EINVAL);
+#endif
}
}
}
---------------------
PatchSet 6762
Date: 2008/05/12 16:02:52
Author: pcarns
Branch: HEAD
Tag: (none)
Log:
fixing bug introduced by strict mount option checking in trunk; on remount
we need to check if options string is empty (in addition to NULL) because
memory for it is allocated whether it is used or not. This caused a hang on
remount (pvfs2-client-core restart) because we failed to parse empty
argument string on remount.
Members:
src/kernel/linux-2.6/super.c:1.98->1.99
Index: pvfs2-1/src/kernel/linux-2.6/super.c
diff -u pvfs2-1/src/kernel/linux-2.6/super.c:1.98 pvfs2-1/src/kernel/linux-2.6/super.c:1.99
--- pvfs2-1/src/kernel/linux-2.6/super.c:1.98 Thu May 1 14:18:18 2008
+++ pvfs2-1/src/kernel/linux-2.6/super.c Mon May 12 16:02:52 2008
@@ -544,7 +544,7 @@
if (sb && PVFS2_SB(sb))
{
- if (data)
+ if (data && data[0] != '\0')
{
ret = parse_mount_options(data, sb, 1);
if (ret)
---------------------
PatchSet 7079
Date: 2008/08/04 13:58:23
Author: pcarns
Branch: HEAD
Tag: (none)
Log:
Make noatime mount option work with older 2.6 kernels. Look for flag in
get_sb() function, and permit empty strings when parsing left over options.
Members:
src/kernel/linux-2.6/super.c:1.103->1.104
Index: pvfs2-1/src/kernel/linux-2.6/super.c
diff -u pvfs2-1/src/kernel/linux-2.6/super.c:1.103 pvfs2-1/src/kernel/linux-2.6/super.c:1.104
--- pvfs2-1/src/kernel/linux-2.6/super.c:1.103 Mon Aug 4 10:52:29 2008
+++ pvfs2-1/src/kernel/linux-2.6/super.c Mon Aug 4 13:58:23 2008
@@ -168,11 +168,17 @@
"ignoring %s\n", options[i]);
}
#else
- /* in the 2.6 kernel, we don't pass device name through this
- * path; we must have gotten an unsupported option.
+ /* filter out NULL option strings (older 2.6 kernels may leave
+ * these after parsing out standard options like noatime)
*/
- gossip_err("Error: mount option [%s] is not supported.\n", options[i]);
- return(-EINVAL);
+ if(options[i][0] != '\0')
+ {
+ /* in the 2.6 kernel, we don't pass device name through this
+ * path; we must have gotten an unsupported option.
+ */
+ gossip_err("Error: mount option [%s] is not supported.\n", options[i]);
+ return(-EINVAL);
+ }
#endif
}
}
@@ -1307,6 +1313,13 @@
if (sb && !IS_ERR(sb) && (PVFS2_SB(sb)))
{
+ /* Older 2.6 kernels pass in NOATIME flag here. Capture it
+ * if present.
+ */
+ if(flags & MS_NOATIME)
+ {
+ sb->s_flags |= MS_NOATIME;
+ }
/* on successful mount, store the devname and data used */
strncpy(PVFS2_SB(sb)->devname, devname,
PVFS_MAX_SERVER_ADDR_LEN);
_______________________________________________
Pvfs2-users mailing list
[email protected]
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-users