Index: LVM2.2.02.61/daemons/cmirrord/functions.c =================================================================== --- LVM2.2.02.61.orig/daemons/cmirrord/functions.c 2010-01-22 08:43:28.000000000 +0800 +++ LVM2.2.02.61/daemons/cmirrord/functions.c 2010-03-04 15:38:48.000000000 +0800 @@ -313,6 +313,23 @@ if (r != 2) return -EINVAL; + /* FIXME Let's check if dm-minor exists first */ + /* Seems sometime the udev doesn't create the device file in time */ + sprintf(path_rtn, "/dev/dm-%d", minor); + int tmpi = 0; + while ( tmpi ++ <= 4 ) { + stat(path_rtn, &statbuf); + if (S_ISBLK(statbuf.st_mode) && + (major(statbuf.st_rdev) == major) && + (minor(statbuf.st_rdev) == minor)) { + LOG_DBG("We found the dm-%d device", minor); + return 0; + } else { + LOG_DBG("We don't find dm-%d device", minor); + } + sleep(1); + } + /* FIXME dm_dir() */ LOG_DBG("Checking /dev/mapper for device %d:%d", major, minor); /* Check /dev/mapper dir */