Software Archive
Read-only legacy content
17061 Discussions

Mounting filesystem on a MIC using NFS

Affinito__Fabio
Beginner
1,075 Views

Dear forumers,

I'm trying to mount some directories from the host on the MIC cards using NFS. 


I followed step by step the guide there.
https://software.intel.com/sites/default/files/article/373934/system-administration-for-the-intel-xeon-phi-coprocessor.pdf

My aim was to mount:

(host side)   (mic side)
/opt/intel -> /opt/intel
/home      -> /host

Following the guide, I modified exports
 

[root@terminus filesystem]# cat /etc/exports
#/home/shared    192.168.1.100/24(rw,no_root_squash)
/opt/intel 172.31.1.1(rw,no_root_squash)
/opt/intel 172.31.2.1(rw,no_root_squash)
/home 172.31.1.1(rw,no_root_squash)
/home 172.31.2.1(rw,no_root_squash)


and hosts.allow
 

[root@terminus filesystem]# cat /etc/hosts.allow
#
# hosts.allow    This file contains access rules which are used to
#        allow or deny connections to network services that
#        either use the tcp_wrappers library or that have been
#        started through a tcp_wrappers-enabled xinetd.
#
#        See 'man 5 hosts_options' and 'man 5 hosts_access'
#        for information on rule syntax.
#        See 'man tcpd' for information on tcp_wrappers
#
ALL: 172.31.1.1
ALL: 172.31.2.1


Then I executed the exportfs -a command.

Following the guide, I tried both the micdir and commondir approaches (see page 22). For example, in the commondir case, I created a file fstab under /opt/intel/mic/filesystem/common/etc as following:
 

[root@terminus filesystem]# cat /opt/intel/mic/filesystem/common/etc/fstab
devpts        /dev/pts    devpts    defaults        0 0
tmpfs        /dev/shm    tmpfs    defaults        0 0
sysfs        /sys        sysfs    defaults        0 0
proc        /proc        proc    defaults        0 0
host:/home     /host         nfs     rsize=8192,wsize=8192,nolock,intr 0 0
host:/opt/intel    /opt/intel      nfs     rsize=8192,wsize=8192,nolock,intr 0 0


and
 

[root@terminus filesystem]# cat /opt/intel/mic/filesystem/common/common.filelist
dir /opt/intel 755 0 0
dir /host 755 0 0
file /etc/fstab etc/fstab 664 0 0


Finally I execute the micctrl --resetconfig and I would expect to find the nfs filesystem mounted on the mics but...

 

[root@terminus filesystem]# service mpss stop
Shutting down Intel(R) MPSS:                               [  OK  ]
[root@terminus filesystem]# micctrl --resetconfig
[Warning] mic0: Generating compatibility network config file /opt/intel/mic/filesystem/mic0/etc/sysconfig/network/ifcfg-mic0 for IDB.
[Warning]       This may be problematic at best and will be removed in a future release, Check with the IDB release.
[Warning] mic1: Generating compatibility network config file /opt/intel/mic/filesystem/mic1/etc/sysconfig/network/ifcfg-mic0 for IDB.
[Warning]       This may be problematic at best and will be removed in a future release, Check with the IDB release.
[root@terminus filesystem]# service mpss start
Starting Intel(R) MPSS:                                    [  OK  ]
mic0: online (mode: linux image: /usr/share/mpss/boot/bzImage-knightscorner)
mic1: online (mode: linux image: /usr/share/mpss/boot/bzImage-knightscorner)
[root@terminus filesystem]# ssh mic0
[root@terminus-mic0 ~]# ls /
bin    boot   dev    etc    home   init   lib    lib64  media  mnt    proc   root   sbin   sys    tmp    usr    var
[root@terminus-mic0 ~]# cat /etc/fstab
rootfs        /        auto        defaults        1  1
proc        /proc        proc        defaults        0  0
devpts        /dev/pts    devpts        mode=0620,gid=5        0  0


... nothing... as you can see, the fstab doesn't show that I wanted to mount...
 

Can somebody point out some errors in the procedure that I followed?

Thanks in advance,

Fabio 

0 Kudos
9 Replies
robert-reed
Valued Contributor II
1,075 Views

You hacked the fstab in opt/intel/mic/filesystem/common/etc/?  MPSS 3?  My hacks of fstab for MPSS 3 happened in /var/mpss/mic0/etc, which on my system actually had an existing fstab.  I don't have a "common" under /opt/intel/mic/filesystem on my system.

0 Kudos
Affinito__Fabio
Beginner
1,075 Views

