[pve-devel] [PATCH] Add useful examples to lvm/lvmthin section.

Wolfgang Bumiller w.bumiller at proxmox.com
Wed Jun 29 11:37:40 CEST 2016


On Wed, Jun 29, 2016 at 09:51:52AM +0200, Wolfgang Link wrote:
> ---
>  pve-storage-lvm.adoc     | 33 +++++++++++++++++++++++++++++++++
>  pve-storage-lvmthin.adoc | 40 ++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 73 insertions(+)
> 
> diff --git a/pve-storage-lvm.adoc b/pve-storage-lvm.adoc
> index 4046e15..521cb02 100644
> --- a/pve-storage-lvm.adoc
> +++ b/pve-storage-lvm.adoc
> @@ -84,6 +84,39 @@ List available volume groups:
>  
>   # pvesm lvmscan
>  
> +Storage Layout
> +~~~~~~~~~~~~~~
> +
> +On a default installation {pve} will use lvm.
> +
> +The layout looks like followed.

as follows | like the following | like this

> +
> +.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.
> +
> +Create a Volume Group
> +~~~~~~~~~~~~~~~~~~~~~

I prefer 'Creating', since this an example within a documentation rather
than another step in a recipe the user is following. Same goes for the 3
other cases below in the lvmthin part.

> +Let's assume we have a empty disk /dev/sdb, where we want to make a Volume Group named vmdata.

an* empty disk
maybe "onto which"?

> +
> +First create a partition.
> +
> + # sgdisk -N 1 /dev/sdb
> +
> + #pvcreate --metadatasize 250k -y -ff /dev/sdb1
> +
> + #vgcreate vmdata /dev/sdb1
> +
>  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.

creating* (this time it's not a matter of preference ;-)
a* 

> +It is thin provision.

provisioned*
or I'd just remove that line.

> +
> + # lvcreate -n <Name> -V <Size[M,G,T]> <VG>/<LVThin_pool>
> +
> +A real world example it looks like

s/it looks/might look/

> +
> + # lvcreate -n vz -V 10G pve/data
> +
> +Now a filesystem must be create on the LV.
> +
> + # mkfs.ext4 /dev/data/vz
> +
> +And at last step this have to be mounted.

has*
Maybe reword it to something like: "Finally this can be mounted."

> +
> +WARNING: be sure that /var/lib/vz is empty. On a default installation it isn't.

Personal preference: since you want to emphasize the 'not' part I'd
write "it's not" rather than "it isn't".

> +
> +To make it always accessible add the following line at '/etc/fstab'.
> +
> + # echo '/dev/pve/vz /var/lib/vz ext4 defaults 0 2' >> /etc/fstab
> +
> +Resize metadata pool
> +~~~~~~~~~~~~~~~~~~~~

+the
Shouldn't this be the "Resizing the thin pool" section? See below:

> +
> +CAUTION: If the pool will extend, then it is be necessary to extent also the metadata pool.

This seems out of place since this _is_ the section about resizing the
metadata pool, so maybe use 'NOTE' or rename the section.
I'd also reword it a bit: "When extending the data pool, the metadata
pool must be extended with it."

And of course, a command to resize the data pool would be useful here
;-)

> +
> +It can be achieved with the following command.
> +
> + # lvresize --poolmetadatasize +<size[M,G]> <VG>/<LVThin_pool>
> +
> +Create a LVM-Thin pool
> +~~~~~~~~~~~~~~~~~~~~~~
> +A Thinpool will create on top of a Volume Group.

It will, and it's the only place it can be created, so maybe: "A thin
pool has to be created on top of a volume group."

> +How create a Volume Group see LVM.

+to
"(...) see the LVM documentation"?

> +
> + # lvcreate -L 80G -T -n vmstore vmdata
> +
>  ifdef::wiki[]
>  
>  See Also
> -- 
> 2.1.4




More information about the pve-devel mailing list