-
-
Save kevinkirkup/d580d012193a48e919f9e8a5a24db80a to your computer and use it in GitHub Desktop.
Mount NFS to RAMFS for sharing multiple locations on one SAMBA Share
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SERVER=$1 | |
NFS_SHARE=$2 | |
LOCAL_SHARE=$3 | |
RAMFS_SHARE=$4 | |
echo "Setting up RamFS" | |
mkdir /tmp/ramfs | |
mkdir /tmp/ramfs/$RAMFS_SHARE | |
echo "Setting up NFS mountpoint" | |
mkdir /media/$SERVER | |
mkdir /media/$SERVER/$LOCAL_SHARE | |
echo "Mounting NFS" | |
mount.nfs $SERVER:$NFS_SHARE /media/$SERVER/$LOCAL_SHARE | |
echo "Linking files and folders" | |
ln -s /media/$SERVER/$LOCAL_SHARE/* /tmp/ramfs/$RAMFS_SHARE/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment