diff --git a/WHATS_NEW b/WHATS_NEW index 64653698d..bcda5b1ec 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -2,6 +2,7 @@ Version 2.00.26 - ===================================== Make clvmd fork later so it can return more error codes. Make clvmd cope with large gaps in node numbers IDs. + Make clvmd initialisation cope better with debugging output Version 2.00.25 - 29th September 2004 diff --git a/daemons/clvmd/lvm-functions.c b/daemons/clvmd/lvm-functions.c index 71988dbff..4e99cd32b 100644 --- a/daemons/clvmd/lvm-functions.c +++ b/daemons/clvmd/lvm-functions.c @@ -407,9 +407,11 @@ static void *get_initial_state() return NULL; while (fgets(line, sizeof(line), lvs)) { - if (sscanf(line, "%s %s %s\n", vg, lv, flags) == 3) { + if (sscanf(line, "%s %s %s\n", vg, lv, flags) == 3) { + /* States: s:suspended a:active S:dropped snapshot I:invalid snapshot */ - if (flags[4] == 'a' || flags[4] == 's') { /* is it active or suspended? */ + if (strlen(vg) == 38 && /* is is a valid UUID ? */ + (flags[4] == 'a' || flags[4] == 's')) { /* is it active or suspended? */ /* Convert hyphen-separated UUIDs into one */ memcpy(&uuid[0], &vg[0], 6); memcpy(&uuid[6], &vg[7], 4);