I want to make sure I configure my SSD properly in my new laptop. For my last laptop I set the discard option for / and left it at that. I've read though that this currently isn't the best way to handle things.
My new machine has an NVME type SSD drive. I have all of Gentoo inside a LUKS partition, and inside the LUKS partition I have three LVM partitions (/, /boot, and swap).
What's the proper way to handle SSD discards, so my drive stays in good shape?
Do I add the 'root_trim=yes' option to GRUB_CMDLINE_LINUX_DEFAULT? Do I add 'issue_discards = 1' to /etc/lvm/lvm.conf? Should I do both?
Do I run 'fstrim -v /' in a cron regularly? From the documentation, it seems like I would not need to because of LVM, but I'm not 100% sure.
There's also opening cryptsetup with --allow-discards. I'm unsure if this is something else I would want to do. The LUKS drive is mounted by grub2 to load the initramfs and then during boot, so if I do need to add --allow-discards, this option would need to be added to some config... or maybe it's applied automatically by the root_trim=yes kernel option? I've also read that --allow-discards reduces the security of the encrypted drive, so maybe it's not a good thing to enable.
Lot's of options here. Just want to make sure I'm doing things in a proper way so I get good life out of my drive.


