-
Notifications
You must be signed in to change notification settings - Fork 2
How to mount 2TB disk
Phạm Dương Nhật Nam edited this page Nov 13, 2017
·
1 revision
Install parted
:
apt-get install -y parted
Find your drive names:
lsblk
Run fdisk for selected drive for info:
fdisk -l /dev/<your harddrive name here>
# Example:
fdisk -l /dev/sdb
Run parted: parted /dev/<your harddrive name here>
parted /dev/sdb
To create a GPT partition table:
mklabel gpt
unit GB
mkpart primary <from GB> <to GB>
# Example:
mkpart primary 0.0GB 4000.8GB
To view the partition table:
print
Quit parted:
quit
mkfs.ext4 /dev/<your drivename and partition number here>
# Example:
mkfs.ext4 /dev/sdb1
Create new directory for mount point:
mkdir /<your mount dir>
# Example
mkdir /store
Open fstab file:
vim /etc/fstab
Add the following line at the bottom:
/dev/<your drivename and partition number> /store <your filesystem> defaults 0 0
# Example:
/dev/sdb1 /store ext4 defaults 0 0
mount /<your mount dir>
# Example:
mount /store