Adding a New Drive #
In this guide, we’ll add a new disk, and format it for use. This guide makes assumptions about drive lettering and paths, ensure you’re running things where you want to.
- Determine drive name and logical size.
fdisk -l
- Partition drive using fdisk
fdisk /dev/sdc
# Common commands
n – Create partition
p – print partition table
d – delete a partition
q – exit without saving the changes
w – write the changes and exit.
- Create Partition using whole Block Device, defaults are fine
- Determine partition name
lsblk
- Make the file system
mkfs.xfs /dev/sdc1
- Mount the drive, a few improvements related to random read in the form of noatime
mount -t xfs -o noatime,nodiratime /dev/sdc1 /mnt/block/rust/
Verify that the filesystem is mounted
To persists across reboots, ensure /etc/fstab updated with he following line.
/dev/sdc1 /mnt/block/rust/ xfs defaults,noatime,nodiratime 0 0