1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-26 14:04:15 +03:00

Report detailed errors in cluster initialisation to syslog, and point the user

at syslog if clvmd fails to intialise.
This commit is contained in:
Patrick Caulfield 2004-11-11 14:51:23 +00:00
parent e9d86789db
commit 20f3408d96
2 changed files with 5 additions and 4 deletions

View File

@ -74,7 +74,7 @@ int init_cluster()
/* Open the cluster communication socket */
cluster_sock = socket(AF_CLUSTER, SOCK_DGRAM, CLPROTO_CLIENT);
if (cluster_sock == -1) {
log_error("Can't open cluster socket");
syslog(LOG_ERR, "Can't open cluster manager socket: %m");
return -1;
}
@ -86,7 +86,7 @@ int init_cluster()
if (bind
(cluster_sock, (struct sockaddr *) &saddr,
sizeof(struct sockaddr_cl))) {
log_error("Can't bind cluster socket: %m");
syslog(LOG_ERR, "Can't bind cluster socket: %m");
return -1;
}
@ -97,7 +97,7 @@ int init_cluster()
/* Create a lockspace for LV & VG locks to live in */
lockspace = dlm_create_lockspace(LOCKSPACE_NAME, 0600);
if (!lockspace) {
log_error("Unable to create lockspace for CLVM\n");
syslog(LOG_ERR, "Unable to create lockspace for CLVM: %m");
return -1;
}
dlm_ls_pthread_init(lockspace);

View File

@ -650,7 +650,8 @@ static void be_daemon()
fprintf(stderr, "clvmd could not create local socket\n");
break;
case DFAIL_CLUSTER_IF:
fprintf(stderr, "clvmd could not connect to cluster\n");
fprintf(stderr, "clvmd could not connect to cluster manager\n");
fprintf(stderr, "Consult syslog for more information\n");
break;
case DFAIL_MALLOC:
fprintf(stderr, "clvmd failed, not enough memory\n");