Storage Drives
We installed Debian onto an internal drive, but it's pretty common to need to install additional storage drives for media and documents.
Formatting Drives
If you are coming from the Windows ecosystem, your hard drives may be formatted for Windows using the FAT, ExFAT or NTFS file system.
For the best performance and stability, we recommend re-formatting these storage disks using the Linux ext4 file system.
Re-install all disk drives.
Make sure to shut down your computer and re-connect any disk drives that were unplugged during the Debian installation.
While Debian can support writing to NTFS disks using the ntfs-3g software, it can decrease overall performance and access speeds. FAT and ExFAT file systems have native support within Debian, but are not an ideal server file system due to technical limitations. If possible, important data should be copied to an alternate disk so that it can be reformatted as ext4.
Reformatting will erase the disk drive.
You will irrecoverably lose data stored on this drive.
We will be opening the "Disks" application from the Start Menu, under the "Accessories" category.
This application can be used to verify that the disk is formatted using the FAT, ExFAT or NTFS file system. Once we've done that, we can format the disk drive using the Linux ext4 file system for improved performance and reliability.
When we select on the 1.0TB hard drive listed, we will see an overview of the partitions on this disk. There is a small 210MB EFI partition used for system files and a 1000GB partition that takes up the rest of the space. We can also see that the "Storage" partition is formatted using the NTFS file system.
With the Storage partition selected, we select the red 'minus' icon to 'Delete selected partition'. We will receive a warning that all data on the partition will be erased. Once you are certain there is no important data on that partition, you can hit 'Delete'.
If there are other data partitions, aside from the EFI partition, we will need to follow this process to remove them. After all the partitions have been removed from the disk, you will be presented with 1000GB of "Free Space" for us to create a new partition.
By selecting "Free Space", we are presented with a 'plus' icon that allows us to "Create partition in unallocated space".
Clicking this button will open a partition creation wizard. First, we need to select how much space the partition will occupy. For this disk, we want the partition to fill the entire space so we will leave it at the default setting. Hit 'Next'.
Now, we will need to give a name to the partition and choose the file system type. This name can be anything you want, but simple descriptive language is usually best. We will name the partition "Storage" and choose the Type "Internal disk for use with Linux systems only (Ext4)".
Optionally, you can choose to securely write over all the data that was stored on the drive. We do not want to encrypt our volume with LUKS.
Once we hit 'Create', it will begin to format the disk with the new partition.
Once it's completed the format process, you will have a new 'Storage' partition using the Ext4 file system.
Now, we can move on to mounting these storage disks at a permanent and centralized location.
Mounting Drives
While running a personal cloud or media server, you may need additional hard drives to store movies, television or documents. Whether you are using a USB hard drive or installed a new NVME SSD, they will need a fixed location for accessing their files.
By default, internal drives are mounted within the /mnt folder while external hard drives are mounted inside a user folder within /mnt.
We need to explicitly mount these disks so that they don't change unexpectedly between system reboots. For simplicity, we want to ensure all of our storage disks is permanently mounted within the /mnt folder.
We will be opening the "Disks" application from the Start Menu, under the "Accessories" category.
This application can be used to configure the file path used to mount the hard drive, as well as ensure that it will automatically be mounted each time the computer is started.
This application is being run as Root and has the potential to break your Debian install if you aren't careful.
There are currently two disk drives installed into this computer; an SSD for the operating system, as well as an external hard drive for media storage. For this example, we will be changing the mount location for an external USB hard drive to the /mnt folder. We can select the drive from the sidebar and we will be able to inspect all of the partitions on this drive.
This drive has a small 210MB EFI partition, which stores system information, as well as a primary 1000GB data partition named "Enclave". We will ignore the EFI partition because it should not be mounted. For continuity, we will be mounting the Enclave partition at "/mnt/enclave". First, we need to select the Enclave partition, then click the gear icon to bring up the "Additional partition options" menu.
Deselect the "User Session Defaults" option and you will be able to change these settings. We want to ensure that the "Mount at system startup" and "Show in user interface" option are selected. Next, we will be changing the Mount Point to '/mnt/enclave'.
Finally, we will be changing "Identify As" to the option that begins with "/dev/disk/by-uuid/*". Each hard drive has a Universally Unique Identifier that does not change and will ensure that the correct drive is always mounted at the correct location.
Once we hit OK, the software will commit these changes to the /etc/fstab – or File Systems Table – file. This is a core operating system file that handles the mounting of both local and network drives during the boot process. As we can see, the hard drive we've just finished configuring hasn't been mounted for use yet.
Now we need to hit the "Play" icon labeled as "Mount selected partition" to make it available for use. This will mount the hard drive on your desktop, within the file browser, and the configured "/mnt/enclave" path.
Next, we can close the Disk Manager. This should bring our terminal window back up. We can run the following command to ensure the data stored on it is accessible to everyone on the local computer:
sudo chmod -R 777 /mnt/enclave
If you are able to create a new folder, then your new hard drive is setup and ready for use. You can now delete this folder.