[Gluster-devel] LVM Best Practice for Snapshots

Paul Cuzner pcuzner at redhat.com
Mon May 12 02:27:32 UTC 2014


Hi, 

I'm picking up gluster-deploy again, and looking at how I do the lvm configuration for thinp based bricks. 

So first off, is there a best practice for lvm setup with thin lv's? 

At the moment, the deploy tool follows these steps; 

1. get the snap reserve from the user (% of freespace to reserve on the brick(s) for snapshot delta) 
2. define the vol_pct as; 100 - reserve (eg. 20% reserve produces a vol_pct of 80% of the pool) 
3. I couldn't simply allocate the thinpool based on the whole brick (see BZ998347), so this is what I do 
a) Look at the brick size and assign a multiplier (assigning a static multiplier wastes too much space, if it's to work on small to large brick sizes) 
> 1TB ... 0.9999 
> 100GB ... 0.999 
default = 0.998 
b) calc pool_size as - (brick capacity (MB) -4) * multiplier 
c) calc thin volume size (vol_size) as ; vol_pct * pool_size 
4. With these sizes calculated, the brick creation process is just handed by a bash script that performs the following 
a) lvcreate -l <pool_size> -T <vg>/<pool_name> 
b) lvcreate -V <vol_size>m -T <vg>/<pool_name> -n <lv_name> 


So it's a hack - but in my defense this was added last December :) 

How are you guys doing this? 

Cheers, 

PC 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://supercolony.gluster.org/pipermail/gluster-devel/attachments/20140511/b39f4f43/attachment-0002.html>


More information about the Gluster-devel mailing list