nfs挂载内存

#!/bin/bash

mkdir /opt/nfs
mount -t tmpfs -o size=1g tmpfs /opt/nfs
chmod -R 777 /opt/nfs

rm -f /etc/exports
echo "/opt/nfs *(insecure,rw,no_root_squash,sync,fsid=0)" > /etc/exports
exportfs -a
service nfs restart


mount -t nfs 127.0.0.1:/opt/nfs /root/mnt/

 

posted on 2021-11-23 09:33  弘道者  阅读(81)  评论(0编辑  收藏  举报