NFS micuser setup with internal bridge?

NFS micuser setup with internal bridge?

Hi All,

I've setup an NFS as describe in section 7.4 of the MPSS user's guide (mpss 3.2.3); however, I have the cards mount /home on the host, so that all mic cards see the appropriate user directory (which appears to work fine). What I'm not sure about is how to handle the micuser account when the network configuration is setup to use an internal bridge on 10.10.10.x.  

In particular, the manual says to append the following to the exports file

/srv/michome 172.31.0.0/16(rw)

But this ip (172.31.0.0) seems incorrect to me, so I just guessed 10.10.10.0, but that does not make sense to me either. Also, I just used /home for micuser instead of putting it under /srv. I use mostly (only?) use MPI and openMP, so I'm guessing micuser does not give invoked, but I'm nevertheless curious.

Thanks!

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Those directions in section 7.4 really need some work, don't they? They have general directions and home directory directions all mixed together. So, let's try this explanation.

You have a directory on the host, let's call it HOST_DIR. It can be /mic0fs, like they show in instructions 1 and 2 or it can be /srv/michome, like they show in instruction 3 or it could be /home, as I suspect you did on your machine. It is the host's name for whatever directory you want to export from the host to the coprocessor.

You have a directory on the coprocessor, let's call it MIC_DIR. It can be /mic0fs, like they show in instructions 1 and 2 or it can be /home, like they show in instruction 3 and like I suspect you did on your machine. It is the coprocessor's name for whatever directory you want the files exported from the host to pop up in on the coprocessor.

You have an IP address for the coprocessor, let's call it MIC_IP. It can be 172.32.1.1 like they show in instructions 1 and 2. It is whatever /etc/hosts file on the host says it is. It has a subnet address, let's call it MIC_SUB, which is however many octets of the IP address that we have configured it to be. It can be 172.32.0.0/16 like they show in instruction 3. It can be whatever we have configured it to be.

You have an IP address for the host, let's call it HOST_IP. It can be 172.32.1.254 like they show in instructions 1 and 2. It is whatever /etc/hosts file on the coprocessor says it is.

Now, to set up NFS for the coprocessor, Every place you see HOST_DIR, MIC_DIR, MIC_IP or MIC_SUB, substitute the values you have chosen, whatever they are.

Make sure MY_HOST_DIR exists on the host: sudo mkdir -p HOST_DIR

Add the following line to /etc/exports file on the host: HOST_DIR MIC_IP(rw,no_root_squash)

Or use the subnet address if you have multiple coprocessors: HOST_DIR MIC_SUB(rw,no_root_squash)

The no_root_squash is optional, but it is a good thing, so I have put it in both examples.

Add the following line to the /etc/hosts.allow file on the host: ALL:MIC_IP

If you have more than one coprocessor, make sure you add each of them to the /etc/hosts.allow.

Let NFS know that you have changed the configuration files: sudo exportfs -a; sudo service nfs restart

Now would be a good time to stop the MPSS. (You can do it before this point or after this point, but this is a good place to do it.)

Still on the host, use the micctrl command to change the configuration files for the coprocessor: sudo micctrl --addnfs=HOST_IP:HOST_DIR 
--dir=MIC_DIR

Up to this point, I think you have probably done all this and done it correctly. Now let's get to the problem of micuser.

If MIC_DIR is /home, you will need to create a micuser on the host: sudo useradd -U -m -u 400 micuser; sudo groupmod -g 400 micuser 

Make sure micuser has a directory in HOST_DIR: sudo mkdir -p HOST_DIR/micuser; sudo chown micuser HOST_DIR/micuser/; sudo chgrp micuser HOST_DIR/micuser/

And that is the end of the micuser setup.

After I have been messing around with the coprocessor's configuration, I always like to run: sudo micctrl --resetconfig It isn't really necessary here but it is a good habit to get into. Then just restart the MPSS. That should do it.

 

 

Thanks again Frances!  Extremely useful as always!  

Now I understand the lines regarding micuser setup; in particular,

e) Add the following to /etc/exports file:
/srv/michome 172.31.0.0/16(rw)

does not refer to micuser but the whole IP subnet address setup for all the mic cards on the host.  Seems like it would be easier just to use this to save typing IP's for each card separately, as I did originally.

Everything is working well, and the NFS makes running MPI code on the cards much easier.

cheers,

-joe

Leave a Comment

Please sign in to add a comment. Not a member? Join today