Dne 3.2.2017 v 18:23 Chris Murphy napsal(a):
On Fri, Feb 3, 2017 at 10:18 AM, Chris Adams <li...@cmadams.net> wrote:
Once upon a time, Chris Murphy <li...@colorremedies.com> said:
Further I wonder if /etc/lvm/lvm.conf needs
issue_discards = 1

Both / and /home are actually LV's which are made from the LUKS PV. So
trim pass down from dmcrypt to block device isn't enough to do
anything.

LVM passes discards through automatically, assuming the block device
under the PV supports them.  The issue_discards option tells LVM to
issue discards itself when PV space is released (e.g. an LV is
removed/reduced).

Yep. I just tested it with the default issue_discards=0 and fstrim -v
does work on an LV.

Nevertheless I don't understand the benefit of this feature if
fstrim.service is not enabled by default; nor is a discard mount
option set for the file system in fstab.



Hi

Please read doc about this option first - there is a very good reason
why you have 'issue_discards=0' as default.

This option is purely about discarding 'removed space' by lvm2.
So when you run  'lvremove  vg/lv'   extents occupied by such LV
is discarded. Same applies to 'lvreduce'!.

MAJOR drawback is - such operation becomes   *irreversible* - why the
common rule with lvm2 is - you could 'restore' 1 step back (unless you use thin-pools - with those you don't have reverting).

So if someone sets 'issue_discard=1' he automatically loses reversibility.

It should be left to admin to decides which risk he is wiling to take.

Regards


Zdenek


_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org

Reply via email to