[linux-lvm] unexpected behaviour of "lvresize" with sparse volumes

Alexey alukardd at alukardd.org
Thu Oct 15 07:13:34 UTC 2015


Hello,

If you look at the output of `lvs myvg`, then you will understand whats 
happens.
When you create thin LV without specifying option `-T`, lvm 
automatically created TP for you with size equal to -L option.
And when you resize your sparsevol, your TP (auto name lvol1) still have 
old size.

Regards,
Alexey Mochkin

On 2015-10-14 23:18, Chris Friesen wrote:
> Hi,
> 
> I'm running the 3.14 kernel with lvm 2.02.98 and I ran into something
> unexpected with lvresize.
> 
> I created a sparse volume:
> 
> lvcreate -L 25M -V 50M -n sparsevol myvg
> 
> 
> This gives output in lvdisplay like this:
>   LV Size                52.00 MiB
>   Current LE             13
>   COW-table size         28.00 MiB
>   COW-table LE           7
> 
> I then resized the volume with lvresize:
> 
> lvresize -L 200M myvg/sparsevol
> 
> 
> This seems to resize the COW-table, but not the volume itself.  Now
> lvdisplay shows:
> 
>   LV Size                52.00 MiB
>   Current LE             13
>   COW-table size         200.00 MiB
>   COW-table LE           50
> 
> 
> At this point I've got 200MiB of backing store and running "lvs" shows
> an LSize of "200m" but I can only write 52MiB worth of data to the
> volume before it complains.
> 
> Is there a way to expand the "LV Size" shown in lvdisplay so that I
> can write the resized amount of data to the volume?
> 
> Thanks,
> Chris
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm at redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/




More information about the linux-lvm mailing list