How To Format A 3TB + Drive On Ubuntu

https://joshstrange.com/ubuntu-formatting-a-3tb-drive/

1. To find the drive name (will be something like ‘/dev/sdX’ – where X is a letter like ‘a’ or ‘b’)

$ lsblk

2. to use the ‘parted’ command:

$ sudo parted /dev/sdX

In the parted interactive console type (change 3.00TB to the size of your drive):

(parted) mklabel gpt
(parted) unit TB
(parted) mkpart primary 0.00TB 3.00TB
(parted) quit

Then (Where X is the same as above and note the “1” added now):

$ sudo mkfs.ext4 /dev/sdX1

By default 5% is reserved for the root to stop the driving becoming unusable when full. For data and drives not used as the main OS this does not matter too much and can be reduced. 5% of 3TB is 150 GB which is unnecessary. Turn this down to 1% and note the ‘X’ and ‘1’ just like the above command:

$ sudo tune2fs -m 1 /dev/sdX1

To make a directory to mount the drive to if you don’t have one already:

$ mkdir /Your/Mount/Point/Here

To get the UUID of your drive:

$ sudo blkid (Copy the UUID of your drive)

You will see a list of devices with each looking something like:

/dev/sdb1: UUID="9d0a468b-4f97-4622-8707-177dbc5c5084" TYPE="ext4" PARTLABEL="primary" PARTUUID="944dd063-c154-461b-9fce-46d25e5575cb"

Copy the UUID which will be the part that looks like:

UUID="9d0a468b-4f97-4622-8707-177dbc5c5084"

Then we edit the file below:

$ sudo nano /etc/fstab

Add the UUID that you copied above to the end of the file and also delete the parenthesis surrounding the UUID:

UUID=YOUR-UUID-HERE-XXXX    /Your/Mount/Point/Here  ext4    defaults    1   2 

example:

UUID=9d0a468b-4f97-4622-8707-177dbc5c5084 /media/mynewdrive ext4 defaults 1 2

Ctrl-X, the ‘Y’ to save and exit

Finally to mount the drive:

$ sudo mount -a

Your drive will be partitioned, formatted as ext4, and mounted.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.