Bug#717313: lvm2: Enable issue_discards = 1 automatically on non-rotational (SSD) disks?
bigon at debian.org
Sun Aug 6 11:03:16 UTC 2017
Le 06/08/17 à 12:55, Petter Reinholdtsen a écrit :
> [Laurent Bigonville]
>> The discards commands will also be issued when shrinking or moving a LV
>> to an other PV, if something is going wrong during these operations, the
>> data will be lost.
>> So it's not only when explicitly removing an LV.
> Aha. I did not have the imagination required to consider that such
> commands would be issued before the operation was sccessfully completed.
> It seemed to me quite obvious that the space would be released only
> after the shrink or move was complete, but if that is not the case, it
> seem quite unsafe to trust LVM to handle discard commands.
I got hit with a bug while migrating my data from my old non-ssd to ssd
drive. In the end I had no data on the SSD (apparently LVM was issuing
discards on the destination disk...) and the LV was deleted from the
non-ssd one. Hopefully the data were still on the old disk (as it was
not supporting DISCARD) so I was able to recover the LV.
While this bug is fixed now, with that kind of experience I can
understand why upstream wants to be on the safe side here.
More information about the pkg-lvm-maintainers