[Ovirt-devel] [PATCH node] Removes a confusing storage message.

Perry Myers pmyers at redhat.com
Mon Jan 19 21:53:51 UTC 2009


Darryl L. Pierce wrote:
> If interactively configuring storage, the user is shown this message
> when configuration the data partition:
> 
> Change data partition size. (Current -1 MB, Minimum 5 MB)
> 
> This is confusing to read, and is misleading since the data partition
> size can be 0, indicating the user does not want a data partition.
> 
> So the minimum size is set to 0. When the prompt is show, only those
> partitions that have a non-zero minimum size are displayed with such a
> message.

nack

Problem with this is that sizes of 1-4MB for partitions will fail because 
not enough space for the journal.

So there is a difference between the 5MB minimum size and the 0 indicating 
that you don't want a partition.

basically the logic is this.

0 - means you don't want a partition
min - is smallest partition size you can select, for some partitions this 
is 5MB (partition minimum size) for others it's set to a logical value 
based on what we need to put into the partition
-1 - use all remaining space, in this case /data still needs at least 5MB 
so the 5MB number is used for size calculations

> Signed-off-by: Darryl L. Pierce <dpierce at redhat.com>
> ---
>  scripts/ovirt-config-storage |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/ovirt-config-storage b/scripts/ovirt-config-storage
> index efe55f5..e85f040 100755
> --- a/scripts/ovirt-config-storage
> +++ b/scripts/ovirt-config-storage
> @@ -26,7 +26,7 @@ boot_min_size=50
>  root_min_size=256
>  config_min_size=5
>  logging_min_size=5
> -data_min_size=5
> +data_min_size=0
>  swap_min_size=5
>  
>  get_selected_drive_size()
> @@ -158,7 +158,9 @@ do_configure()
>          eval "size=\$$size_var"
>          min_size_var=${i}_min_size
>          eval "min_size=\$$min_size_var"
> -        read -ep "Change $i partition size. (Current $size MB, Minimum $min_size MB)? "
> +	min_msg=""
> +	if [ $min_size != 0 ]; then min_msg=", Minimum $min_size MB"; fi
> +        read -ep "Change $i partition size. (Current $size MB$min_msg)? "
>          r=$REPLY
>          test -z "$r" && r=$size
>          if [[ $r =~ ^-*[0-9]+$ ]] && [[ $r -ge $min_size ||


-- 
|=-        Red Hat, Engineering, Emerging Technologies, Boston        -=|
|=-                     Email: pmyers at redhat.com                      -=|
|=-         Office: +1 412 474 3552   Mobile: +1 703 362 9622         -=|
|=- GnuPG: E65E4F3D 88F9 F1C9 C2F3 1303 01FE 817C C5D2 8B91 E65E 4F3D -=|




More information about the ovirt-devel mailing list