Accessing NFS from AIX on Synology (broken)
#1
Accessing NFS from AIX on Synology (broken)
I have a rather nice Synology DS218 (and also a single disk one for scratch work), and--because burning CD-ROMs to endlessly mount on AIX is really unsavoury when you run into dependency problem after dependency problem, I've decided to just have an NFS share to resolve all of the hassle. But of course there are caveats when creating an NFS share for AIX so I'm creating this thread to document my experience.

#1 First thing I was curious about is... how does AIX respond to synologies, if there are any caveats? This notice from this website seems to imply such by claiming AIX needs adjustment to work with a Linux NFS share (otherwise it only partially works???): http://www.gigahype.com/mount-nfs-share-aix-6-1/
So I go ahead and run the following (on AIX 5.3):
Code:
# nfso -o -p nfs_use_reserved_ports=1
nfso: 1485-110 Invalid tunable name -p
nfso: 1831-541 Some parameters were not parsed.
Usage: nfso -h [tunable] | {-L [tunable]} | {-x [tunable]}
           nfso [-p|-r] (-a | {-o tunable})
           nfso [-p|-r] )-D | ({-d tunable} {-o tunable=value}))
           nfso [-c] -a
           nfso -l hostname
           nfso -H enable_ha
           nfso -H disable_ha
           nfso -H sm_register <hostname>
           nfso -H sm_unregister <hostname>
           nfso -H sm_gethost
           nfso -H dump_dupcache <log device>
           nfso -?
I'm not sure why the aforementioned command fails to run because -p is a valid parameter even under AIX, unfortunately the author who posted it doesn't describe what the flags are doing or why they were put there. I'm going to assume this would work in AIX 6.1 and not AIX 5.3? So I go ahead and remove the offending '-p' flag and simply run this:
Code:
# nfso -o nfs_use_reserved_ports=1
Setting nfs_use_reserved_ports to 1
Okay, I guess? So what was the -p for then? And did I even have to run this at all at this point?

Meanwhile it's probably a good idea to actually get the Synology NFS share going, but the first question is... does AIX 5.3 actually support NFS v4? The answer according to IBM, is yes: https://www.ibm.com/support/knowledgecen...fs_v4.html <-- keep in mind this URL will probably change as IBM has been ruthlessly changing their documentation links...

So we go into the Synology: "File Station" and under Create > Create New Shared Folder. I'm naming it AIXTRSFR and using NFS v4 (no reason to use NFS v3 and the above IBM link seems to mention 5.3 may have some challenges with v3 over v4). For now I'm not bothering with encryption, and for the NFS permissions we have the following:
  • Client: 192.168.2.62 <-- I'm just using a random IP (I tried a hostname and it didn't seem to work?)
  • Squash: No mapping
  • Asynchronous: Yes
  • Non-privileged port: Denied <-- not sure if AIX needs this
  • Cross-mount: Denied <-- don't think AIX needs this
  • Security: sys
  • Mount path:/volume1/AIXTRSFR
Okay so let's try to connect this to AIX, I presume that's sufficient. There are a lot of IBM articles and 3rd party articles all over the place (with varying commands), so let's start with this one:
https://www.ibm.com/support/knowledgecen...licit.html
Now I'm not entirely sure what "ServerName" entails, if it's the name of the mount folder, if it's the name of the NAS itself, if it's the IP address of the client share name, or hell, even the IP address of the NAS itself.
So I ran the following to see what would happen:
Code:
# show mount -e synology
showmount: unknown host synology
# showmount -e 192.168.2.62
192.168.2.62: RPC: 1832-018 port mapper failure - RPC: 1832-006 unable to send

Apparently it's useless with NFS v4 according to IBM:
Quote:The showmount command will not work for file systems that were exported only as NFS version 4 file systems. For NFS version 4, the client can mount the root filesystem for the server and traverse the exported directory structure. Individual exported file systems do not have to be explicitly mounted to be accessed by the client.
It's at this point I realize AIX does not automatically initiate TCP/IP, so you have to go to System Manager and actually start the networking subsystem; I forgot about this but yeah. The AIX network wizard can auto configure to go against DHCP so it's no big deal--give it a bit to actually procure a lease or just reboot the system with: shutdown -r now

