From 6bb84b266e14f50c71a0f661a423dfbdfcab1bdd Mon Sep 17 00:00:00 2001 From: Xiubo Li Date: Tue, 10 Dec 2019 20:50:12 -0500 Subject: [PATCH] mount.ceph: give a hint message when no mds is up or cluster is laggy When the cluster is laggy or no MDS is up the mount may time out with errno == EHOSTUNREACH for the first time to do the mounting, and will just return the same errno without waiting for the following retries. Signed-off-by: Xiubo Li (cherry picked from commit 28ae01af7f42e8709baeeb2e22df720d9cb61e9b) --- src/mount/mount.ceph.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mount/mount.ceph.c b/src/mount/mount.ceph.c index a9c52ffcc63e0..ea2b58b1cc8ac 100644 --- a/src/mount/mount.ceph.c +++ b/src/mount/mount.ceph.c @@ -358,6 +358,9 @@ int main(int argc, char *argv[]) case ENODEV: printf("mount error: ceph filesystem not supported by the system\n"); break; + case EHOSTUNREACH: + fprintf(stderr, "mount error: no mds server is up or the cluster is laggy\n"); + break; default: printf("mount error %d = %s\n",errno,strerror(errno)); } -- 2.39.5