* [linux-lvm] migrating a thick LV to a thin LV
@ 2014-03-12 0:01 Paul B. Henson
2014-03-12 8:46 ` Marian Csontos
0 siblings, 1 reply; 3+ messages in thread
From: Paul B. Henson @ 2014-03-12 0:01 UTC (permalink / raw)
To: linux-lvm
I'm looking at converting a system to using thin provisioning, and have a
handful of existing fixed size LV's I want to migrate to the thinpool.
Ideally, after the migration they would also be thinly provisioned, only
taking up the amount of space they are actually using, not their existing
size. All of them have ext4 filesystems on them.
One option would be to use resize2fs to shrink the filesystems down to their
bare minimum, resize the existing LV to that, dd it onto a thin LV of the
original size, and then run resize2fs again to bring the filesystem back to
full capacity without any blocks wasted.
However, I was wondering if I just dd'd the existing LV onto a thin LV of
the same size, and then ran fstrim, would that release the unused space? I
see that thin pools support passing down discards to the underlying device,
but it's not clear whether they also process them internally, freeing up
space in the thinpool that is no longer in use by the thin LV.
Any thoughts?
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-lvm] migrating a thick LV to a thin LV
2014-03-12 0:01 [linux-lvm] migrating a thick LV to a thin LV Paul B. Henson
@ 2014-03-12 8:46 ` Marian Csontos
2014-03-12 19:07 ` Paul B. Henson
0 siblings, 1 reply; 3+ messages in thread
From: Marian Csontos @ 2014-03-12 8:46 UTC (permalink / raw)
To: LVM general discussion and development, henson
On 03/12/2014 01:01 AM, Paul B. Henson wrote:
> I'm looking at converting a system to using thin provisioning, and have a
> handful of existing fixed size LV's I want to migrate to the thinpool.
> Ideally, after the migration they would also be thinly provisioned, only
> taking up the amount of space they are actually using, not their existing
> size. All of them have ext4 filesystems on them.
>
> One option would be to use resize2fs to shrink the filesystems down to their
> bare minimum, resize the existing LV to that, dd it onto a thin LV of the
> original size, and then run resize2fs again to bring the filesystem back to
> full capacity without any blocks wasted.
>
> However, I was wondering if I just dd'd the existing LV onto a thin LV of
> the same size, and then ran fstrim, would that release the unused space? I
> see that thin pools support passing down discards to the underlying device,
> but it's not clear whether they also process them internally, freeing up
> space in the thinpool that is no longer in use by the thin LV.
Yes, discarded blocks in the thin-pool data device which are not
referenced from other thin-volumes (snapshots) are released regardless
whether the device at the bottom supports discards or not.
-- Martian
>
> Any thoughts?
>
> Thanks.
>
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-lvm] migrating a thick LV to a thin LV
2014-03-12 8:46 ` Marian Csontos
@ 2014-03-12 19:07 ` Paul B. Henson
0 siblings, 0 replies; 3+ messages in thread
From: Paul B. Henson @ 2014-03-12 19:07 UTC (permalink / raw)
To: 'Marian Csontos',
'LVM general discussion and development'
> From: Marian Csontos
> Sent: Wednesday, March 12, 2014 1:47 AM
>
> Yes, discarded blocks in the thin-pool data device which are not
> referenced from other thin-volumes (snapshots) are released regardless
> whether the device at the bottom supports discards or not.
Excellent; thanks for the confirmation.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-03-12 19:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-12 0:01 [linux-lvm] migrating a thick LV to a thin LV Paul B. Henson
2014-03-12 8:46 ` Marian Csontos
2014-03-12 19:07 ` Paul B. Henson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).