So I run the NFS mount command and get this:
Code:
# mount server:/volume1/AIXTRSFR /mnt
mount: 1831-009 server not in hosts database
mount: 1831-008 giving up on:
server:/volume1/AIXTRSFR
A route to the remote host is not available.

So then I look at how it is mounted in Linux and tried this, but it's an invalid usage of the command:
Code:
# mount server 192.168.2.62:/volume1/AIXTRSFR /mnt
(invalid usage)

Well I've been at this for a few hours so I'm going to bed, will try again some more tomorrow.

EDIT: well after trying this a few times I noticed that the command at the first URL here, buddy changed the command a bit and I compared it from IBM's official example:
Daily Admin's example: mount server:/path/to/share /mnt
IBM's example: mount ServerName:/remote/directory /local/directory
So the Daily Admin made it look like 'server' was part of mount...

So the correct command would be (which is similar to Linux's):
Code:
# mount 192.168.2.62:/volume1/AIXTRSFR /mnt
mount: 1831-011 access denied for 192.168.2.62:/volume1/AIXTRSFR
mount: 1831-008 giving up on:
192.168.2.62:/volume1/AIXTRSFR
The file access permissions do not allow the specified action.
Of course I get access denied and that's to be expected but I'll figure that out later.
---

I've attempted to add 'Everyone' read access (and even modification access) over this share. However, I don't know if it also needs UNIX permissions and how that carries over to the Synology's share. Also--I'm wondering why credentials can't just be specified at this point.

So after going over a few more articles I decided to actually check if NFS is running (despite mount sort of hinting it is). When I ran lssrc -g nfs two of the NFS services were running but I didn't know if that was enough. It's always easier to see things in the Systems Manager anyways, so I went to: localhost > File Systems > NFS Configuration and it appears the NFS service isn't started, so let's go ahead and get that configured not too unlike the TCP/IP services.

Under the System Manager, the menu bar has "NFS", you'll want to go to NFS > New > NFS Mount (Advanced)
==Tab: Mount Point==
  • Path name of mount point: /mnt <-- if this is left blank the "OK" button will be blanked out, and you must start with a '/' of course
  • Remote host where directory resides: 192.168.2.60
  • Path name of remote directory: /volume1/AIXTRSFR (if you click browse it should show all mount points on the synology! So we know it's working)
  • Mount group name: <left blank>
  • Permissions: read/write (default)
  • Attempt mount in foreground or background: background (default)
  • Allow keyboard interrupts on hard mounts: yes
  • Mount the directory immediately: yes
And then I chose from the radio buttons this option: Add entry to /etc/filesystems. Mount directory on the next system startup. <-- this is so it always gets mounted

And then under 'Options' I made sure it was set to NFS version 4. After click OK we get the same message output as in the terminal. So back to the readme, I noticed there's the following option:
NFS > Configure RPCSEC_GSS > Configure Host Principals > Configure Host Credentials
I then pop in the IP address of the synology and it states it was successful. So the status showing in the System Manager is now:
  • NFS started: no <-- not sure why it says that
  • NFS client mounts: 1
  • NFS exported directories: 0
  • NFS local domain: (synology's IP address)

After running lsfs I do see the mount in there so I'm going to assume it's working??? I'll update this with anything further that I find if not.

"Unlike Windows, OS/2 is a true operating system" - Steven S. Ross, How to Maximize Your PC
(This post was last modified: 07-06-2020, 03:37 PM by micrex22.)
micrex22
PS/2 it!

Trade Count: (0)
Posts: 144
Threads: 27
Joined: May 2018
Find Reply
11-03-2019, 12:25 PM
#2
RE: Mounting NFS from AIX 5.3 to Synology DS218
(11-03-2019, 12:25 PM)micrex22 Wrote:  #1 First thing I was curious about is... how does AIX respond to synologies, if there are any caveats? This notice from this website seems to imply such by claiming AIX needs adjustment to work with a Linux NFS share (otherwise it only partially works???): http://www.gigahype.com/mount-nfs-share-aix-6-1/
So I go ahead and run the following (on AIX 5.3):
Code:
# nfso -o -p nfs_use_reserved_ports=1
nfso: 1485-110 Invalid tunable name -p
nfso: 1831-541 Some parameters were not parsed.
Usage: nfso -h [tunable] | {-L [tunable]} | {-x [tunable]}
           nfso [-p|-r] (-a | {-o tunable})
           nfso [-p|-r] )-D | ({-d tunable} {-o tunable=value}))
           nfso [-c] -a
           nfso -l hostname
           nfso -H enable_ha
           nfso -H disable_ha
           nfso -H sm_register <hostname>
           nfso -H sm_unregister <hostname>
           nfso -H sm_gethost
           nfso -H dump_dupcache <log device>
           nfso -?
I'm not sure why the aforementioned command fails to run because -p is a valid parameter even under AIX, unfortunately the author who posted it doesn't describe what the flags are doing or why they were put there.

Note that in the Usage message, the -p flag comes before the -o flag, and that the name=value part must come immediately after the -o without other intervening options. So swap the -p and the -o in your command line. And according to the man page, the -p seems to be for "persistent": with it your settings will be re-applied at every boot, while without -p they'll only apply for the current session.

SGI:  Indigo, Indigo2, Octane, Origin 300
Sun:  SPARCstation 20 (x4), Ultra 2, Blade 2500, T5240
HP:  9000/380, 425e, C8000
Digital: DECstation 5000/125, PWS 600au
jpstewart
Developer

Trade Count: (1)
Posts: 444
Threads: 6
Joined: May 2018
Location: SW Ontario, CA
Find Reply
11-03-2019, 08:54 PM
#3
RE: Mounting NFS from AIX 5.3 to Synology DS218
(11-03-2019, 08:54 PM)jpstewart Wrote:  Note that in the Usage message, the -p flag comes before the -o flag, and that the name=value part must come immediately after the -o without other intervening options. So swap the -p and the -o in your command line. And according to the man page, the -p seems to be for "persistent": with it your settings will be re-applied at every boot, while without -p they'll only apply for the current session.

That's great info thanks--I don't think running that command is necessary, at least not in terms of getting NFS actually configured.
---

The repeated problem I keep running in to is:
Code:
mount: 1831-009 192.168.2.62 not in hosts database
Still presently investigating as to what AIX needs exactly with the hosts database. It's strange... because I can ping everything *except* the synology in the LAN. It's also strange that the NFS mount *can* see the shared volumes from the synology.

Well after rebooting AIX, I can for some reason ping the IP address again but not the host name. Running showmount -e <synology's IP address> and I do see the NFS volume along with my non-NFS volume
Code:
export list for <synology's IP>
/volume1/AIXTRSFR 192.168.2.62
/volume1/STORAGE SYNOLOGY
But it still complains about the hosts file. So I added the IP address and name to /etc/hosts via the text editor, and now it doesn't complain about the hosts file (really it should have been functional if DNS works for everything else! I wasn't even using the hostname either anyways...). But it's getting stuck at this point:
Code:
NFS lookup failed for server <IP address>: rpc error 7 (RPC: 1842-010 Authentication error) errno 5 NFS lookup failed for server <IP address>: rpc error 7 (RPC: 1831-010 Authentication error) errno 5
Of course it just gets stuck there in a working state indefinitely.

After googling the RPC errors I got something that mentioned some of the same commands at the beginning of the article (except properly written): https://www.lazysystemadmin.com/2011/03/...2-010.html
So I banged the two in:
Code:
nfso -po portcheck=1
nfso -po nfs_use_reserved_ports=1
They inputted just fine, restarted AIX as I had a hung NFS mount attempt. Now when AIX is actually starting up at the login screen, the console at the top right has this:
Code:
statd -a can't get ip configuration
: No such file or directory
statd -a can't get ip configuration
: No such file or directory
statd -a can't get ip configuration
: No such file or directory
NFS server <IP address> not responding still trying
NFS lookup failed for srever <IP address>: rpc error 7 (RPC: 1832-010 Authentication error) errno 5

Which is different from the "NFS lookup failed for server <IP address>: rpc error 7 (RPC: 1842-010 Authentication error) errno 5 NFS lookup failed for server <IP address>: rpc error 7 (RPC: 1831-010 Authentication error) errno 5".

*shrug*
I may actually have to reinstall AIX if it gets permanently stuck at the login there. I didn't think connecting a basic NFS share was going to be this involved, unless I'm doing something wrong. Yeah...it broke the AIX login screen with those -p options that perpetually have it try to connect before you're even logged in yet. I just want to point out it's rather funny that I used the commands that were supposed to fix RPC: 1832-010 when I had RPC: 1842-010 & RPC: 1831-010 which ultimately now caused it to get stuck at RPC: 1832-010.