Dear Robert,

what I showed in my post is what is called "CommonDir" method in the guide https://software.intel.com/sites/default/files/article/373934/system-administration-for-the-intel-xeon-phi-coprocessor.pdf

I also tried with the "MicDir" method, i.e. what you mention in your reply. The led to the same result.

To answer your question: yes, MPS 3.3

 

Best,

 

Fabio

 

0 Kudos
robert-reed
Valued Contributor II
1,075 Views

Ravi Murti posted to MIC-AE:

Why doesn’t he try it manually first. He needs to make sure that iptables is disabled, via “service iptables stop”.

Mount –t nfs –o <options> host:<path> <mic_path>

Also run exportfs on the host to check if he’s exporting the right stuff.

Then he can go back and automount things using fstab.

Ravi

I must admit that after trying to follow the templates to add libiomp5.so to the VFS I gave up on the regular templates and started trying to figure out what works.  For you for now I think Ravi's suggestion is a good one.

 

0 Kudos
Affinito__Fabio
Beginner
1,075 Views

Hi,

I tried to manually mount the fs using 

mount –t nfs –o <options> host:<path> <mic_path>

and everything worked as expected. 

It seems like the fstab files (and *.list) on the host are not pushed to the devices.

I will check the iptables as soon as I can.

 

Thanks 

0 Kudos
Affinito__Fabio
Beginner
1,075 Views

I can exclude both the iptables problem:

[root@terminus ~]# service iptables status
iptables: Firewall is not running.

and the exportfs

[root@terminus ~]# exportfs
/opt/intel        172.31.1.1
/opt/intel        172.31.2.1
/home             172.31.1.1
/home             172.31.2.1

As I told before, mounting the filesystem by "brute force" works:

[root@terminus-mic0 /]# mount -t nfs -o rsize=8192,wsize=8192,nolock,intr host:/home /host
[root@terminus-mic0 /]# ls /host/
aca0        ainverni    cin0644a    cin8249a    epascolo    fdirenzo    glevi000    lost+found  paccordi    propro01    schifano    stage001    vruggie1
acv0        cin0420a    cin0848a    cin8294b    eutrial     fstrappa    knikas00    lscorzato   pdagna00    ralfieri    shared      viz
[root@terminus-mic0 /

Any suggestion?

 

Best,

 

Fabio

 

 

0 Kudos
Affinito__Fabio
Beginner
1,075 Views

Problem fixed by following the procedure here:

http://registrationcenter.intel.com/irc_nas/4433/MPSS_Users_Guide.pdf

 

Thanks,

 

F

0 Kudos
robert-reed
Valued Contributor II
1,075 Views

Good to hear you found a solution in the MPSS configuration guide.

If you can find a moment to comment, could you elaborate on what you needed to change to get it to work?  That is, what misconceptions about configuration did the document absolve you of?

0 Kudos
Affinito__Fabio
Beginner
1,075 Views

Hi Robert,

 

there are a lot of differences. On the first case, the guide suggested to manually modify the fstab by editing the /etc/opt/intel/mic/filesystem/micN and the relative filelist (or, alternatively to use the /common/ directory). According to the guide, by executing a micctrl --resetconfig should have led to a permanent change on the MIC cards. For me, this didn't work.

In the second case, the guide prescribes to use the micctrl --addnfs rather than manually editing the files. In addition, it prescribes to create the micuser on the host side, if it does not exist. 

I still don't understand why the two documents seems to be contradictory.

Maybe only the last one is suitable for the MPS 3.3, but I think that it should be more clarified.

 

Best,

 

Fabio

0 Kudos
robert-reed
Valued Contributor II
1,075 Views

Thanks for replying.  I think some of the disparities may be historical--that path to fstab you describe sounds like the path used up through MPSS 2, but with MPSS 3 came a reorganization of configuration files and the move of fstab host image to /var/mpss/micN, as I mentioned above.  The manuals also encourage the use of micctrl options, some of which have only recently arrived.  As the first one in for Intel MIC architecture support on our team, I learned how to do much of this configuration at the filesystem level--even wrote my own Perl script to manage coprocessor user account administration--and so my use of the new options mostly has been just to see what they would do, not because I needed them to get the configuration.  Sometimes I'm surprised by what the micctrl options wrought, but mostly its changes seem consistent with my understanding of the configuration file contents.  And Intel MPSS has been a rapidly moving target over the last couple of years, so I'm not surprised if some details haven't caught up in the documentation.  If you have specific issues about errors, I'm sure our documentation writers would love to hear about them.

0 Kudos
Reply