]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
installer: Reserve some space for RAID metadata.
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 24 Jul 2014 13:28:12 +0000 (15:28 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 24 Jul 2014 13:28:12 +0000 (15:28 +0200)
src/install+setup/install/hw.c

index 77d024535a3597bf229dd5221095550b7ed2fbc6..a88e5567d32c56d765c7c8244a24e743803195c1 100644 (file)
@@ -341,6 +341,10 @@ static int hw_calculate_partition_table(struct hw_destination* dest) {
        if (dest->is_raid) {
                dest->size = (dest->disk1->size >= dest->disk2->size) ?
                        dest->disk1->size : dest->disk2->size;
+
+               // The RAID will install some metadata at the end of the disk
+               // and we will save up some space for that.
+               dest->size -= MB2BYTES(2);
        } else {
                dest->size = dest->disk1->size;
        }