Add a New Disk in Linux With Parted

The parted disk utility can be used for disk partition larger than 2TB.

1
2
3
4
5
6
7
8
9
10
11
% sudo lsblk
% sudo parted /dev/sdb mklabel gpt
% sudo parted /dev/sdb mkpart primary 0 100%
% sudo mkfs.xfs /dev/sdb1
% sudo mkdir /tools
% sudo mount /dev/sdb1 /tools
% sudo lsblk
% sudo df -hT
% sudo blkid
% sudo echo "UUID=0f559a31-08b5-47aa-9a60-d9a6594941ad /tools xfs defaults 0 0" >> /etc/fstab
% sudo reboot