Move games to new partition (Lutris, Steam, POL)

I wasn’t able to move my games to a new partition.
Maybe you have some thought on this and you can guide me.

What I did …

  1. editing fstab
    UUID=9e25f54c-65ef-4fd1-a43e-2220564fe92a /media/cc57f7f4-02 ext4 defaults 0 0
    /media/cc57f7f4-02/games /home/mm/Games none bind 0 3
    /media/cc57f7f4-02/steam /home/mm/.steam none bind 0 3

  2. mount the partition and copy all games in there
    # mount /media/cc57f7f4-02
    # mkdir /media/cc57f7f4-02/games /media/cc57f7f4-02/
    # chown mm:mm /media/cc57f7f4-02/games
    # chown mm:mm /media/cc57f7f4-02/steam
    $ cp -vrp /home/mm/Games/* /media/cc57f7f4-02/games
    $ cp -vrp /home/mm/.steam/* /media/cc57f7f4-02/steam

  3. bind the folders to ~/
    # mount -o bind /media/cc57f7f4-02/games /home/mm/Games
    # mount -o bind /media/cc57f7f4-02/steam /home/mm/.steam

Steam wont start at all.
Most games in Lutris wont start any more, except Guild Wars 2.

You’re not copying hidden files (starting with a ‘.’).

Try:
cp -vrp /home/mm/Games /media/cc57f7f4-02/
mv /media/cc57f7f4-02/Games /media/cc57f7f4-02/games

Rinse and repeat for the steam folder

Thanks for the advice!
It works now, so I can add more games to my system.
But why do hidden files not get effected by “*”

Because they’re hidden.

1 Like

Yes they are

Stack Overflow answers once again. Apparently, my way wasn’t even the most correct but at least it works…

There are better commands to use for operations like this, like tar or rsync.

cd /directory ; tar cvf - .|tar xvf - -C /path/to/other/directory

This for instance will copy the contents of /directory to /path/to/other/directory

cd /directory ; rsync -avh --progress . /path/to/other/directory

Does the same thing, but using rsync.

There are some caveats when it comes to selinux, xattr, acls, etc, but I won’t get into that :wink:

Edit: fixed a mistake I made

@magicthighs the rsync command seems to be a good choice to do this. I will keep that in mind. Thanks for this advice.
But the tar command seems a bit overkill cause of compressing and decompressing.

@reavessm thanks for clarification of “*” wildcard in combination with hidden files. Lucky me I was using bash.

1 Like