On 22 May 2013 12:33, Thomas Thrainer <[email protected]> wrote:
>
>
>
> On Mon, May 20, 2013 at 5:11 PM, Bernardo Dal Seno <[email protected]>
> wrote:
>>
>> The requested number of spindles is used to allocate PVs when creating new
>> LVs.
>>
>> Signed-off-by: Bernardo Dal Seno <[email protected]>
>> ---
>
>
> As far as I've understood, the spindles parameter can only ever be used by
> LogicalVolume and is ignored by all the other sub-classes of BlockDev. The
> documentation of BlockDev.Create's params parameter says "...params:
> device-specific options/parameters". So why do we introduce a new (required)
> parameter here instead of putting the spindles option in params, where it
> could be LogicalVolume specific?
>
> This comment goes beyond this patch, as previous ones have already added
> "spindles" to the Disk class. But the reasoning is the same: should we add a
> specific field, which is only valid for a specific disk type, to the Disk
> class, which IMHO should only hold generic disk information?

I asked myself the same question. Spindles are currently used only for
LVM volumes, but there is no technical reason they couldn't be used
for DRBD (and in fact they might someday) or a RAID-like storage
backend. When e_s is enabled, spindles will be used in place of disk
size for balancing, allocation, ipolicy checks, and space planning. So
I thought it would make more sense to have a "first-class" parameter.
Besides, the way the parameters are used today implies that they can
be inherited from the instance, cluster, node... and have a default
value, which make them a different kind of animals. What do you think?

Bernardo

Reply via email to