Appears when one attempts to create RAID 1 volume on 2 disks within a container with an existing RAID 5 volume on 3 disks and specifies the md device explicitly (e.g. /dev/md127). Instead of saying that such volume cannot be created it says that the devices have insufficient size. Signed-off-by: Lukasz Orlowski <lukasz.orlowski@xxxxxxxxx> --- Create.c | 8 ++++++-- super-intel.c | 10 +++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Create.c b/Create.c index 47e5fc8..baadd9f 100644 --- a/Create.c +++ b/Create.c @@ -262,9 +262,13 @@ int Create(struct supertype *st, char *mddev, if (size && chunk && chunk != UnSet) size &= ~(unsigned long long)(chunk - 1); newsize = size * 2; - if (st && ! st->ss->validate_geometry(st, level, layout, raiddisks, - &chunk, size*2, NULL, &newsize, verbose>=0)) + if (st && ! + st->ss->validate_geometry( + st, level, layout, raiddisks, &chunk, + size*2, NULL, &newsize, verbose >= 0)) { + fprintf(stderr, Name ": create aborted.\n"); return 1; + } if (chunk && chunk != UnSet) { newsize &= ~(unsigned long long)(chunk*2 - 1); diff --git a/super-intel.c b/super-intel.c index 616853b..51874ae 100644 --- a/super-intel.c +++ b/super-intel.c @@ -5223,9 +5223,13 @@ static int reserve_space(struct supertype *st, int raiddisks, /* chunk is in K */ minsize = chunk * 2; - if (cnt < raiddisks || - (super->orom && used && used != raiddisks) || - maxsize < minsize || + if (cnt < raiddisks || (super->orom && used && used != raiddisks)) { + fprintf(stderr, Name ": the option-rom requires all " + "member disks to be a member of all volumes.\n"); + return 0; + } + + if (maxsize < minsize || maxsize == 0) { fprintf(stderr, Name ": not enough devices with space to create array.\n"); return 0; /* No enough free spaces large enough */ --------------------------------------------------------------------- Intel Technology Poland sp. z o.o. z siedziba w Gdansku ul. Slowackiego 173 80-298 Gdansk Sad Rejonowy Gdansk Polnoc w Gdansku, VII Wydzial Gospodarczy Krajowego Rejestru Sadowego, numer KRS 101882 NIP 957-07-52-316 Kapital zakladowy 200.000 zl This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. ��.n��������+%������w��{.n�����{����w��ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f