[pve-devel] [PATCH] Add useful examples to lvm/lvmthin section.
Wolfgang Link
w.link at proxmox.com
Wed Jun 29 11:01:04 CEST 2016
I think if somebody is interested on what this command do in detail
she/he will read the man.
In case "-largest-new=1" makes no sence to a person, who has no idea
what going on anyway.
On 06/29/2016 10:50 AM, Emmanuel Kasper wrote:
>>
>> +Storage Layout
>> +~~~~~~~~~~~~~~
>> +
>> +On a default installation {pve} will use lvm.
>> +
>> +The layout looks like followed.
>> +
>> +.Default LVM Layout.
>> +[width="100%",options="header"]
>> +|==============================================================================
>> +|VG |LV |Mountpoint |Note
>> +|pve |swap | |will used as swap partition
>> +|pve |root |/ |
>> +|pve |data |/var/lib/vz/ |{pve} < 4.2
>> +|pve |data | |{pve} >= 4.2
>> +|==============================================================================
>> +
>> +In {pve} 4.2 we changed the LV data to a thin pool to provide snapshots and native performance of the disk.
>> +The /var/lib/vz is now included in the LV root.
>
> maybe for clarity we could reword this as such:
>
> For {pve} versions up to 4.1, the installer creates a Logical Volume
> called 'data' which is mounted at /var/lib/vz
> Starting from 4.2 the Logical Volume 'data' is a LVM thin volume, used
> for block based storage of guest systems, and /var/lib/vz is simply a
> directory on the root file system.
>
> This makes clearer when pve 4.3 is released, that it follows the 4.2
> partitioning scheme.
>
>
>> +Create a Volume Group
>> +~~~~~~~~~~~~~~~~~~~~~
>> +
>> +Let's assume we have a empty disk /dev/sdb, where we want to make a Volume Group named vmdata.
>> +
>> +First create a partition.
>> +
>> + # sgdisk -N 1 /dev/sdb
>
>
>
>> + #pvcreate --metadatasize 250k -y -ff /dev/sdb1
>> +
>> + #vgcreate vmdata /dev/sdb1
>> +
>
> maybe for clarity we could generally use long options whenever we can,
> so the end user has an idea what the command is doing
> I guess some people will copy/paste this anyway without understanding,
> but we can give them a chance
> redhat documentation is also using long options with commands in its
> documentation:
> ex
> https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/4/html/Cluster_Logical_Volume_Manager/persistent_numbers.html
>
> so here we would have
>
> sgdisk --largest-new=1 /dev/sdb
>
> pvcreate --metadatasize 250k /dev/sdb1
>
> do we need -ff and -y here ?
>
>
>> ifdef::wiki[]
>>
>> See Also
>> diff --git a/pve-storage-lvmthin.adoc b/pve-storage-lvmthin.adoc
>> index 23a72ea..fa3a572 100644
>> --- a/pve-storage-lvmthin.adoc
>> +++ b/pve-storage-lvmthin.adoc
>> @@ -76,6 +76,46 @@ List available LVM thin pools on volume group `pve`:
>>
>> # pvesm lvmthinscan pve
>>
>> +Create a extra LV for /var/lib/vz
>> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> +
>> +This can be easily done by create an new thin LV.
>> +It is thin provision.
>> +
>> + # lvcreate -n <Name> -V <Size[M,G,T]> <VG>/<LVThin_pool>
>> +
>> +A real world example it looks like
>> +
>> + # lvcreate -n vz -V 10G pve/data
> could be for instance
> lvcreate --name vz --virtualsize 10G pve/data
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
More information about the pve-devel
mailing list