- 环境
- 虚拟机:VMware-10.0.7 build-2844087
- Linux系统:CentOS 6.8
- 远程工具:Xshell 6 (Build 0197)
CentOS6.8 使用 fdisk 命令 手动硬盘分区 自动挂载
一、前言
上一篇介绍了使用fdisk命令进行手动硬盘分区,及手动挂载过程,实际生产环境中,不能因为一块硬盘,进行重复性挂载操作,自动挂载就很好的解决了这个问题。
二、自动挂载
- 自动挂载目标:实现 /dev/sdb1 与目录 /disk1 开机自动挂载。
第一步、手动硬盘分区手动挂载
手动硬盘分区及手动挂载:传送门
第二步、重启系统查看挂载情况
- 重启系统
[root@localhost ~]# reboot
- 查看挂载情况 mount
[root@localhost ~]# mount
/dev/sda3 on / type ext4 (rw,acl)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
/dev/sda1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)