0
点赞
收藏
分享

微信扫一扫

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


 1、查看当前系统版本



CentOS 7.8 将新磁盘挂载到/home,解决挂载问题_操作系统


 2、查看新增的磁盘


fdisk -l




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


3、新磁盘进行分区



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


 



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


4、分区格式化



CentOS 7.8 将新磁盘挂载到/home,解决挂载问题_操作系统_05


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


mkdir /tmp/home

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




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


 6、挂载新磁盘到/home下


mount /dev/sdb1 /home


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



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

 


 7、设置开机自动挂载

查看/dev/sdb1的UUID



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


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


sudo vi /etc/fstab




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


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



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


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



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


举报

相关推荐

0 条评论