[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] [RFC - PATCH] gfs2/gfs kernel: warn if mount/umount helpers are missing

Hi guys,

I have recently been bitten by a bad installation where the either the mount or
the umount helper was not installed properly in the system.

After discussing a bit on IRC with David, we agreed that the best approach to
warn the user about this situation was a kernel message.

Looking in the default set of options that mount.gfs* sets there is at least
hostdata that is mandatory.

The patch in attachment verifies that hostdata is set after parsing all the
options and if empty will warn the users that the helpers might not have been
installed properly.

The same method could be applied to gfs2 but at the moment it OOPS'es on my test
cluster and I can't verify it.

Please apply or ACK and I will apply to CVS HEAD.


I'm going to make him an offer he can't refuse.
diff --git a/gfs-kernel/src/gfs/mount.c b/gfs-kernel/src/gfs/mount.c
index 8ffa89f..d5e649e 100644
--- a/gfs-kernel/src/gfs/mount.c
+++ b/gfs-kernel/src/gfs/mount.c
@@ -165,6 +165,13 @@ gfs_make_args(char *data_arg, struct gfs_args *args, int remount)
+	/* hostdata is a mandatory args set by mount.gfs
+	 * if we lack this information the gfs mount will hang no matter what,
+	 * but at least we will know why
+	 */
+	if (!strlen(args->ar_hostdata))
+		printk("GFS: (u)mount helpers might not be properly installed on your system\n");
 	if (error)
 		printk("GFS: invalid mount option(s)\n");

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]