Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Preserve permissions and ownership perfectly--nfs4 share
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 2481

PostPosted: Thu May 12, 2022 7:09 pm    Post subject: Preserve permissions and ownership perfectly--nfs4 share Reply with quote

Hi Guys
I recently experimented a bit with diskless systems.
I managed to get iscsi boot without problems but nfsroot was very tricky.
My /etc/exports were a bit like
Code:

/srv/nfs *(rw,fsid=0,no_all_squash,no_root_squash,subtree_check)
/srv/nfs/arch *(rw,nohide,no_all_squash,no_root_squash,subtree_check)

I configured --properly I think rpc.idmapd making it a needed service for nfs server etc.
I created a rootfs in /srv/nfs/arch.
Shared wuth nfs.
Started a vm.
Mounted the nfs share ok. (mount -t nfs4 -o rw <server>:/share /mnt)
Permissions seemed ok from a very rough "ls -l /mnt"
Chrooted ok
Some things were working ok--like creating and deleting files and dirs and using coreutils.
But I got a lot of "invalid argument" "permissions denied" and "file exists"errors.
For example i had to use a "force overwrite" clause when using package manager.
It must be some weird nfs perm/ownership issue.
I know a lot of people use nfs to share portage.
Some even use it for home dirs.
My question is how do you guys do it?
How to perfectly preserve perms and ownership via nfs?
What flags should I use for sharing and what for mounting?
The host is Gentoo.
Vm was Debian and Arch.
I am willing to give it again a try.

Thanks a lot.
_________________
:)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum