× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




On 24/07/2010, at 12:51 PM, Simon Coulter wrote:

Using NFS between OS/400, Mac, and OS/2 is on my list of things to try
but it's been that way for years. I've got stuff on OS/400 and OS/2
that I'd like to access from my Mac but I just resort to FTP. I'll try
to take a look at it over the next few days and report what I learn.

I succeeded in getting NFS to work between Mac and OS/2, Mac and OS/ 400, and between OS/400 and OS/2. I didn't try to mount a Mac file system on OS/400. The OS/2 part was really easy. OS/400 somewhat less so.

OS/2 (192.168.9.254)
====================
I used tcpcfg2 and added NFS entries for two paths, then linked client systems with those paths. The
<boot>:/mptn/etc/exports
file contained:
e:\simon -alias \shc -rw 192.168.9.12 # Home dir for SHC
e:\common -alias \common 192.168.9.12 192.168.9.1 # Common stuff

This should allow my Mac (192.168.9.12) to mount both \shc and \common and should allow an OS/400 system (192.168.9.1) to mount \common.

OS/400 (192.168.9.1)
====================
I used Navigator to locate File Systems/Integrated File System/Root/ home/shc and then right-clicked and selected NFS Export->Properties from the context menu. In the General tab I accepted the default anonymous user and I checked the "Add to list of permanently defined exports". On the Access tab I set Public to None then clicked Add Host/ Netgroup. My Mac wasn't in the list of known servers so I entered it by IP address and clicked Add-> then clicked OK. Then I selected the new host and clicked Customize. Here I set access rights to Read/Write and took the defaults for everything else. I clicked OK and then clicked Export.

Navigator added the following to /etc/exports
/home/shc RO RW=192.168.9.12:, ACCESS=192.168.9.12:, ROOT=

Then I started the NFS server accepting all defaults.

This should allow my Mac (192.168.9.12) to mount /home/shc

MacOS X [10.5.7] (192.168.9.12)
===============================

I used Finder->Go->Connect to Server. In the Server Address field I typed nfs://192.168.9.254/shc (for OS/2) and clicked Connect. Whir ... whir ... and then a Finder window opened with that directory mounted and displayed. I could navigate and view files.

I used Finder->Go->Connect to Server again. This time I typed nfs:// 192.168.9.1/home/shc (for OS/400) and clicked Connect. Whir ... whir ... and then a Finder window opened with that directory mounted but not available. Error message "The folder 'shc' could not be opened because you do not have sufficient access privileges" was displayed.

I think the cause of this is:
a) the UID of my MacOS profile does not match the UID of any OS/400 profile so the default anonymous user is used.
b) The default anonymous user QNFSANON has no authority to /home/shc

One solution is to grant QNFSANON *RX rights to /home/shc. A better solution is to specify the desired ANON user for this connexion as my own profile. The ideal solution is to ensure that UID and GID values match across all systems in an NFS network.

I granted QNFSANON *RX rights to /home/shc, ran CHGNFSEXP '-A', and connected successfully. I unmounted the connexion and removed QNFSANON authority. Then I edited /etc/exports and added ANON=111 (the UID of my own profile), saved, exited, and ran CHGNFSEXP '-A'. Again I could connect successfully.

I think that if I could change the UID of my profile to match that of my ID on MacOS X then a successful connexion could be made without relying on the ANON attribute. I could not test this because running CHGUSRPRF UID(501) resulted in CPF22DC - Not allowed to change UID of the user profile. The UID of a user profile may not be changed when the profile is the owner of an object in a directory.

OS/400 as NFS Client
====================
Finally I wanted to test OS/400 as an NFS client so I created a mount point:
MKDIR '/common' DTAAUT(*RX)
then I mounted the OS/2 directory
MOUNT TYPE(*NFS) MFS('192.168.9.254:/common') MNTOVRDIR('/common') CCSID(*ASCII)
then WRKLNK '/common/*' showed me the files and I could view the contents.
UNMOUNT TYPE(*NFS) MNTOVRDIR('/common')
removed access to the OS/2 directory.

Although I used Navigator to set the values in /etc/exports this file can be directly edited. I used Navigator because I suspected that it would add attributes not documented in the file comment block. Also the only documentation I could find for NFS is a PDF of:
OS/400 Network File System Support (SC41-5714)
which is not up to the standard of other OS/400 documentation. You can glean the necessary information from it but it's harder than it should be. Looks like a poor rewrite of a Unix manual.

The Information Centre was next to useless although it did give me the link to the PDF mentioned above. Here's an example of how useless it was. A search in the Information Centre for nfs gives a 100% hit on:

:quote.
How to use SAMBA and NFS to access files in the Integrated File System
Users and/or applications of a Linux partition can use a variety of tools to access files stored in the integrated file system. Two of these tools are Network File System (NFS) and SAMBA.
For more information on i5/OS® NetServer support for Samba, refer to Linux on the System i Platform.
:equote.

That doesn't answer HOW at all. In fact, it's just blurb and is no practical use. Following the link (Linux on the System i Platform) just takes you to marketing fluff where a number of the links are broken. Complete waste of time. Most of the other search results simply explained WHAT you could do with NFS and again did not address HOW. The search results for various NFS commands were only useful after I'd already set up the /etc/exports file and then the command help text was more useful.

Anyway, NFS works for me so hopefully you'll get some benefit from the information.


Regards,
Simon Coulter.
--------------------------------------------------------------------
FlyByNight Software OS/400, i5/OS Technical Specialists

http://www.flybynight.com.au/
Phone: +61 2 6657 8251 Mobile: +61 0411 091 400 /"\
Fax: +61 2 6657 8251 \ /
X
ASCII Ribbon campaign against HTML E-Mail / \
--------------------------------------------------------------------




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.