archive mirror
 help / color / mirror / Atom feed
From: Zdenek Kabelac <>
To: LVM general discussion and development <>,
	Mark Mielke <>
Subject: Re: [linux-lvm] Why isn't issue_discards enabled by default?
Date: Tue, 22 Sep 2020 10:13:29 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Dne 21. 09. 20 v 16:26 Mark Mielke napsal(a):
> On Mon, Sep 21, 2020 at 10:14 AM nl6720 < 
> <>> wrote:
>     I wanted to know why the "issue_discards" setting isn't enabled by
>     default. Are there any dangers in enabling it or if not is there a
>     chance of getting the default changed?
>     Also it's not entirely clear to me if/how "issue_discards" affects thin
>     pool discard passdown.
> Historically, there have been dangers. Even today, there might still be 
> dangers - although, I believe Linux (and other OS) may disable the feature in 
> hardware which is known to behave improperly.
> If you do research and ensure you are using a good storage drive, there should 
> not be any problems. I enable issue_discards on all systems I work with at 
> home and work, and have not encountered any problems. But, I also don't buy 
> cheap drives with questionable namebrands.
> It's pretty common for settings such as these to be more conservative, to 
> ensure that the users who are willing to accept the risk (no matter how small) 
> can turn it on as an option, and the users who are unaware or might not have 
> evaluated the risk, cannot blame the software vendors for losing their data. 
> In the case of LVM - it's not LVM's fault that some drives might lose your 
> data when discard is sent. But, users of LVM might blame LVM.


So let's repeat again -  issue_discards  has nothing to do with discard 
handling of the LV itself.

If the LV is sitting on top of SSD - it will receive discard/TRIM no matter
what is set in this issue_discard setting - it could be  0 or 1 and LV will be 

Anyone can very easily try - create some small simple LV on top SSD - or 
thinLV then create i.e.  mkfs.ext4 and use 'fstrim -v'.
With discardable device you will get nice print about discarded region -
then play with issue_discards setting - there will be no change...

Setting issue_discards only matters when you run 'lvremove' and your VG is
maybe on some 'provisioned' storage and you pay for used space - in this case 
released extents in VG will receive TRIM - so VG will eat less physical
space on such storage.

So keeping this setting 0 is perfectly fine and allows users to revert many 
lvm2 operation if they've made a mistake.

When setting is 1 - most of lvm2 commands have NO way back - once done, all 
data is gove - which can be quite fatal if you have i.e. very similar LV names...

No distribution should be setting issue_discards to '1' by default - it should 
be always changed by admin so he is aware of consequences.



  reply	other threads:[~2020-09-22  8:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-21 14:14 nl6720
2020-09-21 14:26 ` Mark Mielke
2020-09-22  8:13   ` Zdenek Kabelac [this message]
2020-09-21 18:51 ` Zdenek Kabelac
2020-09-22  9:14   ` nl6720
2020-09-22  9:20     ` nl6720
2020-09-22 10:15     ` Zdenek Kabelac
2020-09-22 10:38       ` nl6720
2020-09-22 10:59         ` Zdenek Kabelac

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:

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

  git send-email \ \ \ \ \
    --subject='Re: [linux-lvm] Why isn'\''t issue_discards enabled by default?' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).