<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; &nbsp;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&nbsp;BZ998347), so this is what I do</div><div>&nbsp; a) Look at the brick size &nbsp;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>&nbsp; &nbsp; &nbsp; &nbsp;&gt; 1TB ... 0.9999</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&gt; 100GB ... 0.999</div><div>&nbsp; &nbsp; &nbsp; &nbsp;default = 0.998</div><div>&nbsp; b) calc pool_size as - (brick capacity (MB) -4) * multiplier</div><div>&nbsp; c) calc thin volume size (vol_size) as &nbsp;; 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>&nbsp; a)&nbsp;lvcreate -l &lt;pool_size&gt; &nbsp;-T &lt;vg&gt;/&lt;pool_name&gt;</div><div>&nbsp; b) lvcreate -V &lt;vol_size&gt;m -T &lt;vg&gt;/&lt;pool_name&gt; -n &lt;lv_name&gt;</div><div><br></div><div><br></div><div>So it's a hack - but in my defense this was added last December :)&nbsp;</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>