Storage
Table of Contents
1. Description
Configuring a new storage disk and adding it to /etc/fstab
2. Create a new ext4 storage disk
2.1. Make sure the disk is not mounted
To add a new drive as storage on Linux, first use one of these commands to check if the device (sda in this example) is mounted
lsblk findmnt
mount | grep "sda"
2.2. Unmount the drive if its mounted
sudo umount /dev/sda1
2.3. Create a new partition table
sudo fdisk /dev/sda
fdisk commands (m for help):
pPrint the current partition tablegCreate a new empty GPT partition tablenAdd a new partition- Press
RETto use the default x3 (“partition number”, “first sector”, “last sector”) - Type
Yif it ask about existing partitions on the disk (nothing is final until thewcommand) wWrite the changes
2.4. Format the partition with ext4
sudo mkfs.ext4 /dev/sda1
3. Configure the mount point
3.1. Create the mount point directory
/mnt/storage as an example
sudo mkdir /mnt/storage
3.2. Changing permissions might be necessary
sudo chown -c "$USER:" /mnt/storage
3.3. (test) Temporarily mount the drive
Mount sda1 to the mount point directory
sudo mount /dev/sda1 /mnt/storage
Make sure sda1 has /mnt/storage as mount point
lsblk
Unmount the drive
sudo umount /dev/sda1
4. Configure the /etc/fstab file
4.1. Find the drive UUID
lsblk -f
4.2. Add the device
Backup the original file beforehand
sudoedit /etc/fstab
The mount(8) manual has a section about the mount options under FILESYSTEM-INDEPENDENT MOUNT OPTIONS
# <file system> <mount point> <type> <options> <dump> <pass> UUID=ba13a47f-c3a5-4821-b60f-c40418666b46 /mnt/storage ext4 rw,nosuid,nodev,nofail 0 0
4.3. Check for any errors
Make sure the mount command does not return any errors
sudo mount -a
Check if the drive was successfully mounted
mount | grep "storage"
5. Adding storage to Steam
Settings > Downloads > Steam Library Folders