[dm-crypt] expanding encrypted volume/growing the volume

Robert Nichols rnicholsNOSPAM at comcast.net
Wed Sep 10 15:25:07 CEST 2014


On 09/09/2014 10:31 PM, Ross Boylan wrote:
> On Tue, Sep 09, 2014 at 08:59:03PM -0500, Robert Nichols wrote:
>> Easy.  Create a new LV in that VG and use "--extents 100%FREE" as
>> its size.  Fill that LV with whatever variety of random data you
>> choose, then delete that LV and use the space to expand your active
>> LV.
>
> Thanks; I wasn't aware of that syntax.
>
> But do the snapshots make that hazardous?  If the maximum space I
> specified for them is pre-allocated it should be fine, but I thought
> the implementation grabbed blocks as needed.  If that's the case, a
> snapshot could fail while I have grabbed all the "free" space.
>
> I suppose worst case I could do 90%Free and be good enough.

The snapshot LV can increase its size only if you created it as thinly
provisioned, and even then it can grab extents only within the LV that
you set up as a "thin pool" LV.  The space within that thin pool LV is
not "free" for the purposes of creating a new LV.  Creating a new LV
with "--extents 100%FREE" will not affect expansion of your snapshot
LVs.

-- 
Bob Nichols     "NOSPAM" is really part of my email address.
                 Do NOT delete it.



More information about the dm-crypt mailing list