All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: Yann Droneaud <yann@droneaud.fr>
Cc: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] LVM blocks discard for remove commands
Date: Wed, 19 Oct 2011 10:24:13 -0400	[thread overview]
Message-ID: <20111019142412.GA15290@redhat.com> (raw)
In-Reply-To: <1319033348.1827.41.camel@deela.quest-ce.net>

On Wed, Oct 19 2011 at 10:09am -0400,
Yann Droneaud <yann@droneaud.fr> wrote:

> Le mercredi 19 octobre 2011 � 12:45 +0200, Yann Droneaud a �crit :
> > Hi,
> > 
> > Does lvremove, vgremove, pvremove issue discard (eg. TRIM) commands
> > in order to release LE/PE/metadata blocks from the underlying devices (SSD) ?
> > 
> 
> It seems the discard feature was added to LVM2 since version 2.02.85
> (released on 29th April 2011), in WHATS_NEW:
> 
>   Add "devices/issue_discards" to lvm.conf.
>   Issue discards on lvremove and lvreduce etc. if enabled and supported.
> 
> But the documentation is unclear about it. In example.conf.in /
> lvm.conf.5.in:
> 
> "
> Issue discards to a logical volumes's underlying physical volume(s) when
> the logical volume is no longer using the physical volumes' space (e.g.
> lvremove, lvreduce, etc).  Discards inform the storage that a region is
> no longer in use.  Storage that supports discards advertise the protocol
> specific way discards should be issued by the kernel (TRIM, UNMAP, or
> WRITE SAME with UNMAP bit set).  Not all storage will support or benefit
> from discards but SSDs and thinly provisioned LUNs generally do.  If set
> to 1, discards will only be issued if both the storage and kernel
> provide support.
> "
> 
> 
> Does it apply for the blocks holding meta data,
> e.g. will pvremove issue discard requests for the PV meta data ?

The discards are only issued for the physical extents that were used in
a volume's data area.  PV metadata isn't discarded, and really there
would be little benefit to doing so.

  reply	other threads:[~2011-10-19 14:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-19 10:45 [linux-lvm] LVM blocks discard for remove commands Yann Droneaud
2011-10-19 14:09 ` Yann Droneaud
2011-10-19 14:24   ` Mike Snitzer [this message]
2011-10-19 14:37     ` Stuart D. Gathman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111019142412.GA15290@redhat.com \
    --to=snitzer@redhat.com \
    --cc=linux-lvm@redhat.com \
    --cc=yann@droneaud.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.