Created
February 26, 2018 19:31
-
-
Save hrehman200/0db322f3aacc799906d984152c103683 to your computer and use it in GitHub Desktop.
Steps to mount large size (>2 TB) GPT formatted external hard drive on Linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Following command should list the 4 TB external hard drive. At the bottom you will see external hdd info and after that /dev/sdc or something like that: | |
sfdisk -l | |
# We need to create one partition of 4 TB so that it can be mounted. For this we need parted command with our external hdd parameter: | |
parted /dev/sdc | |
# you will enter into parted app. Enter mklabel to rewrite partition table of external drive i.e. /dev/sdc | |
(parted) mklabel gpt | |
# set unit to TB | |
(parted) unit TB | |
# create 4 TB partition | |
(parted) mkpart primary 0.00TB 4.00TB | |
# print partitions to verify | |
(parted) print | |
# quit parted app | |
(parted) quit | |
# format filesystem of external drive's partition | |
mkfs.ext4 /dev/sdc1 | |
# create directory where you will mount external hdd | |
mkdir /media/usb-hdd | |
# Mount the drive into the folder | |
mount /dev/sdc1 /media/usb-hdd | |
# See if mounted drive is shown with correct size | |
df -h |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment