0% found this document useful (0 votes)
80 views

Exporting File Systems To UNIX

Completing this module you will be able to: create a mountpoint mount a file system Export a mounted file system from a client Identify users and groups.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views

Exporting File Systems To UNIX

Completing this module you will be able to: create a mountpoint mount a file system Export a mounted file system from a client Identify users and groups.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

Exporting File Systems to UNIX, 1

Exporting File Systems to UNIX

EMC Global Education


2004 EMC Corporation. All rights reserved.

Exporting File Systems to UNIX, 2

Exporting File Systems to UNIX


After completing this module you will be able to: Create a mountpoint Mount a file system Export a mounted file system NFS mount a file system from a client Identify users and groups

EMC Global Education


2004 EMC Corporation. All rights reserved.

Exporting File Systems to UNIX, 3

Lesson 1: Creating a Mountpoint


Process overview Mountpoints Creating a mountpoint

EMC Global Education


2004 EMC Corporation. All rights reserved.

Exporting File Systems to UNIX, 4

Process Overview
Existing File System Create Mountpoint Mount FS to Mountpoint Export Mounted FS NFS Mount from Clients
EMC Global Education
2004 EMC Corporation. All rights reserved. 4

Exporting file systems to UNIX Before a file system can be accessed by clients, the file system must be mounted and exported. After creating a file system on the Symmetrix or CLARiiON using the nas_fs command: The Celerra administrator must:
Create a mountpoint on a Data Mover. Mount the file system to the mountpoint. Export the mounted file system.

The clients must remotely mount the exported file system.

Exporting File Systems to UNIX, 5

Mountpoints
Create Mountpoint Mount FS to Mountpoint Export Mounted FS NFS Mount from Clients

File systems are mounted to mountpoints Mountpoints are located on Data Movers When mounting a file system with the CLI, a mountpoint is created automatically When creating a file system with Celerra Manager, it is mounted automatically File systems can be mounted to directories (subdirectories)
File system fs1 mounted to /mp1/dir1

EMC Global Education


2004 EMC Corporation. All rights reserved.

Creating a mountpoint A mountpoint can be created on a Data Mover before you can mount a file system. The Celerra will create the mountpoint when a file system is mounted. You must delete the mountpoint manually (with CLI, the GUI deletes the mountpoint when the file system is deleted). Each file system can be mounted (rw) on only one mountpoint, and each mountpoint can provide access to one file system at a time. Celerra supports having multiple Data Movers mounting the same file system concurrently only if all mounts are read only. The read only (ro) and read write (rw) mount options are discussed in relation to the server_mount command. Naming mountpoints Mountpoint names must begin with a "/" followed by alphanumeric characters (for example, /new). Mounting a file system You can mount a file system, rooted on a subdirectory of an already exported file system, as long as the file system has not previously been mounted above or below that mount point. For example:
File system fs1 is mounted to /mp1 Directory /dir1 is create in /mp1 File system fs2 is then mounted to /mp1/dir1 However, file system fs1 cannot be mounted to /mp1/dir1

Maximum number of nested mountpoints The maximum number of nested mountpoints that you can create under a directory is eight. However, you can only mount a file system up to the seventh level.

Exporting File Systems to UNIX, 6

Creating a Mountpoint
Command
server_mountpoint mover_name -create mountpoint

Example
server_mountpoint server_2 c /mp1 server_2: done

EMC Global Education


2004 EMC Corporation. All rights reserved.

To create a mountpoint:
server_mountpoint mover_name -create mountpoint

For example, to create a mountpoint called mp1 for server_2:


server_mountpoint server_2 c /mp1 server_2: done

Note: It is not necessary to create a mountpoint prior to mounting the file system. The mount command will create the mountpoint and mount the file system. The name of the mountpoint will be the file system name.

Exporting File Systems to UNIX, 7

Lesson 2: Mounting a File System


Mounting options Mounting a file system to a mountpoint Unmount a file system

