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/
原文地址:https://www.cnblogs.com/yuandaozhe/p/15591712.html