Migrating NFSv3 to NFSv4 in AIX


 
Thread Tools Search this Thread
Operating Systems AIX Migrating NFSv3 to NFSv4 in AIX
# 1  
Old 10-17-2017
Migrating NFSv3 to NFSv4 in AIX

Hello,

I worked on setting up NFSv3 and NFSv4 (novice) shares separately. I was trying to find a way to migrate existing NFSv3 fileshares to NFSv4 as is.

I found a redbook online called "Securing NFS in AIX". It has good info.

I am able to create a new NFSv4 share, do not know how to upgrade/migrate existing NFSv3 shares.

The only method I knew is remove NFSv3 share and re-create it for NFSv4.

Can you please let me know how I can directly migrate it to v4.

Thank you.
# 2  
Old 10-17-2017
Quote:
Originally Posted by System Admin 77
The only method I knew is remove NFSv3 share and re-create it for NFSv4.
Well, what is wrong with this method? You simply edit /etc/exports (there is a vers=-part in the line which states the NFS version), issue a exportfs -va and you are done. You can even configure every export for several versions of NFS at the same time, so you can transform NFSv3-shares to NFSv3+NFSv4 and in a second step change from NFSv3+NFSv4 to NFSv4 only.

A few caveats, though:

- There are different daemons involved in NFSv3 and NFSv4. Issue an
Code:
lssrc -g nfs

to see if they are indeed all running. For NFSv4 you need nfsd and nfsrgyd, for NFSv3 you need nfsd, biod, rpc.statd, rpc.lockd and rpc.mountd running. For NFSv3 you may also need the portmapper.

- For "scattered" NFSv4 exports you need some static storage: NFSv4 allows for transient filelocks: if you open a file from serverA and this server dies but its exports are also exported via serverB you can resume your work with the same file from serverB while maintaining file- and record-locks. For this you need some static storage where NFS stores these locks.

- NFSv4 uses "NFS-domains" and for a client to mount an export it has to have the same NFS domain configured. Use the command chnfsdomain to display/change the value. My suggestion is to use the same value as the DNS domain because this is rather easy to maintain. Otherwise the name of the domain doesn't matter at all.

I hope this helps.

bakunin
This User Gave Thanks to bakunin For This Post:
# 3  
Old 10-17-2017
Thanks for your time and explanation.

Actually I did used NFSv4 earlier. Do not know I miss something here.


unmounted nfsv3 share on a client.

Just now, I've modified the "/etc/exports" with vers=4 and exported it again on server. Stopped and restarted all the nfs daemons.

restarted nfs daemons on test client machine.
Tried mounting on client,

Code:
Command: OK            stdout: yes           stderr: no

Before command completion, additional instructions may appear below.

mount: 1831-010 server nfsserver not responding: RPC: 1832-015 Remote system error - A remote host refused an attempted connect operation.
mount: backgrounding
nfserver:/nfsv4share/test

---------- Post updated at 03:28 PM ---------- Previous update was at 02:56 PM ----------

Never mind. Its working now for NFSv3. Actually I restarted only 2 daemons(nfsd, nfsrgyd) on server.

Now I've restarted all the NFS daemons. Good with NFSv3.


I cleaned /etc/rmtab and /etc/xtab.

Now the share is exported with NFSv4 only.

domain has set on NFS server and client.


tried mounting, received below error.
Code:
                                                                        COMMAND STATUS

Command: failed        stdout: yes           stderr: no

Before command completion, additional instructions may appear below.

mount: 1831-011 access denied for nfsserver:/admclaim/sandrt
mount: 1831-008 giving up on:
nfsserver:/nfsv4share/test
The file access permissions do not allow the specified action.

Found a IBM link, looking in to it.

IBM How to troubleshoot NFS mounting problems


---------- Post updated at 03:45 PM ---------- Previous update was at 03:28 PM ----------

Tried checking IP and hostname etc as shown in the link. I believe this is something different, that only occurs on NFSv4 ?

Please suggest. Thank you.

---------- Post updated at 05:56 PM ---------- Previous update was at 03:45 PM ----------

I've tried mounting using smitty (just like NFSv3). It did not work.

then I ran below command on client, it worked. As per the Redook, I should be able to use same smitty mount options for NFSv4 as well. Correct me If am wrong.

Code:
mount -o vers=4 nfsserver:/nfsshare/test /mnt


How do I verify whether my client is using NFSv4.


because I still see mountd and lockd daemons.

Code:
>rpcinfo -p
   program vers proto   port  service
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    200006    1   udp   2049
    200006    4   udp   2049
    200006    1   tcp   2049
    200006    4   tcp   2049
    100005    1   tcp  36732  mountd
    100005    2   tcp  36732  mountd
    100005    3   tcp  36732  mountd
    100005    1   udp  61488  mountd
    100005    2   udp  61488  mountd
    100005    3   udp  61488  mountd
    400005    1   udp  61489
    100024    1   tcp  36733  status
    100024    1   udp  61493  status
    100133    1   tcp  36733
    100133    1   udp  61493
    200001    1   tcp  36733
    200001    1   udp  61493
    200001    2   tcp  36733
    200001    2   udp  61493
    100021    1   udp  61571  nlockmgr
    100021    2   udp  61571  nlockmgr
    100021    3   udp  61571  nlockmgr
    100021    4   udp  61571  nlockmgr
    100021    1   tcp  36755  nlockmgr
    100021    2   tcp  36755  nlockmgr
    100021    3   tcp  36755  nlockmgr
    100021    4   tcp  36755  nlockmgr
    400003    1   udp  62548