Okay it's now back on a higher level of AIX from the DVD media, in order to install RPCSEC_GSS you need the krb5.client and modcrypt.base files -- neither of which appear on the AIX 5.3 media (it's actually fairly arcane where to get those)--however I think I am correct to say this is not needed to get NFS set up. So backing up a few steps, in the NFS mount wizard, the authentication by default is "Unix authentication" and then "DES authentication" with a bunch of kerberos options. I'm ASSUMING the kerberos options are when you need RPCSEC_GSS, I'm also going to assume the Synology doesn't have that enabled by default--but I'll have to look more into that later.

So when I do the usual mount point (/mnt with the fully resolvable host name now that I have edited the hosts file and /volume1/AIXTRSFR which appears for both the hostname and IP), I get the usual "the file access permissions do not allow the specified action" blah blah. I'm going to try a few things but of course not make any permanent changes to the config until I know what works and doesn't work.

"Unlike Windows, OS/2 is a true operating system" - Steven S. Ross, How to Maximize Your PC
(This post was last modified: 11-04-2019, 06:36 AM by micrex22.)
micrex22
PS/2 it!

Trade Count: (0)
Posts: 144
Threads: 27
Joined: May 2018
Find Reply
11-04-2019, 12:58 AM
#4
RE: Mounting NFS from AIX 5.3 to Synology DS218
Add a record to /etc/hosts for 192.168.2.62

-Mike
mgtremaine
Octane

Trade Count: (0)
Posts: 53
Threads: 6
Joined: May 2018
Find Reply
11-05-2019, 05:18 PM
#5
RE: Mounting NFS from AIX 5.3 to Synology DS218
So there's a few things I was doing wrong on the Synology side. I basically used this ESXi guide for it because of course, it's going to share a lot of similarities: https://miketabor.com/setup-nfs-on-synol...-esxi-lab/
#1 For some reason under Synology's 'File Services' I never checked off "Enable NFSv4 support", I thought I had... (I also thought there was a radio option listing both NFSv3/NFSv4 somewhere but maybe I was hallucinating or more likely, it was a single-time popup).
#2 When you're creating/editing the NFS rule on the shared folder, the "Hostname or IP*:" is actually referring to the device that's going to be connecting to the Synology (see, I wasn't entirely sure what it meant so I threw in an arbitrary IP address)--so in this case it's going to be the IntelliStation POWER 185. I set a static IP on the router and specified the IntelliStation's IP address as the hostname.

After the Synology is correctly sorted out, after attempting to connect to it I now get different errors depending if I am using the 'Advanced NFS' mount wizard or the 'Simple NFS' mount wizard:
==Advanced NFS Wizard==
Code:
mount: 1831-008 giving up on:
<synology>:/volume/AIXTRSFR
vmount: Operation not permitted.
==Simple NFS Wizard==
Code:
1832-019 Program not registered Verify the NFS local domain has been set, and the nfsrgyd process is running

So I decided to actually see if I could connect via NFSv3, so I checked off the NFSv4 support on the synology and forced AIX to look at it as NFSv3. After attempting to connect it with the simple NFS wizard it says:
Code:
1831-008 giving up on
Strange that it has NOTHING in the error message this time! With the advanced NFS mount wizard we get the same "operation not permitted" with NFSv3.

Okay so I enabled NFSv4 support back on the synology, I ran the nfso port check and reserved port commands to see if this would change anything (on both the advanced and simple NFS mounts). It failed with the NFS simple mount utility. I then ran the advanced NFS mount utility, and holy shit look what we get now:
Code:
Status: Finished. Success
nfs4cl: can not resolve name

Bizarre... I'm guessing that would be the name for the synology but I had already added the hostname in Smile
After running lsfs it's still not present though, so it definitely wasn't a success -- but I'm closer than I ever was before. So it turns out those nfso port commands may seem necessary to connect to a linux-based NFS source after all. I'll update further when I do more tests--I pretty much have to do trial-and-error for every single variation because... (1) I don't know what AIX wants/needs (2) I'm green with NFS, and AIX to a lesser degree

