When imsm container is created it have different blocks number
in /proc/mdstat depending on containing array raid level (raid0/raid5).
raid5 case:
md127 : inactive sdd[3](S) sde[2](S) sdc[1](S) sdb[0](S)
2884 blocks super external:imsm
raid0 case:
md127 : inactive sdd[3](S) sde[2](S) sdc[1](S) sdb[0](S)
836 blocks super external:imsm
Due to this, it cannot be compared to one value for both cases.
Test imsm container existence before unit test run only.
Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
udevadm settle
case $1 in
container )
- grep -s "$(((418 * $2) / 2)) blocks super external:imsm" /proc/mdstat > /dev/null || {
+ grep -s "blocks super external:imsm" /proc/mdstat > /dev/null || {
echo >&2 "**Fatal** Correctly formed container not found"; cat /proc/mdstat; exit 1; }
;;
member )