Posts

Showing posts from November, 2016

How to create LVM volume with thin provisioning

Image
This post shows how to create LVM volume with thin provisioning, that is, only actually used ranges of the volume will actually be allocated. Check volume groups First, check lvm volume groups to find out which vg has space for our thin volume pool. vgdisplay Choose one of the volume groups with sufficient space. Because we are using thin provisioning, we could use less space than normal provisioning. Second, check existing logical volumes also.  lvs Creating thin volume pool Next, we create thin volume pool in the chosen volume group (example, vgdata). lvcreate -L 50G --thinpool globalthinpool vgdata Print the resulting volumes using lvs : We see that globalthinpool are created with logical size 50 gigabytes. Creating thinly provisioned volume Now we create thinly provisioned volume using previously created pool. lvcreate -V100G -T vgdata/globalthinpool -n dockerpool The command would create a 100 G logical volume using thin