Sharing NFS directory as read-write for one host then read-only for others

Status
Not open for further replies.
Joined
Sep 5, 2017
Messages
8
Hello,

I have a host (k2) with a shared directory /mnt/collab. I want to provide my VM, annex-vm, total read-write permission to this share. But there is a directory /mnt/collab/annex that I only want to give read-only permission for certain hosts (gpu1 & gpu2). The below exports file gives read-write access for annex-vm to /mnt/collab but I have no access at all to /mnt/collab/scratch or annex. They show up as empty directories.

Code:
[wilhelm@k2 /mnt/collab/annex]$ less /etc/exports
/mnt/collab  -alldirs -maproot="nobody":"nobody" annex-vm
/mnt/collab/scratch  -maproot="nobody":"nobody" gpu1 gpu2
/mnt/collab/annex  -ro -maproot="nobody":"nobody" gpu1 gpu2


Is there a way I can write this exports file so that /mnt/collab is read-write for annex-vm and then /mnt/collab/annex is read-only for gpu1 and 2?

Thanks in advance!
 
Joined
Sep 5, 2017
Messages
8
Sorry, I just realized that /mnt/collab/scratch and /mnt/collab/annex are separate volumes and NFS cannot access through these. Still, I'd like to be able to export /mnt/collab/annex as read-write for my VM and as read-only for my gpu machines. Is there any way to do that?
 
Status
Not open for further replies.
Top