<html><body><div style="font-family: lucida console,sans-serif; font-size: 12pt; color: #000000"><div><br></div><div>Hi,</div><div><br></div><div>I'm picking up gluster-deploy again, and looking at how I do the lvm configuration for thinp based bricks.</div><div><br></div><div>So first off, is there a best practice for lvm setup with thin lv's?</div><div><br></div><div>At the moment, the deploy tool follows these steps;</div><div><br></div><div>1. get the snap reserve from the user (% of freespace to reserve on the brick(s) for snapshot delta)</div><div>2. define the vol_pct as; 100 - reserve (eg. 20% reserve produces a vol_pct of 80% of the pool)</div><div>3. I couldn't simply allocate the thinpool based on the whole brick (see BZ998347), so this is what I do</div><div> 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)</div><div> > 1TB ... 0.9999</div><div> > 100GB ... 0.999</div><div> default = 0.998</div><div> b) calc pool_size as - (brick capacity (MB) -4) * multiplier</div><div> c) calc thin volume size (vol_size) as ; vol_pct * pool_size</div><div>4. With these sizes calculated, the brick creation process is just handed by a bash script that performs the following</div><div> a) lvcreate -l <pool_size> -T <vg>/<pool_name></div><div> b) lvcreate -V <vol_size>m -T <vg>/<pool_name> -n <lv_name></div><div><br></div><div><br></div><div>So it's a hack - but in my defense this was added last December :) </div><div><br></div><div>How are you guys doing this?</div><div><br></div><div>Cheers,</div><div><br></div><div>PC</div><div><br></div><div><br></div><div><br></div></div></body></html>