Bug#717313: lvm2: Enable issue_discards = 1 automatically on non-rotational (SSD) disks?
pere at hungry.com
Fri Jul 19 08:43:11 UTC 2013
According to several recipes on how to set up Linux on a SSD disk, LVM
need to be reconfigured to issue discard (aka TRIM) instructions to the
underlying storage device. This is done by modifying /etc/lvm/lvm.conf
and setting issue_discards = 1 in the devices section.
Why not set the option automatically when the underlying device is not
rotational? In my case, the LVM physical device is /dev/dm-0 (encrypted
device), and /sys/block/dm-0/queue/rotational return 0. If LVM used the
rotational value to decide to set the issue_discard option, there would
be no need for manual configuration with LVM and SSD disks.
Is there some reason this isn't done already, except lack of time to
More information about the pkg-lvm-maintainers