All of lore.kernel.org
 help / color / mirror / Atom feed
* dm thin: How to shrink think pool device?
@ 2015-03-18 23:46 Maxim Patlasov
  2015-03-19  0:51 ` Mike Snitzer
  0 siblings, 1 reply; 3+ messages in thread
From: Maxim Patlasov @ 2015-03-18 23:46 UTC (permalink / raw)
  To: dm-devel; +Cc: snitzer


[-- Attachment #1.1: Type: text/plain, Size: 688 bytes --]

Hi,

It seems that a "trim" pool message was planned long time ago, but never
implemented. Could someone update about current status of that? The
question came from the following use-case:

Suppose we have a thin pool on top of LVM volume group. The group comprises
of several storage drives. Now I need to (physically) remove one of them.
The intention is to use pvmove and vgreduce, but obviously thin pool must
be requested to shrink itself at first.

Btw, Documentation/device-mapper/thin-provisioning.txt still has a leftover
about it:

> If you wish to reduce the size of your thin device and potentially
> regain some space then send the 'trim' message to the pool.

Thanks,
Maxim

[-- Attachment #1.2: Type: text/html, Size: 829 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: dm thin: How to shrink think pool device?
  2015-03-18 23:46 dm thin: How to shrink think pool device? Maxim Patlasov
@ 2015-03-19  0:51 ` Mike Snitzer
  2015-03-19  1:42   ` Maxim Patlasov
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Snitzer @ 2015-03-19  0:51 UTC (permalink / raw)
  To: Maxim Patlasov; +Cc: dm-devel

On Wed, Mar 18 2015 at  7:46pm -0400,
Maxim Patlasov <mpatlasov@parallels.com> wrote:

> Hi,
> 
> It seems that a "trim" pool message was planned long time ago, but never
> implemented. Could someone update about current status of that? The
> question came from the following use-case:
> 
> Suppose we have a thin pool on top of LVM volume group. The group comprises
> of several storage drives. Now I need to (physically) remove one of them.
> The intention is to use pvmove and vgreduce, but obviously thin pool must
> be requested to shrink itself at first.

We only support growing the pool.  If a drive used by the pool goes
missing then thin_repair will need to fix things.
 
> Btw, Documentation/device-mapper/thin-provisioning.txt still has a leftover
> about it:
> 
> > If you wish to reduce the size of your thin device and potentially
> > regain some space then send the 'trim' message to the pool.

I'll remove that stale documentation (commit 5ec02084f6 should've done
that).

The 'trim' message was never about reducing pool space.  The usage for
the trim message (sent to the pool device) was:
 trim <dev_id> <new_size_in_sectors>

It was to reduce the size of the thin volume; don't think it was ever
wired up because it wasn't needed.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: dm thin: How to shrink think pool device?
  2015-03-19  0:51 ` Mike Snitzer
@ 2015-03-19  1:42   ` Maxim Patlasov
  0 siblings, 0 replies; 3+ messages in thread
From: Maxim Patlasov @ 2015-03-19  1:42 UTC (permalink / raw)
  To: Mike Snitzer; +Cc: dm-devel

On 03/18/2015 05:51 PM, Mike Snitzer wrote:
> On Wed, Mar 18 2015 at  7:46pm -0400,
> Maxim Patlasov <mpatlasov@parallels.com> wrote:
>
>> Hi,
>>
>> It seems that a "trim" pool message was planned long time ago, but never
>> implemented. Could someone update about current status of that? The
>> question came from the following use-case:
>>
>> Suppose we have a thin pool on top of LVM volume group. The group comprises
>> of several storage drives. Now I need to (physically) remove one of them.
>> The intention is to use pvmove and vgreduce, but obviously thin pool must
>> be requested to shrink itself at first.
> We only support growing the pool.  If a drive used by the pool goes
> missing then thin_repair will need to fix things.

Do you think a feature allowing to shrink pool data device on-line 
smoothly will be useful (w.r.t all code complications needed to relocate 
data blocks inside dm-thin while handling i/o at the same time)?

>   
>> Btw, Documentation/device-mapper/thin-provisioning.txt still has a leftover
>> about it:
>>
>>> If you wish to reduce the size of your thin device and potentially
>>> regain some space then send the 'trim' message to the pool.
> I'll remove that stale documentation (commit 5ec02084f6 should've done
> that).
>
> The 'trim' message was never about reducing pool space.  The usage for
> the trim message (sent to the pool device) was:
>   trim <dev_id> <new_size_in_sectors>
>
> It was to reduce the size of the thin volume; don't think it was ever
> wired up because it wasn't needed.

Hm... "dmset load <thin-volume>" seems to do exactly that. But, yes, it 
has nothing to do with reclaiming storage space back to the system.

Thanks,
Maxim

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-19  1:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-18 23:46 dm thin: How to shrink think pool device? Maxim Patlasov
2015-03-19  0:51 ` Mike Snitzer
2015-03-19  1:42   ` Maxim Patlasov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.