available_size for md devices is higher than space available resulting in failures
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Expired
|
Medium
|
Unassigned |
Bug Description
I've been fighting with an issue when creating the following configuration:
4 or more devices in a RAID10 configuration
RAID10 device partitioned into two partitions.
Two separate volume grouts created on the separate partitions.
When using both MAAS and the python-libmaas API to configure the machine, if I use the available size for the RAID device when partitioning it, it consistently results in a build failure.
Creating the partitions with some free space on the device (the amount needed seems to depend on the size of the device, the bigger device, the more you seem to set aside (but a fixed percentage of the full disk) allows the build to succeed, so there's a math problem within MAAS.
I deployed a machine using an undersized partitioning of the RAID10 device which works.
Using fdisk to show the disk, I get
root@use1-
Disk /dev/md2: 10.9 TiB, 12002065907712 bytes, 23441534976 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 524288 bytes / 1048576 bytes
Disklabel type: gpt
Disk identifier: 5895A0FD-
Device Start End Sectors Size Type
/dev/md2p1 2048 7812491263 7812489216 3.7T Linux filesystem
/dev/md2p2 7812491264 22660556799 14848065536 6.9T Linux filesystem
Querying MAAS for the same block device shows:
{
There's a discrepancy there of 270401536 bytes (maas thinks the device is bigger than it really is by 270401536 bytes (270MB) in this case of a RAID10 or 4 6T drives) and if you let it use the full space in the gui or via the API it results in a failure during partitioning (AND in most cases NO LOG EITHER back to the maas GUI).
I'm also noticing discrepancies on the physical device partitions
The physical device size matches between the OS and maas, but the partition sizes do NOT.
/dev/sdd
Command (? for help): p
Disk /dev/sdd: 11721045168 sectors, 5.5 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 80D01024-
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 11721045134
Partitions will be aligned on 2048-sector boundaries
Total free space is 11373 sectors (5.6 MiB)
Number Start (sector) End (sector) Size Code Name
1 2048 4095 1024.0 KiB EF02
2 4096 11721035775 5.5 TiB 8300
Command (? for help):
{
],
],
},
so the disk size from the OS is 6001175126016 bytes which matches what maas says for "size"
However the size of partitions for that device don't line up quite right.
description: | updated |
Changed in maas: | |
importance: | Undecided → Medium |
status: | New → Triaged |
There seems to be a similar problem with logical volumes, you cannot use all the space listed by maas, you have to "leave some free" for the evident math bugs.. ga10625be3- 0ubuntu1~ 18.04.1
NOTE this is on maas 2.6.2-7841-