On Sun, Aug 06, 2017 at 09:16:55AM +0200, Petter Reinholdtsen wrote:
> A while back, I created a deb named ssd-setup to automatically set up Debian 
> for
> a SSD disk.  Until I understand more about the LVM issue, I automatically
> enable issue_discards=1 in
> <URL: https://anonscm.debian.org/cgit/collab-maint/ssd-setup.git >.  But
> is this a bad idea or simply useless?

In general it is a bad idea.

Let's take a look again at the current text in lvm.conf regarding this
option:
| Issue discards to PVs that are no longer used by an LV.  Discards are
| sent to an LV's underlying physical volumes when the LV is no longer
| using the physical volumes' space, e.g.  lvremove, lvreduce. Discards
| inform the storage that a region is no longer used.

So this only triggers if you do operations that change the LV itself.
It however does _not_ effect the use of discards during the normal
operation of a filesystem.

However it comes with a large drawback, not counting the bugs in the
discard handling itself:  Even with the automatic backups of the lvm
metadata, it is impossible to recover from the wrongly removed LV.  This
is the reason why this feature is off by default.

Bastian

-- 
Fascinating is a word I use for the unexpected.
                -- Spock, "The Squire of Gothos", stardate 2124.5

Reply via email to