(11-05-2019, 05:18 PM)mgtremaine Wrote:  Add a record to /etc/hosts for 192.168.2.62

-Mike

Hey Mike, yeah I did eventually getting to figuring that out, thanks! Looks like there's still something awry--I only wish it could resolve the synology of all things naturally :p

"Unlike Windows, OS/2 is a true operating system" - Steven S. Ross, How to Maximize Your PC
micrex22
PS/2 it!

Trade Count: (0)
Posts: 144
Threads: 27
Joined: May 2018
Find Reply
11-06-2019, 02:38 AM
#6
RE: Mounting NFS from AIX 5.3 to Synology DS218
So I was finally able to get the NFS share connected to AIX--BUT, whenever I try accessing it in the folder manager, AIX just says it's invalid.

Ergo, I don't think it's possible to get NFS shared from a synology to AIX 5.3 (or AIX at all in general). But, I will try 7.1 later.

Who knows. Another guy said his FreeNAS connected AIX 5.3/6.1/7.1 just fine.

"Unlike Windows, OS/2 is a true operating system" - Steven S. Ross, How to Maximize Your PC
micrex22
PS/2 it!

Trade Count: (0)
Posts: 144
Threads: 27
Joined: May 2018
Find Reply
12-23-2019, 09:43 AM
#7
RE: Mounting NFS from AIX 5.3 to Synology DS218
Alright I'd like to provide an update. I have confirmed the 'correct' way of connecting NFS to AIX -- however I'm still unable to connect any NFS clients to my synology (regardless if they're AIX or Linux). There's something that has to be done with the synology or there's some sort of bug with the GUI; the official synology page isn't covering something that's required or they just flat out broke their NFS support--I'm not sure. I already added the IP addresses of both clients and ensured root_squash wasn't an issue and also that UIDs matched up, but still nope.

So ignoring my previous posts when I was trying to figure everything out-- this is what you should do assuming you're not connecting NFS to a synology (for MANY reasons that I won't get into, using AIX's terminal to set up NFS is far superior than bothering with either SMIT or in 5.3 and 6.1 the graphical system manager because both demand vague fields that are not always clear).


First probe your NFS server to verify any specific details

# showmount -e 1.1.1.1

*replace 1.1.1.1 with the IP or hostname of the NFS server.

Create the full path of where you want to mount, if using /mnt/nfs you'd need to mkdir or create a folder (nfs) with CDE's GUI to that spot.

Next run the special port command to AIX (because by default it does not allow to mount NFS). If you don't do this step you'll get: 1831-008 giving up | "operation not permitted"
# nfso -o nfs_use_reserved_ports=1

Then perform the mount command:
# mount 1.1.1.1:/volume1/AIXTRSFR /mnt/nfs
(or)
# mount -V nfs 1.1.1.1:/volume1/AIXTRSFR /mnt/nfs

*again replacing 1.1.1.1 with the IP or hostname of your nfs server, "volume 1" with the name of the volume, and "AIXTRSFR" with whatever you called your NFS share. Then at the end "/mnt/nfs" with whatever path you've created--if you were using that then it would be a folder called "nfs" inside of /mnt of course.

It's at this point if you try to access /mnt/nfs being served from a Synology you'll get the following error message: File Manipulation Error: Cannot read from /mnt/nfs
And then let's say you've also tried to mount the same directory on Linux with $ sudo mount -t nfs 1.1.1.1/volume1/AIXTRSFR /mnt/nfs, you'll get "mount.fs: access denied by server while mounting 1.1.1.1:/volume1/AIXTRSFR".

My solution is to just not use NFS and instead use FTP. NFS is completely broken with the advent of NFSv4, and there is zero standardization between clients and servers (sometimes they're not sure if they want to use NFSv4 or NFSv3). Stay tuned for a "Accessing FTP on Synology from AIX".

"Unlike Windows, OS/2 is a true operating system" - Steven S. Ross, How to Maximize Your PC
(This post was last modified: 07-05-2020, 09:30 AM by micrex22.)
micrex22
PS/2 it!

Trade Count: (0)
Posts: 144
Threads: 27
Joined: May 2018
Find Reply
07-05-2020, 09:29 AM


Forum Jump:


Users browsing this thread: 1 Guest(s)