Find the drive name:

[html]
fdisk -l
[/html]

*In this example we will use /dev/sdc

Now access parted to prepare the drive for formatting and mounting:

[html]
sudo parted /dev/sdc
[/html]

Now set the following:

[html]
(parted) mklabel gpt
(parted) unit TB
(parted) mkpart primary 0.00TB 4.00TB (Changing 4.00TB to the size of your drive)
(parted) quit
[/html]

Format the drive as ext4:

[html]
sudo mkfs.ext4 /dev/sdc1 (note the “1” now)
[/html]

Set the reserved blocks percentage:

[html]
sudo tune2fs -m 1 /dev/sdc1
[/html]

Create a mount point for the new drive:

[html]
mkdir /mnt/mountpoint
[/html]

Mount the drive:

[html]
mount -t ext4 /dev/sdc1 /mnt/mountpoint/
[/html]

Now we add the mountpoint to fstab so that the drive is available on reboot:

[html]
sudo vim /etc/fstab
[/html]

Add the following to the bottom of fstab:

[html]
/dev/sdc1 /mnt/mountpoint ext4 defaults,errors=remount-ro 0 1
[/html]

Written by Matt Cooper
Hi, I'm Matt Cooper. I started this blog to pretty much act as a brain dump area for things I learn from day to day. You can contact me at: matt@matthewc424.sg-host.com.