FS#13425 - LVM Setup should support -l option
Attached to Project:
Release Engineering
Opened by Markus Heuser (Vrob) - Sunday, 22 February 2009, 21:08 GMT
Last edited by Gerardo Exequiel Pozzi (djgera) - Monday, 26 November 2012, 04:43 GMT
Opened by Markus Heuser (Vrob) - Sunday, 22 February 2009, 21:08 GMT
Last edited by Gerardo Exequiel Pozzi (djgera) - Monday, 26 November 2012, 04:43 GMT
|
Details
Please add support/frontend for the option -l of
"lvcreate".
From the man page: -l Gives the number of logical extents to allocate for the new logical volume. This can also be expressed as a percentage of the total space in the Volume Group with the suffix %VG, of the remaining free space in the Volume Group with the suffix %FREE, or of the remaining free space for the specified PhysicalVolume(s) with the suffix %PVS, So basically this would give users the option to create a couple of partitions and then assign the rest to the last one without having to calculate how many MiB/GiB are left on their devices. Steps to "reproduce": 1. Start AIF 2. Prepare a couple of LVs 3. Enter "100%FREE" when being asked for the size 4. Fail when applying the changes |
This task depends upon
Closed by Gerardo Exequiel Pozzi (djgera)
Monday, 26 November 2012, 04:43 GMT
Reason for closing: Deferred
Monday, 26 November 2012, 04:43 GMT
Reason for closing: Deferred
Thank you Markus, and congratulations!
Right now you can (only) choose the size in MiB. Do I understand correctly that the only real advantages '-l' gives is the possiblity to specify a size in % relative to the VG size?
I'm wondering how I will implement this. probably the easiest implementation is to let the user specify a suffix (either M or %VG) (eg I would use the same field for both -l or -L), parse it later, and depending on the given extension use -l or -L (when creating the FS).
At least this is what counts for me :) I don't know whether there are some more tricks one can do with the -l option.
I think it adds a lot of convenience since it is unnecessary to count/calculate MiB left on the device.
Concerning the implementation details:
Being a lazy bioinformatics student I would defer the choice to the users. Just let them select between "Enter size in MiB" and "Enter percentage of physical volume / remaining free space on logical volume". Well, something like that.
But perhaps parsing the field is finally the more consistent method.
Now I've come to think of it, specifying as %VG (or %PV) would be hard to do too because at "definition time" the interpretation of for instance %50 would mean half of the VG, but at execution time, if already 2 other LV's are made and you make a 3rd, it will only be half of the remaining space.
I think I will keep it like it is but allow a "magic marker" eg "REST" MiB, which would use -l 100%VG, that's pretty much the only use I see in this. (I don't think the %VG, %PV etc are worth implementing if you can specify a size in MiB)
Is "REST" allowed in the size field now?
lvcreate -l 100%FREE is working OK.