Skip to content

How to create a larger filesystem for your games.

marshcroft edited this page Nov 23, 2015 · 1 revision

This document outlines the best practice method for creating a new filesystem for your games directory on SteamOS when you add a new HDD.

Assumptions ahead of time

You have already attached a new hdd/ssd to your system and you know how to get to a shell prompt either locally on the system or via SSH. I also assume that in the shell windows you have become root with either a sudo su - or a sudo -i command, if you haven't done so then expect to type sudo before all of my commands below. My new drive was the 2nd drive in my system so I used /dev/sdb make sure you know which drive you will be using ( You could loose data if you dont know )

Install LVM tools on Debian to make this easier going forward. apt-get install lvm2 /etc/init.d/lvm2 start

parted /dev/sdb mklabel gpt (my 2nd drive was 3TB in size so I made it a gpt, if your drive is less than 2TB you should use mklabel msdos) unit gb mkpart primary ext4 0G 1024G (I didnt want to use all of my drive space for this hence I allocated 1TB to it if you want to use the whole disk you added then use this command (mkpart primary ext4 0% 100% )) quit

pvcreate /dev/sdb1 vgcreate steamvg /dev/sdb1 lvcreate -n games -l 100%FREE steamvg mkfs.ext4 /dev/steamvg/games

You now have a new disk ready but you also still have all your games on your old drive still in place so lets move the games all over to the new disk

mkdir /tmp/games mount /dev/steavvg/games /tmp/games cp -r /home/steam/.local/share/Steam/steamapps/common /tmp/games chown -r steam:steam /tmp/games

once this has completed you should see an identical replica of the directory structure between /home/steam/.local/share/Steam/steamapps/common & /tmp/games

Once it looks good we can now delete the games from the existing boot drive

rm -Rf /home/steam/.local/share/Steam/steamapps/common mkdir /home/steam/.local/share/Steam/steamapps/common chown steam:steam /home/steam/.local/share/Steam/steamapps/common

Now lets move the mounted /tmp/games to the new location and make it permanent upon reboots

umount /tmp/games vi /etc/fstab (add the following in at the bottom of your fstab file ) /dev/steamvg/games /home/steam/.local/share/Steam/steamapps/common ext4 defaults 0 2

save and exit and run the following

mount -a

You should now see all your games back in /home/steam/.local/share/Steam/steamapps/common

and a df -h should show your new filesystem with free space.

Moving forward if you need to add more space again then it is just a simple vgextend and lvextend command.

Clone this wiki locally