file system to unix

Upload: vinod-kumar-r

Post on 07-Apr-2018

233 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/4/2019 File System to Unix

    1/22

    Copyright 2006 EMC Corporation. Do not Copy - All Rights Reserved.

    Exporting File Systems to UNIX - 1

    2006 EMC Corporation. All rights reserved. Exporting File Systems to UNIX - 1

    Exporting File Systems to UNIX

    Upon completion of this module, you will be able to:

    Export a mounted file system

    NFS mount a file system from a client

    Identify users and groups

    The objectives for this module are shown here. Please take a moment to read them.

  • 8/4/2019 File System to Unix

    2/22

    Copyright 2006 EMC Corporation. Do not Copy - All Rights Reserved.

    Exporting File Systems to UNIX - 2

    2006 EMC Corporation. All rights reserved. Exporting File Systems to UNIX - 2

    Mounting a File System to a Mountpoint (CelerraManager)

    Right Click File Systems > Left Click Mounts > Mounts

    With Celerra Manager, the file system is mounted, by default, at the time you create it. A file system

    called marketing is shown here. When marketing was created, it was automatically mounted to a

    mountpoint called marketing.

  • 8/4/2019 File System to Unix

    3/22

    Copyright 2006 EMC Corporation. Do not Copy - All Rights Reserved.

    Exporting File Systems to UNIX - 3

    2006 EMC Corporation. All rights reserved. Exporting File Systems to UNIX - 3

    Mounting a File System to a Mountpoint (CelerraCLI)

    [nasadmin@cel1cs0 nasadmin]$ server_mount server_2 fs1 /mp1

    When mounting the filesystem to a Data Mover, the server_mount command is used. By default, the

    filesystem is mounted with read/write permissions and is permanently mounted to the Data Mover.

    Therefore, if the Data Mover is later rebooted for any reason, the filesystem will still be available

    through the Data Mover when the reboot is complete.

  • 8/4/2019 File System to Unix

    4/22

    Copyright 2006 EMC Corporation. Do not Copy - All Rights Reserved.

    Exporting File Systems to UNIX - 4

    2006 EMC Corporation. All rights reserved. Exporting File Systems to UNIX - 4

    Lesson 1: Exporting a Mounted File System (NFS)

    Upon completion of this lesson, you will be able to:

    Understand exporting file systems

    Understand export options

    The objectives for this lesson are shown here. Please take a moment to read them.

  • 8/4/2019 File System to Unix

    5/22

    Copyright 2006 EMC Corporation. Do not Copy - All Rights Reserved.

    Exporting File Systems to UNIX - 5

    2006 EMC Corporation. All rights reserved. Exporting File Systems to UNIX - 5

    Exporting File Systems

    Exporting publishes file systems on the network

    ProtocolsNFS (default)

    CIFS

    To make a Celerra file system available to NFS users, you must export a path to the file system from a

    Data Mover using the server_export command. Each time the server_export command is issued, an

    entry is added to existing entries in an export table. Entries to the table are permanent and are

    automatically re-exported if the system reboots.

    Exporting file systems

    After creating a mountpoint and mounting a file system, you must export the path to allow NFS and/or

    CIFS users to access the system.

    Command

    Paths are exported from Data Movers using the server_export command. This adds an entry to

    the export table. Entries to the table are permanent and are automatically re-exported if the Data

    Mover reboots.

    Export options

    Options used when exporting the file system play an integral part of managing security to the file

    system. You can ignore existing options in an export entry by including the -ignore option. This

    forces the system to ignore the options in the export table and follow the specific guidelines of that

    export.

    It is not necessary to export the root of a file system.

    It is sometimes advantageous to export a directory on the file system rather than the file system itself.

  • 8/4/2019 File System to Unix

    6/22

    Copyright 2006 EMC Corporation. Do not Copy - All Rights Reserved.

    Exporting File Systems to UNIX - 6

    2006 EMC Corporation. All rights reserved. Exporting File Systems to UNIX - 6

    Exporting File Systems (NFS) (CLI)

    Command

    server_export server_2 option

    Example

    server_export server_2 /mp1

    NFS Export Access Modes

    To export a file system for NFS access, use the following command:

    server_export server_2 option

    For example, to export the file system mounted to /mp1 on server_2:

    server_export server_2 /mp1

    Note:

    Refer to the Celerra Command Reference manual for the syntax of this command and the options

    available.

  • 8/4/2019 File System to Unix

    7/22

    Copyright 2006 EMC Corporation. Do not Copy - All Rights Reserved.

    Exporting File Systems to UNIX - 7

    2006 EMC Corporation. All rights reserved. Exporting File Systems to UNIX - 7

    Export Options (NFS)

    Export options can be assigned to: IP Address IP Subnet Netgroup

    Exporting access to an IP subnet

    server_export server_2 oaccess=192.168.160.0/255.255.240.0 /mp1

    Assigning rootprivilege to another host

    server_export server_2 o root=192.168.64.10 /mp1

    Exporting using read mostlyserver_export server_2 o anon=guest,rw=sales /mp1

    Export security options

    The server_export command provides a variety of security options. The various options can be configured

    to reference a(n) IP host address, IP subnet, or Netgroup.

    Anonymous users

    Anonymous users can also be associated with a particular UID. (Celerra will first parse the/.etc/passwd,

    /.etc/hosts, /.etc/netgroups files for resolution of host names, UIDs, and netgroups. An NIS server will then be

    checked if the Data Mover has been configured to do so with theserver_nis command.)

    The anon= option

    The anon= option specifies a UID that will be applied to anonymous users. A value of 0 assigns root privilege

    to unknown users. Alternatively, an organization can create an account for such purposes, such asguest. The

    default is anon=nobody; unknown users will be denied access.

    server_export server_2 o anon=guest /mp1

    Assigning root privilege

    The Celerra Administrator can assign root privilege to a particular entity, such as the networks UNIX

    administrator's workstation.

    server_export server_2 o root=192.168.64.10 /mp1

    Note: Refer to the slide titled Exporting File Systems (NFS) (Celerra Manager) to view the export options

    using Celerra Manager.

  • 8/4/2019 File System to Unix

    8/22

    Copyright 2006 EMC Corporation. Do not Copy - All Rights Reserved.

    Exporting File Systems to UNIX - 8

    2006 EMC Corporation. All rights reserved. Exporting File Systems to UNIX - 8

    Exporting File Systems (NFS) (Celerra Manager)

    Right Click NFS Exports > New

    This slide shows how to export an NFS file system using Celerra Manager.

  • 8/4/2019 File System to Unix

    9/22

    Copyright 2006 EMC Corporation. Do not Copy - All Rights Reserved.

    Exporting File Systems to UNIX - 9

    2006 EMC Corporation. All rights reserved. Exporting File Systems to UNIX - 9

    Unexporting File Systems for NFS (CLI)

    Example - Permanent unexport (most common)

    server_export server_2 u p /mp1

    Example - Temporary unexport (for allmountpoints)

    server_export ALL u t -all

    To unexport a file system permanently:

    server_export server_2 unexport permanent /mp1

    To temporarily unexport all file systems:

    server_export ALL u t all

    Note:

    Refer to the Celerra Command Reference manual for the syntax of this command and the options

    available.

  • 8/4/2019 File System to Unix

    10/22

    Copyright 2006 EMC Corporation. Do not Copy - All Rights Reserved.

    Exporting File Systems to UNIX - 10

    2006 EMC Corporation. All rights reserved. Exporting File Systems to UNIX - 10

    Unexporting File Systems for NFS (Celerra Manager)

    Right Click NFS Exports >Highlight export to delete > Delete

    This slide shows how to permanently unexport an NFS file system using Celerra Manager.

  • 8/4/2019 File System to Unix

    11/22

    Copyright 2006 EMC Corporation. Do not Copy - All Rights Reserved.

    Exporting File Systems to UNIX - 11

    2006 EMC Corporation. All rights reserved. Exporting File Systems to UNIX - 11

    Lesson 2: NFS Mount a File System from a Client

    Upon completion of this lesson, you will be able to:

    Mount a file system from an NFS client

    The objectives for this lesson are shown here. Please take a moment to read them.

  • 8/4/2019 File System to Unix

    12/22

    Copyright 2006 EMC Corporation. Do not Copy - All Rights Reserved.

    Exporting File Systems to UNIX - 12

    2006 EMC Corporation. All rights reserved. Exporting File Systems to UNIX - 12

    Mounting the File System from Clients (NFS)

    NFS mount from client Manual

    Automounted

    Create a local directory

    NFS mount the local directory to the exportedfilesystem

    Example

    # mkdir /studentX

    # mount 192.168.101.20:/mp1 /studentX

    Once the file system has been exported from the Celerra, NFS clients will need to NFS mount the file

    system. When this has been done, NFS redirects any references to a given local directory, out through

    the network, to the file system on the Data Mover. The typical procedure involves the use of a local

    directory, whether pre-existing or created specifically for this purpose.

  • 8/4/2019 File System to Unix

    13/22

    Copyright 2006 EMC Corporation. Do not Copy - All Rights Reserved.

    Exporting File Systems to UNIX - 13

    2006 EMC Corporation. All rights reserved. Exporting File Systems to UNIX - 13

    Nested Mount File System

    Unified file system with a single namespace

    Combination of several individual Celerra file systems

    Resource aggregation for reporting purposesdfserver_dfproperties

    Access control by exports (nested exports)

    Virtual read-only root file system of type NMFSNo space requiredHigher availabilityNo issues with root freezing

    A Nested Mount File System is a collection of individual file systems that can be exported as a single

    share or single mount point. Normally, the collection of file systems remain together after creation;

    although it is possible to remove an individual file system or to break up the collection entirely.

    The space for each Nested Mount File System and each of the component file systems can be

    examined using server_df.

    The space reported for the NMFS will be the aggregation of the space within each of the component

    file systems mounted in it.

    The space reported for each component will be the actual space within the component file system.

    In some cases, the access control associated with a NMFS root may not be sufficient for the entire

    collection of file systems. Thus, NMFS will allow different export controls on each of the component

    file systems. Access to each of the file systems may be individually set via the server_export for

    the component file systems.

  • 8/4/2019 File System to Unix

    14/22

    Copyright 2006 EMC Corporation. Do not Copy - All Rights Reserved.

    Exporting File Systems to UNIX - 14

    2006 EMC Corporation. All rights reserved. Exporting File Systems to UNIX - 14

    Example of Nested Mount File System

    /fs002

    /fs003

    /fs004

    /Nested_1

    Export permissions are set on the NMFS

    Component file systems inherit NMFS permissions

    Component file system can be assigned individual exportpermissions

    - Supersedes the inherited NMFS permissions

    Nested Mount File System

    Component filesystem

    NMFS export

    Component export

    A component (nested) file system will get its permissions one of two ways:

    The user can export the component file system separate from the NMFS file system and give it

    permissions at that time.

    The user can export just the NMFS file system. The component file systems then inherit the

    permissions from the parent (NMFS) file system.

    Example:

    Set export permission to Nested_1 = r/w

    fs002=r/w (inherited)

    fs003=r/w (inherited)

    fs004=r/w (inherited)

    Set export permission to fs002 = r/o

    fs002=r/o (component export)

    fs003=r/w (inherited)

    fs004=r/w (inherited)

    Set export permission to fs004 = root=10.0.0.1

    fs002=r/o (component export)

    fs003=r/w (inherited)

    fs004=root=10.0.0.1 (component export)

  • 8/4/2019 File System to Unix

    15/22

    Copyright 2006 EMC Corporation. Do not Copy - All Rights Reserved.

    Exporting File Systems to UNIX - 15

    2006 EMC Corporation. All rights reserved. Exporting File Systems to UNIX - 15

    Example of Nested Mount File System

    Note: nmfs_fs1 will show the total file systemsize of nested file systems

    The sum of the size of the four component (nested) file systems is equal to the size of the NMFS file

    system (nmfs_fs1).

  • 8/4/2019 File System to Unix

    16/22

    Copyright 2006 EMC Corporation. Do not Copy - All Rights Reserved.

    Exporting File Systems to UNIX - 16

    2006 EMC Corporation. All rights reserved. Exporting File Systems to UNIX - 16

    Lesson 5: Identifying Users and Groups

    Upon completion of this lesson, you will be able to:

    Describe the order of resolution

    Identify users and groups with

    Local files

    NIS

    The objectives for this lesson are shown here. Please take a moment to read them.

  • 8/4/2019 File System to Unix

    17/22

    Copyright 2006 EMC Corporation. Do not Copy - All Rights Reserved.

    Exporting File Systems to UNIX - 17

    2006 EMC Corporation. All rights reserved. Exporting File Systems to UNIX - 17

    Order of Resolution

    UserAccess

    Is a PWor Group

    file onDM?

    Is NISconfigured?

    Parse filesQuery

    NIS

    Is the User/Grouplisted?

    Anonymousaccessgranted

    Accessgranted

    No

    UserAccessUser

    Access

    Is a PWor Group

    file onDM?

    Is a PWor Groupfile onDM?

    Is NISconfigured?

    Is NISconfigured?

    Parse filesParse filesQuery

    NISQueryNIS

    Is the User/Grouplisted?

    Is the User/Grouplisted?

    Anonymousaccessgranted

    Anonymousaccessgranted

    AccessgrantedAccessgranted

    No

    Yes

    No

    Yes

    Celerra Data Movers compare users to UIDs and groups to GIDs using traditional passwd and group

    files or by querying NIS.

    Data movers will check their local /.etc/passwd and /.etc/group files first, and then check with NIS ifthe Data Mover has been configured for NIS.

  • 8/4/2019 File System to Unix

    18/22

    Copyright 2006 EMC Corporation. Do not Copy - All Rights Reserved.

    Exporting File Systems to UNIX - 18

    2006 EMC Corporation. All rights reserved. Exporting File Systems to UNIX - 18

    Users and Groups with Local Files

    Command

    # /nas/sbin/server_user -add passwd

    Example

    # /nas/sbin/server_user server_2 -add -passwd

    itechi

    Place files on Data Mover

    Use server_file command (discussed later)

    Adding users

    Users can be added to/.etc/passwdon a Data Mover with the server_user command. This command opens to a script

    that allows you to create or modify a user account. The server_user command also allows you to add or delete an

    optional password to a user account. This command must be run from the/nas/sbin directory as root.

    # /nas/sbin/server_user server_2 -add -passwd itechi

    Creating new user itechi

    User ID: 1007

    Group ID: 105

    Comment: Ira Techi, IS admin

    Home Directory:

    Shell:

    Changing password for new user itechi

    New passwd:

    Retype new passwd:

    server_2: done

    Password and group files

    In addition to server_user,passwd and group files can be created manually, or copied from another system, and then

    placed into/.etc using the server_file command.

  • 8/4/2019 File System to Unix

    19/22

    Copyright 2006 EMC Corporation. Do not Copy - All Rights Reserved.

    Exporting File Systems to UNIX - 19

    2006 EMC Corporation. All rights reserved. Exporting File Systems to UNIX - 19

    Users and Groups with NIS (CLI)

    To configure a Data Mover to query NIS directly

    Commandserver_nis

    Example

    server_nis server_2 hmarine.com 192.168.64.10,192.168.64.11

    NIS

    NIS (Network Information Service) is a Network service that converts hostnames to IP addresses or IP

    addresses to hostnames. NIS can also be used to store user and group names used in authentication.

    Command syntaxserver_nis server_2 ,

    ,

    Example

    server_nis server_2 hmarine.com 192.168.64.10

    Note: EMC recommends that two NIS servers are configured for each Data Mover for redundancy.

  • 8/4/2019 File System to Unix

    20/22

    Copyright 2006 EMC Corporation. Do not Copy - All Rights Reserved.

    Exporting File Systems to UNIX - 20

    2006 EMC Corporation. All rights reserved. Exporting File Systems to UNIX - 20

    Users and Groups with NIS (Celerra Manager)

    Right click on Network > NIS Settings

    This slide shows how to define an NIS server using Celerra Manager.

  • 8/4/2019 File System to Unix

    21/22

    Copyright 2006 EMC Corporation. Do not Copy - All Rights Reserved.

    Exporting File Systems to UNIX - 21

    2006 EMC Corporation. All rights reserved. Exporting File Systems to UNIX - 21

    Users and Groups with NIS

    Place NIS password and group files on Data Mover

    passwd & grouppasswd & group

    NIS

    Copying passwd and group files onto a Data Mover

    Alternatively,passwdand group files can be copied from the NIS server using ypcat and then

    FTPd to the Data Movers/.etc

    directory usingserver_file.

    Examples

    To copy files from an NIS client, type the following command:

    # ypcat passwd >passwd

    # ypcat group >group

    To copy passwd and group files to Control Station and then FTP these files to the Data Mover, type

    the following command:

    server_file server_2 -put passwd passwd

    server_file server_2 -put group group

  • 8/4/2019 File System to Unix

    22/22

    Copyright 2006 EMC Corporation. Do not Copy - All Rights Reserved.

    2006 EMC Corporation. All rights reserved. Exporting File Systems to UNIX - 22

    Module Summary

    The server_export command, or Celerra Manager is used

    to export a mounted file system for client access A Nested Mount File System is a collection of individual

    file systems that can be exported as a single share orsingle mount point

    Once a file system has been exported from the Celerra,NFS clients need to mount the file system for access

    The key points for this module are shown here. Please take a moment to read them.