#!/bin/bash yum install -y nfs-utils mkdir /home2 /expdir /mnt/nfsmp cat </etc/systemd/system/home2.automount [Unit] Description=EFI System Partition Automount Documentation=TBD [Automount] Where=/home2 TimeoutIdleSec=120 EOF cat </etc/systemd/system/home2.mount [Unit] Description=EFI System Partition Automount Documentation=TBD [Mount] What=/home Where=/home2 Type=$(stat -f -c %T /home) Options=ro,bind EOF systemctl start home2.automount echo "/expdir *(rw,no_root_squash)" >/etc/exports systemctl enable nfs-server systemctl start nfs-server showmount -e localhost mount localhost:/ /mnt/nfsmp ls -l /mnt/nfsmp umount /mnt/nfsmp systemctl stop home2.automount systemctl start home2.automount