NFS - AS400

  • View
    224

  • Download
    6

Embed Size (px)

DESCRIPTION

NFS for AS400

Text of NFS - AS400

  • SG24-2158-00

    Exploring NFS on AS/400

    December 1997

  • International Technical Support Organization

    Exploring NFS on AS/400

    December 1997

    SG24-2158-00

    IBML

  • Take Note!

    Before using this information and the product it supports, be sure to read the general information inAppendix H, Special Notices on page 171.

    First Edition (December 1997)

    This edition applies to the licensed program IBM Operating System/400 (Program 5716-SS1), Version 3 Release 7Modification 0 and licensed program IBM TCP/IP Connectivity Utility for AS/400 (Program 5716-TC1), Version 3Release 7 Modification 0.

    Comments may be addressed to:IBM Corporation, International Technical Support OrganizationDept. JLU Building 107-23605 Highway 52NRochester, Minnesota 55901-7829

    When you send information to IBM, you grant IBM a non-exclusive right to use or distribute the information in anyway it believes appropriate without incurring any obligation to you.

    Copyright International Business Machines Corporation 1997. All rights reserved.Note to U.S. Government Users Documentation related to restricted rights Use, duplication or disclosure issubject to restrictions set forth in GSA ADP Schedule Contract with IBM Corp.

  • Contents

    Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii How This Redbook is Organized . . . . . . . . . . . . . . . . . . . . . . . . . . . viiThe Team That Wrote This Redbook . . . . . . . . . . . . . . . . . . . . . . . . viiiComments Welcome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii i

    Chapter 1. Integrated File System Overview . . . . . . . . . . . . . . . . . . . . 11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Integrated File System Concepts . . . . . . . . . . . . . . . . . . . . . . . . 2

    1.2.1 Stream Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.2.2 File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.2.3 Hierarchical Directory Structure . . . . . . . . . . . . . . . . . . . . . . 31.2.4 Path Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.2.5 Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

    1.3 IFS Menus, Displays, and Commands . . . . . . . . . . . . . . . . . . . . . . 61.3.1 IFS Menus and Displays . . . . . . . . . . . . . . . . . . . . . . . . . . . 61.3.2 IFS Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

    1.4 Characteristics of Individual File Systems . . . . . . . . . . . . . . . . . . . 12

    Chapter 2. Network File System Overview . . . . . . . . . . . . . . . . . . . . . 152.1 NFS Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

    2.1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152.1.2 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152.1.3 NFS as a File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

    2.2 NFS Client/Server Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162.2.1 NFS Client/Server Design and Process Layout . . . . . . . . . . . . . 172.2.2 AS/400 System as an NFS Server . . . . . . . . . . . . . . . . . . . . . 182.2.3 AS/400 System as an NFS Client . . . . . . . . . . . . . . . . . . . . . . 20

    2.3 Lab Environment for this Residency . . . . . . . . . . . . . . . . . . . . . . . 23

    Chapter 3. Operating and Using NFS . . . . . . . . . . . . . . . . . . . . . . . . 253.1 Starting Up the NFS Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

    3.1.1 Typical Startup Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . 253.1.2 STRNFSSVR Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263.1.3 Prerequisites for Using the STRNFSSVR Command . . . . . . . . . . . 29

    3.2 Shutdown of the NFS Server . . . . . . . . . . . . . . . . . . . . . . . . . . . 293.2.1 Typical Shutdown Procedure . . . . . . . . . . . . . . . . . . . . . . . . 293.2.2 ENDNFSSVR Command . . . . . . . . . . . . . . . . . . . . . . . . . . . 303.2.3 Prerequisites for Using the ENDNFSSVR Command . . . . . . . . . . 32

    3.3 Exporting File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323.3.1 Introduction to Exporting File Systems . . . . . . . . . . . . . . . . . . 323.3.2 The Export File System (EXPORTFS) Command . . . . . . . . . . . . . 333.3.3 Using the EXPORTFS Command . . . . . . . . . . . . . . . . . . . . . . 37

    3.4 Mounting File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433.4.1 Introduction to Mounting . . . . . . . . . . . . . . . . . . . . . . . . . . . 433.4.2 Mount Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443.4.3 The MOUNT Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453.4.4 Examples for using the MOUNT Command . . . . . . . . . . . . . . . . 493.4.5 Prerequisites for using the MOUNT Command . . . . . . . . . . . . . . 50

    3.5 Using the /etc Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513.5.1 Editing Files within the /etc Directory . . . . . . . . . . . . . . . . . . . 513.5.2 Using the /etc/exports File . . . . . . . . . . . . . . . . . . . . . . . . . . 54

    Copyright IBM Corp. 1997 iii

  • 3.5.3 Using the /etc/netgroup File . . . . . . . . . . . . . . . . . . . . . . . . . 603.5.4 Other /etc Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

    3.6 Scenarios using the EXPORTFS and MOUNT Command . . . . . . . . . . 623.6.1 Scenario 1 - Using One AS/400 NFS Client . . . . . . . . . . . . . . . . 623.6.2 Scenario 2 - Using an AS/400 System and an AIX NFS Client . . . . . 643.6.3 Scenario 3 - Using AS/400 and AIX NFS Clients with Netgroups . . . 68

    3.7 Locks and Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733.7.1 Importance of Locking . . . . . . . . . . . . . . . . . . . . . . . . . . . . 743.7.2 Locking through NFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 743.7.3 Recovery after Abnormal System Failure . . . . . . . . . . . . . . . . . 75

    Chapter 4. NFS Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 774.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 774.2 UIDs, GIDs, and Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

    4.2.1 User Identification (UID) . . . . . . . . . . . . . . . . . . . . . . . . . . . 774.2.2 Group Identification (GID) . . . . . . . . . . . . . . . . . . . . . . . . . . 804.2.3 Changing UIDs or GIDs for User Profiles Owning Objects . . . . . . . 814.2.4 Access Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 834.2.5 Changing IFS Authorities . . . . . . . . . . . . . . . . . . . . . . . . . . . 864.2.6 Changing the Owner of an Object . . . . . . . . . . . . . . . . . . . . . 894.2.7 Changing the Primary Group . . . . . . . . . . . . . . . . . . . . . . . . 924.2.8 Authority on AIX Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . 934.2.9 Changing Authorities from an AS/400 NFS Client . . . . . . . . . . . . 95

    4.3 Creating Objects from NFS Clients . . . . . . . . . . . . . . . . . . . . . . . 964.3.1 Creating Objects from an AIX NFS Client . . . . . . . . . . . . . . . . . 964.3.2 Creating Objects from an AS/400 NFS Client . . . . . . . . . . . . . . . 98

    4.4 Special Considerations on Exported File Systems . . . . . . . . . . . . . 1024.5 Security Checking Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . 103

    Chapter 5. National Language Support . . . . . . . . . . . . . . . . . . . . . . 1175.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1175.2 Code Pages within NFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118

    5.2.1 Mounting File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . 1185.2.2 Exporting File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . 1205.2.3 NLS using an AIX Client . . . . . . . . . . . . . . . . . . . . . . . . . . 123

    5.3 Character Conversion through the Network . . . . . . . . . . . . . . . . . 1235.4 Creating and Using Your Own Conversion Tables . . . . . . . . . . . . . 125

    Chapter 6. Migrating from FSS/400 to NFS . . . . . . . . . . . . . . . . . . . . 1336.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1336.2 Difference between FSS/400 and NFS V3R7 . . . . . . . . . . . . . . . . . 1336.3 Performing the Migration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

    6.3.1 Migrating the Security . . . . . . . . . . . . . . . . . . . . . . . . . . . 1356.3.2 Migrating the Exported File Systems . . . . . . . . . . . . . . . . . . . 137

    Chapter 7. Common Problems Encountered in NFS . . . . . . . . . . . . . . . 1437.1 Typical Problems in Startup of NFS Server . . . . . . . . . . . . . . . . . 1437.2 Typical Problems with NFS Security . . . . . . . . . . . . . . . . . . . . . . 1487.3 Problems with Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . 152

    Appendix A. Layout and Rules of the /etc/exports File . . . . . . . . . . . . . 153

    Appendix B. Layout and Rules of the /etc/netgroup File . . . . . . . . . . . . 157

    Appendix C. NLS Code Page Example . . . . . . . . . . . . . . . . . . . . . . . 159

    iv Exploring NFS on AS/400

  • Appendix D. Installation of the Edit File (EDTF) command . . . . . . . . . . . 161

    Appendix E. CHOWN() API Description . . .