EMC Global Education


2004 EMC Corporation. All rights reserved.

Exporting File Systems to UNIX, 8

Mounting a File System


Create Mountpoint Mount FS to Mountpoint Export Mounted FS NFS Mount from Clients

Mount the file system to the mountpoint

File System File System fs1 fs1

Mount Point /mp1

EMC Global Education


2004 EMC Corporation. All rights reserved.

Mounting a file system Once you create a mountpoint, you must mount your file system to the mountpoint in order to provide user access. File systems are mounted permanently by default. If you perform a temporary unmount (default), in the case of a system reboot, the mount table is activated and the file system is automatically mounted again.

Exporting File Systems to UNIX, 9

Mounting Options
Mount options
Read-write/read-only Access Checking Policy (CIFS) Opportunistic Locks (CIFS) File Locking (CIFS) Notify (CIFS)

Mount as
Permanent (default) Temporary

EMC Global Education


2004 EMC Corporation. All rights reserved.

Mount options Mount options vary for NFS and CIFS. When performing a mount, you can institute the following options to define the mount: Read-write: When a file system is mounted read-write (default) on a Data Mover, only that Data Mover is allowed access to the file system. No other Data Mover is allowed read or read-write access to that file system. Read-only: When a file system is mounted read-only on a Data Mover, clients cannot write to the file system regardless of the export permissions. A file system can be mounted read-only on several Data Movers concurrently, as long as no Data Mover has mounted the file system as read-write. Additional options for NFS users applicable for the CIFS mount are: File locking Opportunistic locks Notify Access checking policies

Exporting File Systems to UNIX, 10

Mounting a File System to a Mountpoint (CLI)


Command
server_mount server_2 option <options> <file_system> </mountpoint>

Example
server_mount server_2 fs1 /mp1

Additional examples in Notes section

EMC Global Education


2004 EMC Corporation. All rights reserved.

10

Command syntax To mount a file system to a mountpoint, type the following command: server_mount server_2 option <options> <file_system> </mountpoint> Examples To mount file system fs1 to mountpoint /mp1 on server_2, type the following command: server_mount server_2 fs1 /mp1 To mount the file system as read-only, type the following command: server_mount server_2 o ro fs1 /mp1 To mount the file system with a UNIX access policy (for CIFS), type the following command: server_mount server_2 o accesspolicy=UNIX fs1 /mp1 Mountpoint options can be combined by separating each option with a comma when typing the command, for example: server_mount server_2 o rwlock,nooplock fs1 /mp1

Exporting File Systems to UNIX, 11

Mounting a File System to a Mountpoint (Celerra Manager)


File Systems

EMC Global Education


2004 EMC Corporation. All rights reserved.

11

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.

Exporting File Systems to UNIX, 12

Unmounting a File System


File systems can be unmounted permanently or temporarily Examples - Permanent unmount
server_umount server_2 p /mp1 server_umount ALL p a

Examples - Temporary unmount


server_umount server_2 -t /mp1

EMC Global Education


2004 EMC Corporation. All rights reserved.

12

Unmounting a file system Celerra file systems can be unmounted permanently or temporarily. Permanent unmount When a file system is unmounted permanently, the file system entries are removed from the mount table and the entries are not remounted at boot up. Examples: To permanently unmount mountpoint /mp1 on server_2, type the following command: server_umount server_2 p /mp1 To permanently unmount all file systems from all mountpoints, type the following command: server_umount ALL p a Temporary unmount When a file system is unmounted temporarily, the entries remain in the mount table and are remounted again when the Data Mover reboots. When a temporary unmount takes place, neither the file system nor the mountpoint can be deleted. Example To temporarily unmount mountpoint /mp1 on server_2, type the following command: server_umount server_2 t /mp1 Note: There is not an option to unmount a file system with Celerra Manager

Exporting File Systems to UNIX, 13

