Add a New Disk in Linux With Fdisk

The fdisk disk utility can only be used for disk partition no larger than 2TB.

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