Please let me know If there's a way to find out running NFS share version.

Thank you
# 4  
Old 10-18-2017
Try these commands
Code:
mount
mount -v
nfsstat -m

This User Gave Thanks to MadeInGermany For This Post:
# 5  
Old 10-18-2017
Thank you both! Smilie

Code:
[root@nfsclient]/>mount
  node       mounted        mounted over    vfs       date        options
-------- ---------------  ---------------  ------ ------------ ---------------
         /dev/hd4         /                jfs2   Sep 16 17:33 rw,log=/dev/hd8
         /dev/hd2         /usr             jfs2   Sep 16 17:33 rw,log=/dev/hd8
         /dev/hd9var      /var             jfs2   Sep 16 17:33 rw,log=/dev/hd8
         /dev/hd3         /tmp             jfs2   Sep 16 17:33 rw,log=/dev/hd8
         /dev/hd1         /home            jfs2   Sep 16 17:34 rw,log=/dev/hd8
         /dev/hd11admin   /admin           jfs2   Sep 16 17:34 rw,log=/dev/hd8
         /proc            /proc            procfs Sep 16 17:34 rw
         /dev/hd10opt     /opt             jfs2   Sep 16 17:34 rw,log=/dev/hd8
         /dev/livedump /var/adm/ras/livedump jfs2 Sep 16 17:34 rw,log=/dev/hd8
         /dev/fslv00      /app/test/        jfs2  Sep 16 17:34 rw,log=/dev/loglv00
nfsserver /nfs4shre    /nfs4mntpt           nfs4  Oct 17 17:52 vers=4

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. AIX

Upgrading to AIX 7 vs migrating

Hi all, I have this weird notion that upgrading the TL does not cause the machine to wipe, but upgrading a major version (from aix 6 to 7) means it's actually a fresh install and will wipe the date and i have to install the software again (TSM server, for instance). Trying to google it, i came... (3 Replies)
Discussion started by: tde3000
3 Replies

2. AIX

Migrating from HP Unix to IBM AIX 6.1

HI , We are in process to migrate from UNIX to AIX 6.1 version . I need to understand differences between commands that are used in UNIX and AIX. I want to make sure AIX has all command options avaliable from HP Unix.If any mismatch it should be addressed . Since many commands are used it... (2 Replies)
Discussion started by: Perlbaby
2 Replies

3. AIX

Migrating RHEL 5 UNIX users to AIX

Hi, I'm able to migrate UNIX users/groups from Solaris to AIX (with same password using 13-char encrypted password from shadow file) but no luck with RHEL 5 to AIX. I see encrypted password in RHEL 5 is bit lengthier than 13-char. Is there any way to convert encrypted password such that same... (1 Reply)
Discussion started by: reddyr
1 Replies

4. AIX

Migrating a NIM Server to AIX 6.1

Guys, We are planning to upgrade one of our NIM server to AIX 6.1 from 5.3... Since the server itself is a NIM Server we can't perform it via NIM & I'm choosing to do CD install.. The Install method would be Upgrade installation. Is there anything special that I need to consider before... (5 Replies)
Discussion started by: kkeng808
5 Replies

5. AIX

AIX Servers Ugrading or Migrating

:( Hi Grue, I am very new in AIX/UNIX environment. Please give me answer that during the upgrading or Migrating to 6.1 the AIX Server the applications of this server is accessible to Apps users or not? Thanks (2 Replies)
Discussion started by: Tahniet
2 Replies

6. AIX

Migrating C Application from AIX to Linux

Hi All, I am currently facing new problem of migrating C(c language) application from AIX machine to Linux machine. We are using GCC to compile the source code.. But facing with the compilation issues, with lot of GCC C libs differing between AIX box to Linux box... Pls help me... (3 Replies)
Discussion started by: karthikc
3 Replies

7. AIX

migrating easytrieve from Z/OS to AIX platform

Hi, my requirement is to migrate easytrieve running on Z/OS to AIX platform. can anyone let me know what changes should be made if we do such a migration. (0 Replies)
Discussion started by: rohit510
0 Replies

8. AIX

Migrating AIX users to Linux

Hi all, I was wondering if anyone out there knew if it was possible to migrate users from AIX to Linux. What we want to do is install OpenLDAP on a Linux machine and port all the users over to LDAP. I've googled around and could only find a few things, such as mrgpwd - but that only comes... (0 Replies)
Discussion started by: djcronos
0 Replies

9. AIX

Problem with migrating from AIX 5.1 to 5.3

I'am migrating from AIX 5.1 to 5.3 during migration installation a receive message enough space for dir /usr. My question is : how i can resolve this problem ? i can't reboot my server i hope that there is a command to obtain a spece without go out from installation procedure pannel... I'am... (0 Replies)
Discussion started by: tt155
0 Replies
Login or Register to Ask a Question