Whamcloud - gitweb
LU-1946 mount: Print more helpful message on EBUSY
authorPrakash Surya <surya1@llnl.gov>
Thu, 13 Sep 2012 23:45:01 +0000 (16:45 -0700)
committerOleg Drokin <green@whamcloud.com>
Mon, 24 Sep 2012 06:23:48 +0000 (02:23 -0400)
If the mount function returns EBUSY, there is a chance that the
backend filesystem is mounted through the Posix layer. Specifically,
when using a ZFS backend EBUSY will be returned in this use case. As an
aid the to end user, this patch prints a message intended to help the
user diagnose and fix the issue.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Change-Id: I7bacbb74c1e76efbbea60f76049a9356d601d246
Reviewed-on: http://review.whamcloud.com/3997
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lustre/utils/mount_lustre.c

index 9be94a6..325ae0f 100644 (file)
@@ -638,6 +638,9 @@ int main(int argc, char *const argv[])
 
                 fprintf(stderr, "%s: mount %s at %s failed: %s\n", progname,
                        mop.mo_usource, mop.mo_target, strerror(errno));
+               if (errno == EBUSY)
+                       fprintf(stderr, "Is the backend filesystem mounted?\n"
+                                       "Check /etc/mtab and /proc/mounts\n");
                 if (errno == ENODEV)
                         fprintf(stderr, "Are the lustre modules loaded?\n"
                                 "Check /etc/modprobe.conf and "