1、查看当前系统版本

CentOS 7.8 将新磁盘挂载到/home,解决挂载问题

 

 2、查看新增的磁盘

fdisk -l

CentOS 7.8 将新磁盘挂载到/home,解决挂载问题

 

3、新磁盘进行分区

CentOS 7.8 将新磁盘挂载到/home,解决挂载问题

 

 CentOS 7.8 将新磁盘挂载到/home,解决挂载问题

 

4、分区格式化

CentOS 7.8 将新磁盘挂载到/home,解决挂载问题

 

 5、将/home文件临时备份到/tmp目录下

mkdir /tmp/home

cp -a /mnt/home/* /tmp/home/

CentOS 7.8 将新磁盘挂载到/home,解决挂载问题

 

 6、挂载新磁盘到/home下

mount /dev/sdb1 /home

使用df -h 命令查看,如下图说明挂载成功。

CentOS 7.8 将新磁盘挂载到/home,解决挂载问题 

 

 7、设置开机自动挂载

查看/dev/sdb1的UUID

CentOS 7.8 将新磁盘挂载到/home,解决挂载问题

修改/etc/fstab 文件,实现开机自动挂载

sudo vi /etc/fstab

CentOS 7.8 将新磁盘挂载到/home,解决挂载问题

 

 8、重启系统,确认挂载成功。

CentOS 7.8 将新磁盘挂载到/home,解决挂载问题

 

PS:挂载home放在最后一行,重启一直挂载不上,放在前面就可以挂载成功。

CentOS 7.8 将新磁盘挂载到/home,解决挂载问题

 

相关文章:

  • 2021-09-15
  • 2021-12-08
  • 2021-10-31
  • 2021-07-28
  • 2021-10-26
  • 2021-06-04
  • 2021-10-30
  • 2021-05-04
猜你喜欢
  • 2022-12-23
  • 2021-05-23
  • 2022-01-03
  • 2021-11-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案