ubuntu mount gpt hard disk

View hard drive information

When the hard disk is not mounted, pass
sudo fdisk -l  # 查看硬盘信息
会得到一下信息:
Disk /dev/sda: 7.28 TiB, 8001563222016 bytes, 15628053168 sectors

Create mount folder

sudo mkdir /data

Mount the hard disk to the specified folder

sudo mount /dev/sda /data
When the mounting is unsuccessful, you need to format it (operate with caution, generally the new hard disk needs to be formatted for the first time, and other disks with data do not need to be formatted):
sudo mkfs.ext4 /dev/sda
然后再挂载

Add auto-start mounting at boot

vim /etc/fstab
在最后一行加入  
/dev/sda        /data   ext4    defaults        0       0

Guess you like

Origin blog.csdn.net/qq_44897728/article/details/116168393