AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
  • 1.  Roll Back NFS V4 to NFS V3

    Posted Sat February 05, 2022 10:06 PM
    We have implemented NFS V4 on our NIM (Configuring NIM with NFS V4) and Client LPAR's (IBM AIX : HOW TO SETUP NFSV4 MOUNT IN CLIENT AND SERVER). What if we need to roll back it to version 3?
    1-How to unset local NFS domain on AIX client? 
    2-How to remove NFS domain from NIM master definition?

    Thanks

    ------------------------------
    Rizwan Khaliq
    ------------------------------


  • 2.  RE: Roll Back NFS V4 to NFS V3

    Posted Mon February 07, 2022 05:46 AM

    1. For extra luck, backup the NIM database (default is /etc/objrepos/nimdb.backup) before you start to change stuff.
    2. Before you begin, run a dummy NIM operation on ALL clients so that you actually know if they were working prior to the changes.

    Removing NFS v4 from NIM:

    Option 1:

    - Save nim_object, nim_attr, and nim_pdattr to text files

    - Edit nim_attr to remove the entries related to NFS v4 (you'll need to read the number-to-attributename from nim_pdattr)

    - Load the modified nim_attr.txt: odmdelete nim_attr ; odmadd < nim_attr.txt

    - Recycle nimesis to load the new ODM: stopsrc -s nimesis ; startsrc -s nimesis

    Option 2:

    - delete attribute nfs_domain from master. (get attr from nim_pdattr, and master ID from nim_object)

    - delete attribute nfs_vers from all resources (get attr from nim_pdattr)

    - Recycle nimesis to load the new ODM: stopsrc -s nimesis ; startsrc -s nimesis

    Removing the domain definition from the system (you don't need to do this):

    # rm /etc/nfs/local_domain

    ​# stopsrc -s nfsrgyd​



    ------------------------------
    José Pina Coelho
    IT Specialist at Kyndryl
    ------------------------------



  • 3.  RE: Roll Back NFS V4 to NFS V3

    Posted Mon February 07, 2022 09:33 AM
    Can I ask why you're falling back from NTP v4 to v3?   I ask because I'm considering upgrading from NTP v3 to v4.  Is there something I should know?

    Thanks!

    ------------------------------
    Anker Lerret
    ------------------------------



  • 4.  RE: Roll Back NFS V4 to NFS V3

    Posted Mon February 07, 2022 09:50 AM
    Hi Anker
    I don't anticipate any issues. Just exploring my fail back option just in case.
    Thanks

    ------------------------------
    Rizwan
    ------------------------------



  • 5.  RE: Roll Back NFS V4 to NFS V3

    Posted Tue February 08, 2022 05:32 AM
    Ah....got it.  Thanks and good luck!

    ------------------------------
    Anker Lerret
    Blue Cross Blue Shield of Massachusetts
    ------------------------------



  • 6.  RE: Roll Back NFS V4 to NFS V3

    Posted Tue February 15, 2022 02:26 PM
    Edited by Martin Boban Wed February 16, 2022 01:11 AM
    I have set nfs v4 on NIM and it worked just as well as nfs v3 but remember to set up nfsdomain on each NIM client. Another thing to remember is, if you have scripts using nfs v3 it will not work until is changed to v4 and that might be issue.

    Martin

    ------------------------------
    Martin Boban
    ------------------------------



  • 7.  RE: Roll Back NFS V4 to NFS V3

    Posted Tue February 15, 2022 02:26 PM
    Hi, just would like to add to what Jose posted. Once you set up NFS v4 you can easily clear NFS v4 attribute from NIM resources just running NIM command on then without specifying NFS version. It will clear attribute and NFS v3 will be used as default.

    nim -o change -a nfs_sec="" -a nfs_vers="" resource_name

    But there is one NIM resource nim_script which doesn't recognize "change" operation. NFS v4 attribute on that resource needs to be cleared with odm commands as Jose suggested. Here's I have done it few weeks ago

    root@nim01 /home/root > lsnim -l nim_script
    nim_script:
    class = resources
    type = nim_script
    comments = directory containing customization scripts created by NIM
    Rstate = ready for use
    nfs_vers = 4
    location = /export/nim/scripts
    alloc_count = 0
    server = master
    reserved = yes

    root@nim01 /home/root > odmget nim_pdattr | grep -p nfs_vers
    nim_pdattr:
    class = 2
    subclass = ",12,"
    type = ",24,26,869,27,28,29,30,31,32,33,35,375,36,37,39,40,41,25,401,816,465,591,611,619,641,748,752,754,750,820,840,913,957,937,973,"
    attr = 720
    name = "nfs_vers"
    mask = 3
    value = ""
    h_num = 721
    verbose_num = 350

    root@nim01 /home/root > odmget nim_attr | grep -p value | grep -p -w 720
    nim_attr:
    id = 1641395448
    value = "4"
    seqno = 0
    pdattr = "720"

    root@nim01 /home/root > odmget nim_attr nim_object nim_pdattr | grep -p 1641395448
    nim_attr:
    id = 1641395448
    value = "yes"
    seqno = 0
    pdattr = "60"

    nim_attr:
    id = 1641395448
    value = "master"
    seqno = 0
    pdattr = "100"

    nim_attr:
    id = 1641395448
    value = "/export/nim/scripts"
    seqno = 0
    pdattr = "101"

    nim_attr:
    id = 1641395448
    value = "18"
    seqno = 0
    pdattr = "99"

    nim_attr:
    id = 1641395448
    value = "0"
    seqno = 0
    pdattr = "103"

    nim_attr:
    id = 1641395448
    value = "directory containing customization scripts created by NIM"
    seqno = 0
    pdattr = "57"

    nim_attr:
    id = 1641395448
    value = "4"
    seqno = 0
    pdattr = "720"

    nim_object:
    id = 1641395448
    name = "nim_script"
    class = 2
    type = "41"
    attrs = "1641395448"

    root@nim01 /home/root > odmget -q value=4 nim_attr
    nim_attr:
    id = 1641395448
    value = "4"
    seqno = 0
    pdattr = "720"
    root@nim01 /home/root > odmdelete -o nim_attr -q value=4
    0518-307 odmdelete: 1 objects deleted.
    root@nim01 /home/root > odmget -q value=4 nim_attr

    root@nim01 /home/root > lsnim -l nim_script
    nim_script:
    class = resources
    type = nim_script
    comments = directory containing customization scripts created by NIM
    Rstate = ready for use
    location = /export/nim/scripts
    alloc_count = 0
    server = master
    reserved = yes

    Hope that helps,

    Martin

    ------------------------------
    Martin Boban
    ------------------------------