When raid0 is created (no other monitored raid in container), mdmon is not running. Ping is not necessary in such case. Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx> --- Manage.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/Manage.c b/Manage.c index 5996646..a032c08 100644 --- a/Manage.c +++ b/Manage.c @@ -896,7 +896,13 @@ int Manage_subdevs(char *devname, int fd, sysfs_free(sra); return 1; } - ping_monitor(devnum2devname(devnum)); + if (mdmon_running(devnum)) { + char *cont = devnum2devname(devnum); + if (cont) { + ping_monitor(cont); + free(cont); + } + } sysfs_free(sra); close(container_fd); } else { -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html