Adding a New Drive

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.


  1. Determine drive name and logical size.
fdisk -l
  1. 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.
  1. Create Partition using whole Block Device, defaults are fine

  1. Determine partition name
lsblk
  1. Make the file system
mkfs.xfs /dev/sdc1
  1. 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/
  1. Verify that the filesystem is mounted

  2. To persists across reboots, ensure /etc/fstab updated with he following line.

/dev/sdc1 /mnt/block/rust/ xfs defaults,noatime,nodiratime 0 0