On Fri, 19 Jul 2013 10:43:11 +0200 Petter Reinholdtsen <p...@hungry.com> wrote:
>
> Hi.

Hello,

> 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
> implement it?

What I understand from this bug and Zdenek (who is apparently LVM2 upstream) message is that by default the discard requests are already passed to the underlying device during regular operation, this was definitely not really clear in my head, maybe this should be explained in the comments from the configuration file.

The "issue_discards=1" parameter is only needed if discards should also be issued when changing topology of the LV, ie when doing thin provisioning apparently.

So I don't think it's that important to enable "issue_discards" by default ; the automatic backups of the configuration files made by the lvm commands already saved my ass at least once, so...

my 2ยข

Laurent Bigonville

Reply via email to