Hopefully this is an easy question!
Background: I am currently using Ubuntu 12.04 as a home media server running MythTV and using XBMC as frontends on both Windows and Ubuntu. My media is shared via SMB and NFS, but I use NFS primarily for the XBMC frontends because the lower overhead translates into significantly better performance.
What I Want: What I would like to do is to create two NFS shares to my media files. One share I would like to be read/write, and the other share I would like to be read only. This way, I can set up a frontend for my roommate, for example, where he can access the files for viewing, but not screw anything up.
Since I can't create two identical NFS shares, one read/write and one read-only, I tried to create two mounts to differentiate them.
In /etc/fstab, I have the following device mounted:
/dev/stb1 /mnt/Media ext4 defaults 0 0
And in /etc/exports, I have the following NFS share:
The above works fine for read/write access. My intention was to create a second, read-only mount, and then export it via NFS as /mnt/Media_ReadOnly. So I've tried to create the second mount as follows:
/dev/stb1 /mnt/Media_ReadOnly ext4 ro,auto,user,noexec 0 0
but I get an error:
mount: according to mtab, /dev/sdb1 is mounted on /mnt/Media
So I guess I can't mount the same device twice?
How can I export the same path via NFS in a read-only format?