SSD + LVM and Trim?!?

So with the news of Steam helping Linux gamers run Windows games, I’m in the mind to make some changes.

I have been using Linux for a great many years but I have always had to keep a Windows PC for gaming with my old clan mates. This news from Valve is enough to push me over the edge and go 100% Linux on my gaming rig too.

My gaming rig has several drives.

  • 525Gb SSD
  • 1TB SSD
  • 1TB spinning rust

I tend to use the mechanical drive for bulk storage, backup, Google-Drive that type of thing.

The pair of SSD’s I would prefer to appear to be a single device. Save the hassle of remembering to tell Steam where to install games and such like. Steam left to its own devices will dump everything in the home directory. (It’s been a while since I have run Steam on a Linux box)

I think an LVM scheme would be the way to do it. My concern is can trim see the drives. Can you run trim on an LVM volume? How will setting up a spanned volume on the two SSD’s effect the long-term performance of my SSD’s

Is there a better solution that I have not considered?

Notes:

  • Ubuntu 18.04
  • AMD Ryzen 1700X (Mild OC 3.8GHz I didn’t win the silicon lottory)
  • 32Gb 3200MHz (@3000MHz with tighter timeings)
  • nVidia 980Ti (stock)
  • Crucial MX300 525GB + 1TB
  • Western Digital 1TB Black
  • Corsair RM650

I’m also interested to hear how LVM affects trim. Meanwhile, have you considered putting the disks into a RAID array instead?

Also, just because you might not be aware, you can set up separate game libraries in different disk locations on Steam, and then choose which library you want to install to.

This is the most useful answer I have seen on Reddit, I asked there too.

Then: Just enable the weekly trim, either by calling fstrim -av via cronjob or enabling the fstrim.timer as /u/dr_hashimoto suggested.

You need to set issue_discards = 1 in /etc/lvm/lvm.conf if you change the size of LVs and want the then unused space to be TRIMmed. (I always enable, it does not hurt, if it is on.)

Don’t enable discard via /etc/fstab. Many SSDs don’t like this, causing severe performance reduction during delete operations.

Use lsblk -o NAME,TYPE,ROTA,DISC-GRAN,DISC-MAX to check if support for TRIM is correctly passed up the storage device stack.

1 Like

Hi peeps, I have decided to take a more pragmatic approach to solving this issue of multiple drives and a fresh install of a system.

I have decided to dedicate the whole HDD to GDrive and the larger SSD to Steam library.

These drives are mounted within my home folder. So to all outward appearance there is just a single drive. In reality the dives are there but within a folder.

I’m currently spanking my internet connection syncing my GDrive with insync and downloading a handful of games from Steam.

After I have spend some time getting things to my liking I will investigate running some of the Windows native steam games.

I know this didn’t get the original question answered but in the end I think this is the best solution for me.