resizing an lvm volume with setup-storage

Nicolas Courtel courtel at cena.fr
Fri Mar 26 17:35:56 CET 2010


>> I found another issue on the LVM resize option : it always preserves
>> the partition. This is not appropriate, as when resizing /usr like I
>> do one is expecting the partition to be cleaned before the new
>> installation.  Also, setup-storage fails if the partition does not
>> already exist :
>>
>> Can't preserve /dev/vg0/usr because it does not exist
>>
>>
>> IMHO the resize option should behave as follows:
>> if (the volume exists) {
>>  resize the volume
>>  if (a preserve* flag is also set for this volume) {
>>    resize the filesystem
>>  } else {
>>    create a new filesystem
>>  }
>> } else {
>>  ignore the resize flag and create a new volume + filesystem
>> }
>>
>>     
>
> I believe that it's mostly a matter of naming and/or using the options somewhat
> differently:
>
> - If you don't want to preserve data, there is no reason to use resize or
>   preserve. Just specify the size and you get what you want.
> - If you want to preserve data but need to change sizes, you use "resize".
> - If you really want setup-storage not to touch some volume, use one of the
>   preserve options. Where preserve is one of preserve_always, preserve_reinstall
>   or preserve_lazy. The latter seems to be still buggy, as you noted, that has
>   to be fixed.
>
> I'm not sure whether this was a problem of missing documentation/clarification
> or rather a real wish to alter behaviour.
>   
Right, remove the existing volume and create a new one is just as good 
as resizing.  I have just missed the easier way to do it.

The only remaining question is what to do if the volume to be resized 
does not exist : setup-storage may either complain as it currently does, 
or ignore the resize flag. As you say it's mainly a documentation issue. 
My feeling is that the volume line (IE I want an 8GiB volume) has a 
higher weight than the resize option, but although I represent 100% of 
the users by now I may be wrong.

-- 
Nicolas



-------------- nächster Teil --------------
Ein Dateianhang mit HTML-Daten wurde abgetrennt...
URL: http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20100326/06581f77/attachment.htm 


More information about the linux-fai mailing list