Lesson 3: Exporting a Mounted File System (NFS)


Exporting file systems Export options

EMC Global Education


2004 EMC Corporation. All rights reserved.

13

Exporting File Systems to UNIX, 14

Exporting File Systems


Create Mountpoint Mount FS to Mountpoint Export Mounted FS NFS Mount from Clients

Exporting publishes file systems on the network Protocols


NFS (default) CIFS

EMC Global Education


2004 EMC Corporation. All rights reserved.

14

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.

Exporting File Systems to UNIX, 15

Exporting File Systems (NFS) (CLI)


Command
server_export server_2 option <options> </mountpoint>

Example
server_export server_2 /mp1

EMC Global Education


2004 EMC Corporation. All rights reserved.

15

To export a file system for NFS access, use the following command: server_export server_2 option <options> </mountpoint> 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.

Exporting File Systems to UNIX, 16

Exporting File Systems (NFS) (Celerra Manager)


NFS Exports > New

EMC Global Education


2004 EMC Corporation. All rights reserved.

16

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

Exporting File Systems to UNIX, 17

Unexporting File Systems for NFS (CLI)


Example - Permanent unexport (most common)
server_export server_2 u p /mp1

Example - Temporary unexport (for all mountpoints)


server_export ALL u t -all

EMC Global Education


2004 EMC Corporation. All rights reserved.

17

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.

Exporting File Systems to UNIX, 18

Unexporting File Systems for NFS (Celerra Manager)


NFS Exports > Highlight export to delete > Delete

EMC Global Education


2004 EMC Corporation. All rights reserved.

18

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

Exporting File Systems to UNIX, 19

Export Options (NFS)


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

Exporting access to an IP subnet


server_export server_2 o access=192.168.160.0/255.255.240.0 /mp1

Assigning root privilege to another host


server_export server_2 o root=192.168.64.10 /mp1

Exporting using read mostly


server_export server_2 o anon=guest,rw=sales /mp1
EMC Global Education
2004 EMC Corporation. All rights reserved.

19

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 the server_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 as guest. 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.

Exporting File Systems to UNIX, 20

Lesson 4: NFS Mount a File System from a Client


Mount a file system from an NFS client

EMC Global Education


2004 EMC Corporation. All rights reserved.

20

Exporting File Systems to UNIX, 21

Mounting the File System from Clients (NFS)


Create Mountpoint Mount FS to Mountpoint Export Mounted FS NFS Mount from Clients

NFS mount from client


Manual Automounted

EMC Global Education


2004 EMC Corporation. All rights reserved.

21

Mounting the file system 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.

Exporting File Systems to UNIX, 22

Manual Procedure (Solaris)


Create Mountpoint Mount FS to Mountpoint Export Mounted FS NFS Mount from Clients

Create a local directory


# mkdir /hmarine

NFS mount the local directory to the exported file system


# mount 192.168.101.20:/mp1 /hmarine

EMC Global Education


2004 EMC Corporation. All rights reserved.

22

Example In the example below a directory named /hmarine on a Sun Solaris workstation is being NFS mounted to a Celerra file system that is mounted to /mp1 on a Data Mover with the IP address 192.168.101.20. Similar syntax can be used for other clients supporting NFS. As root create a new directory. # mkdir /hmarine At this point /hmarine is a directory. Performing an ls command on /hmarine should yield no results because the directory is empty. NFS mount /hmarine to the Data Movers /mp1 exported file system. # mount 192.168.101.20:/mp1 /hmarine If a host name resolution solution (such as DNS) has been employed, the command could be as follows: # mount cel1dm2:/mp1 /hmarine After mounting /hmarine to the Data Movers exported /mp1, /hmarine now is a file system, not a directory. An ls command on /hmarine should now yield contents of lost&found (which is at the root of all file systems).

Exporting File Systems to UNIX, 23

Summary of Mounting File Systems for NFS


