#945517 setup-storage: Add option to only return the minimally needed disk space(s) for the selected disk_config

#945517#5
Date:
2019-11-26 09:47:31 UTC
From:
To:
Dear Maintainer,

We are using setup-storage without FAI and hence have our own selection algorithm for the disks we give to setup-storage. It would be very helpful if our disk selection algorithm could exclude too small disks though.

How much work would it be to add a new option to setup-storage so that it will return the minimally required disk spaces for the selected disk_config?

Best,

Michael Schaller

#945517#10
Date:
2019-11-26 14:20:14 UTC
From:
To:
    > How much work would it be to add a new option to setup-storage so that it will return the minimally required disk spaces for the selected disk_config?
Please try setup-storage without -X (dry-run mode). If a disk is to
small it will use this error message:

"Disk $disk is too small - at least $next_start bytes are required\n"

I may be easy to always print this information if -X is not used.

#945517#15
Date:
2019-11-26 14:39:18 UTC
From:
To:
That's what we are currently doing. We just detect/order all the
suitable disks as best as we can and then try the setup-storage run.
If this fails then users typically just unplug/reorder problematic
drives to avoid this issue, which is a bit of a hassle but at the
moment not entirely avoidable with a diverse fleet of machines.

If setup-storage however could provide more details like the number of
required disks and the minimally required disk spaces then we could
automatically exclude too small disks or re-order in software.

This is a total edge case for us though. So feel free to close this
wishlist bug as not feasible. In that case we might resort to parsing
the setup-storage errors but likely we'll also just let users
unplug/reorder problematic drives. ;-)