Notes on Mounting Hard Disk under CentOS7
Ready to work
机器:DELL R730
系统:CentOS 7.4.1708 (Core) x86_64
新增硬盘:三星960PRO
关闭服务器加上新硬盘,然后重启
View hard disk information
[root@localhost ~]# fdisk -l
format the partition
[root@localhost ~]# mkfs.ext4 /dev/nvme0n2t2
Create /data directory
[root@localhost ~]# mkdir /data
mount partition
[root@localhost ~]# mount /dev/nvme0n2t2 /data
View the mount result
[root@localhost ~]# df -Th
Configure auto mount at startup
[root@localhost ~]# vi /etc/fstab
#追加如下内容:
/dev/nvme0n2t2 /data ext4 defaults 0 0
reboot
[root@localhost ~]# reboot
References