NFS永久挂载
服务端 nfs rpcbind 开机自启动
[root@nfs01 ~]# systemctl is-active rpcbind nfs
active
active
[root@nfs01 ~]# systemctl is-enabled rpcbind nfs
enabled
enabled
方法1 /etc/rc.local
chmod +x /etc/rc.d/rc.local
方法2 /etc/fstab 通过/etc/fstab 实现nfs开机自动挂载
172.16.1.31:/nfs /nfs nfs defaults 0 0
通过/etc/fstab 实现nfs开机自动挂载
CentOS6 失败
启动 netfs 服务
[root@web01 ~]# mount 172.16.1.31:/nfs /nfs
mount.nfs: /nfs is busy or already mounted
[root@web01 ~]# mount 172.16.1.31:/nfs /nfs
mount.nfs: /nfs is busy or already mounted
[root@web01 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 99G 1.7G 98G 2% /
devtmpfs 476M 0 476M 0% /dev
tmpfs 487M 0 487M 0% /dev/shm
tmpfs 487M 14M 473M 3% /run
tmpfs 487M 0 487M