You are not logged in.

#1 2015-05-05 23:30:55

ambsace
Member
Registered: 2015-05-05
Posts: 5

Users for a diskless system with NFSv4

I'm trying to set up the root filesystem for a diskless Arch client on an NFSv4 share.  It just dawned on me that, based on my understanding of user mapping for NFSv4 (user mapping by name rather than numeric UID), any user that owns files on the client system will need to exist or be explicitly mapped to a user on the file server, otherwise the files will end up owned by nobody.

Is that accurate?  How do other people handle diskless sytems with NFSv4?  I'd rather not have to set up NIS or Kerberos, if it can be avoided.  The file server in my case is a FreeBSD box so the systemd and daemon users won't necessarily match up.

Does anyone have experience with this?

Offline

#2 2015-05-06 02:18:17

branch
Member
Registered: 2014-03-16
Posts: 209

Re: Users for a diskless system with NFSv4

Basically, yes, that is my understanding. I am no expert on this by any means, but i set up a few diskless Arch systems a while back and came to the conclusion that I should use NFSv3 instead for that reason. It seemed to me not only would all usernames on the mount need to exist on the client, but they would need to exist along with idmapd before the root filesystem gets mounted. That would mean starting idmapd in the initrd and either having the user database in the initrd or starting ypbind in the initrd all prior to mounting the rootfs. Too much complexity for no obvious benefit.

Offline

#3 2015-05-06 02:25:44

Tarqi
Member
From: Ixtlan
Registered: 2012-11-27
Posts: 179
Website

Re: Users for a diskless system with NFSv4

ambsace wrote:

... root filesystem for a diskless ...

Since there is no second system, there are no users which need to be mapped.


Knowing others is wisdom, knowing yourself is enlightenment. ~Lao Tse

Offline

#4 2015-05-06 03:29:09

ambsace
Member
Registered: 2015-05-05
Posts: 5

Re: Users for a diskless system with NFSv4

Tarqi wrote:
ambsace wrote:

... root filesystem for a diskless ...

Since there is no second system, there are no users which need to be mapped.

There's a sort of beauty in that, it's like a koan or something.

In real life, though, my diskless system has (or will have) a root filesystem, on a disk array in a different system.

It does seem like setting up NFSv3 might be the right thing to do.

Offline

#5 2015-05-06 03:36:17

Tarqi
Member
From: Ixtlan
Registered: 2012-11-27
Posts: 179
Website

Re: Users for a diskless system with NFSv4

ambsace wrote:

In real life, though, my diskless system has (or will have) a root filesystem, on a disk array in a different system.

So, what I'm missing here? A diskless system will boot from network and maps the root filesystem via nfs. This is comparable to a local installation, where is a second system involved here?

Ok, got it. You mean the user mappings between the root filesystem of the diskless system and the fileserver itself. Because you talked from a "client", I thought you are talking about the mapping from a "client" machine to the nfs structure. Sorry for the noise.

Edit: Typos and more...

Last edited by Tarqi (2015-05-06 03:45:08)


Knowing others is wisdom, knowing yourself is enlightenment. ~Lao Tse

Offline

#6 2015-05-06 12:33:27

ambsace
Member
Registered: 2015-05-05
Posts: 5

Re: Users for a diskless system with NFSv4

Ah, sorry I wasn't more clear.  Yes, I by client I meant the diskless system.

Offline

#7 2015-05-06 14:25:33

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,415

Re: Users for a diskless system with NFSv4

The fileserver is impervious to what happens on the diskless client, but sure you can match the uids no problem there.  If nothing else, you could sshfs into the fileserver for the files you want inside the diskless client.  But I started doing diskless clients when it was nfs3 and it's become somewhat of a habit, or difficult to unlearn previous habits.  It is an argument to your kernel to do that.  Usually when I've done it, I think it is mounted root with some rootsquash options in there in the fileserver's /etc/exports.  I haven't had much success with a diskless client's /etc/fstab.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

Board footer

Powered by FluxBB