On Celerra File Server nas_commands
Start with Disk Volumes Create Slice Vol. (optional) Create Stripe Volume (opt) Create Meta Volume Create File System

On NFS Clients

server_commands
Create Mountpoint Mount FS to Mountpoint Export Mounted FS Create Local Directory NFS Mount to Data Mover

EMC Global Education


2004 EMC Corporation. All rights reserved.

23

This slide summarizes what needs to occur when creating a file system, and making it available to NFS clients on the network. 1. A meta volume is created using either a stripe, slice, or disk volume 2. A file system is created on the meta volume 3. Mountpoint is created 4. The file system is mounted to the mountpoint 5. The mountpoint is exported for NFS 6. The NFS client creates a local directory and mounts the remote Celerra file system

Exporting File Systems to UNIX, 24

Lesson 5: Identifying Users and Groups


Order of resolution Users and groups with
Local files NIS

EMC Global Education


2004 EMC Corporation. All rights reserved.

24

Exporting File Systems to UNIX, 25

Order of Resolution
User User Access Access

IsIsaPW PW Is a a PW or Group or Group or Group file on file on file on DM? DM? DM?

No

Is NIS Is NIS configured? configured?

No

Yes
Query Query NIS NIS

Parse files Parse files

Is the Is the User/ Is the User/ User/ Group Group Group listed? listed? ? listed

No

Anonymous Anonymous access access granted granted

Yes
Access Access granted granted
EMC Global Education
2004 EMC Corporation. All rights reserved. 25

User and Group IDs 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 if the Data Mover has been configured for NIS.

Exporting File Systems to UNIX, 26

Users and Groups with Local Files


Command
# /nas/sbin/server_user <mover_name> -add passwd <UID or user name>

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

Place files on Data Mover Use server_file command (discussed later)

EMC Global Education


2004 EMC Corporation. All rights reserved.

26

Adding users Users can be added to /.etc/passwd on 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.

Exporting File Systems to UNIX, 27

Users and Groups with NIS (CLI)


To configure a Data Mover to query NIS directly Command
server_nis <mover_name> <domain_name> <ip address of NIS server(s)>

Example
server_nis server_2 hmarine.com 192.168.64.10,192.168.64.11

NIS

EMC Global Education


2004 EMC Corporation. All rights reserved.

27

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 syntax server_nis server_2 <nis_domain_name> <IP_Addr_of_NIS_server1>, <IP_Addr_of_NIS_server2>, Example server_nis server_2 hmarine.com 192.168.64.10,192.168.64.10 Note: EMC recommends that two NIS servers are configured for each Data Mover for redundancy.

Exporting File Systems to UNIX, 28

Users and Groups with NIS (Celerra Manager)


Network > Services tab

EMC Global Education


2004 EMC Corporation. All rights reserved.

28

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

Exporting File Systems to UNIX, 29

Users and Groups with NIS


Place NIS password and group files on Data Mover

NIS passwd & group passwd & group

EMC Global Education


2004 EMC Corporation. All rights reserved.

29

Copying passwd and group files onto a Data Mover Alternatively, passwd and group files can be copied from the NIS server using ypcat and then FTPd to the Data Movers /.etc directory using server_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

Exporting File Systems to UNIX, 30

Module Summary
Key Points covered in this module: Before a file system can be accessed by clients, it must be mounted and exported from the Celerra. When a file system is mounted read/write on a Data Mover (default), only that Data Mover is allowed access to the file system. When a file system is mounted read-only on a Data Mover, clients cannot write to the file system regardless of the export permissions. The server_mount command is used to mount a file system The server_export command, or Celerra Manager is used to export a mounted file system for client access. Once a file system has been exported from the Celerra, NFS clients need to mount the file system for access.
EMC Global Education
2004 EMC Corporation. All rights reserved. 30

Exporting File Systems to UNIX, 31

Closing Slide

EMC Global Education


2004 EMC Corporation. All rights reserved.

31

You might also like