Managing NFS with Autofs

Similar documents
Maintenance of /etc/fstab in large network Crashed NFS server will make operation blocked


Sun Certified System Administrator for the Solaris 10 OS Bootcamp

Figure 1. A union consists of several underlying branches, which can be of any filesystem type.

Chapter 12 Distributed File Systems. Copyright 2015 Prof. Amr El-Kadi

An NFS Replication Hierarchy

CSE 265: System and Network Administration

Service and Cloud Computing Lecture 10: DFS2 Prof. George Baciu PQ838

Federated Namespace BOF: Applications and Protocols

Distributed File Systems

Lecture 14: Distributed File Systems. Contents. Basic File Service Architecture. CDK: Chapter 8 TVS: Chapter 11

Distributed File Systems. Directory Hierarchy. Transfer Model

PCP: Ingest and Export

Manage Directories and Files in Linux. Objectives. Understand the Filesystem Hierarchy Standard (FHS)

Serviceguard NFS Toolkit A , A and A Administrator's Guide

Network File System Andrew File System NetWare Core Protocol Server Message Block Common Internet File System

CSE 486/586: Distributed Systems

NFS Version 4 Update

Installation Tools for Clusters. Rajesh K., Computer Division, BARC

Cloud Computing CS

File System Internals. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Scale-out Storage Solution and Challenges Mahadev Gaonkar igate

Filesystems Overview

FreeBSD Jails vs. Solaris Zones

Solaris TM Containers for System {Admins, Architects, Engineers} and Technical Trainers

Filesystem. Disclaimer: some slides are adopted from book authors slides with permission

Network File System (NFS)

Network File System. Network File System (NFS) NFS Advantages. Network File System Disadvantages

Today: Distributed File Systems. File System Basics

OS Containers. Michal Sekletár November 06, 2016

DFS Case Studies, Part 1

Operating Systems 2010/2011

Today: Distributed File Systems

GFS: The Google File System

An introduction to Docker

Computer Systems Laboratory Sungkyunkwan University

File System: Interface and Implmentation

Manually Mount Usb Flash Drive Ubuntu Server

Attempt To Configure Dhcp Server Failed With Error Code The Rpc Server Is Unavailable

1 Virtualization Recap

Advanced Operating Systems

Announcements. Reading: Chapter 16 Project #5 Due on Friday at 6:00 PM. CMSC 412 S10 (lect 24) copyright Jeffrey K.

Think Small to Scale Big

Oracle 1Z Oracle Solaris 11 System Administration.

Lecture 2: The file system

Category: Informational October 1996

COS 318: Operating Systems. NSF, Snapshot, Dedup and Review

Operating Systems CMPSCI 377 Spring Mark Corner University of Massachusetts Amherst

System that permanently stores data Usually layered on top of a lower-level physical storage medium Divided into logical units called files

416 Distributed Systems. Distributed File Systems 1: NFS Sep 18, 2018

SSSD. Client side identity management. LinuxDays 2012 Jakub Hrozek

IPS Packaging for Oracle Solaris 11

UNIX DEVELOPMENT ENVIRONMENT. Principles of Design. 13 th September, 2003 Greg White, Michael Zelazny, Kristi Luchini

Diskless Linux Clusters

AN OVERVIEW OF DISTRIBUTED FILE SYSTEM Aditi Khazanchi, Akshay Kanwar, Lovenish Saluja

Frequently asked questions from the previous class survey

GlusterFS and RHS for SysAdmins

Link Gateway ISO Installation Manual

Outline. Cgroup hierarchies

Operating Systems. Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000) alphapeeler.sf.net/pubkeys/pkey.htm

An Overview of Security in the FreeBSD Kernel. Brought to you by. Dr. Marshall Kirk McKusick

Symbolics Network File System (NFS) User s Guide. Introduction to Symbolics Network File System (NFS)

USER GUIDE. Snow Inventory Agent for Unix. Version 5. Release date Document date SNOWSOFTWARE.COM

Chapter 17: Distributed-File Systems. Operating System Concepts 8 th Edition,

COS 318: Operating Systems. Journaling, NFS and WAFL

ISSN (Online)

COMPARATIVE STUDY OF TWO MODERN FILE SYSTEMS: NTFS AND HFS+

Outline. Cgroup hierarchies

Configuration Management - Using Puppet. lctseng / Liang-Chi Tseng

File Systems. What do we need to know?

Filesystem Hierarchy and Permissions

NFS around the world Tigran Mkrtchyan for dcache Team dcache User Workshop, Umeå, Sweden

Filesystem Hierarchy and Permissions

LINUX FUNDAMENTALS (5 Day)

Oracle on Solaris 10 Containers/Zones

Flatpak a technical walk-through. Alexander Larsson, Red Hat

An Oracle White Paper April Sun Storage 7000 Unified Storage Systems and XML-Based Archiving for SAP Systems

Filesystem. Disclaimer: some slides are adopted from book authors slides with permission 1

Kubernetes Integration with Virtuozzo Storage

CS6601 DISTRIBUTED SYSTEM / 2 MARK

Chapter 11: File-System Interface

1 / 22. CS 135: File Systems. General Filesystem Design

Cloud & container monitoring , Lars Michelsen Check_MK Conference #4

SUN SOLARIS. Course Catalog

The student will have the essential skills needed to be proficient at the Unix or Linux command line.

PostgreSQL on Solaris. PGCon Josh Berkus, Jim Gates, Zdenek Kotala, Robert Lor Sun Microsystems

UNIX File Systems. How UNIX Organizes and Accesses Files on Disk

HDFS Architecture. Gregory Kesden, CSE-291 (Storage Systems) Fall 2017

Home Page. Title Page. Contents. Page 1 of 17. Version Control. Go Back. Ken Bloom. Full Screen. Linux User Group of Davis March 1, Close.

Using General-Purpose Computer Labs for Online Testing

Glamour: An NFSv4-based File System Federation

XtreemFS: highperformance network file system clients and servers in userspace. Minor Gordon, NEC Deutschland GmbH

Root over NFS on User Mode Linux

RedHat. Rh202. Redhat Certified Technician on Redhat Enterprise Linux 4 (Labs)

RH-202. RedHat. Redhat Certified Technician on Redhat Enterprise Linux 4 (Labs)

System Administration for Beginners

VOFS Manual. Georgios Tsoukalas, ICCS June 28, 2009

File systems: management 1

Distributed File Systems. File Systems

Getting Started Guide. Installation and Setup Instructions. For version Copyright 2009 Code 42 Software, Inc. All rights reserved

Transcription:

Managing NFS with Autofs Brent Callaghan Sun Microsystems, Inc. brent.callaghan@sun.com Page 1 of 28

What s Coming... Some history Direct Maps Indirect Maps Master Map Executable Maps Map Sources Offset Mounts Mount Options Multiple Mounts Replica Servers Map Variables Key Substitution Auto-unmounting Autofs Mounts Visible Directories and finally some Recommendations Page 2 of 28

In the beginning - The Automounter No kernel changes - loopback NFS Open /foo App /tmp_mnt/foo Mounts foo NFS Client Automountd (NFS Server) Lookup foo User Kernel (symlink) Page 3 of 28

Enter Autofs A kernel filesystem Eliminates symbolic link Open /foo App Mounts foo Autofs Automountd Lookup foo User Kernel Page 4 of 28

Automounter Maps Map a name to a location Name Location blorf fratzl glolb... rtzblf:/export/fnarg nord:/export/frib zygorf:/export/snitz Page 5 of 28

Direct Maps Directly map autofs mountpoints to locations (not very scalable) Autofs Mountpoints Locations /blorf /usr/fratzl /opt/glolb... rtzblf:/export/fnarg nord:/export/frib zygorf:/export/snitz Page 6 of 28

Indirect Maps Map autofs directory entries to locations (hugely scalable) /home Autofs mountpoint alan jane peter... rtzblf:/export/alan nord:/export/jane zygorf:/export/peter Page 7 of 28

Master Map Establishes initial autofs mountpoints Autofs mountpoint Map name Default mount options /blorf auto_blorf /home auto_home -noquota /- auto_direct +auto_local Page 8 of 28

Executable Maps Generate locations on the fly godzilla #!/bin/sh SERVER=$1 dfshares -h $1 awk {print $1 \t $SERVER : $1 \\ } sort Executable program or script godzilla:/export/shares Page 9 of 28

Executable Maps (cont) Useful for: Map sources that are not directly accessible by automounter. Implementing policy based on client, time of day, location, etc. Highly dynamic location data. Page 10 of 28

Map Sources Maps managed in local files or in a variety of name services. NIS NIS+ Files Automounter LDAP Page 11 of 28

Offset Mounts Trigger Directory /net (autofs) NFS Mountpoint /kinky /usr /local /bin kinky /usr/local/bin kinky:/usr/local/bin Offset path Page 12 of 28

Offset Mounts (cont) Offsets useful for constructing a mounted namespace on10 \ /archives stub:/export/archives \ /Codemgr_wsdata stub:/export/gate/codemgr_wsdata \ /deleted-files stub:/export/gate/deleted-files \ /packages stub:/export/packages \ /proto stub:/export/gate/proto \ /public stub:/export/gate/public \ /usr stub:/export/gate/usr Offset paths Page 13 of 28

Mount Options (optional) Map entries can have mount options for each mount that override the map default. bandersnatch -ro,noquota frumious:/jabber But keep them to a minimum! Use mount defaults or map defaults Page 14 of 28

Multiple Mounts A single map entry can initiate multiple mounts key offset location { offset location }... on10 \ /archives stub:/export/archives \ /Codemgr_wsdata stub:/export/gate/codemgr_wsdata \ /deleted-files stub:/export/gate/deleted-files \ /packages stub:/export/packages \ /proto stub:/export/gate/proto \ /public stub:/export/gate/public \ /usr stub:/export/gate/usr Page 15 of 28

Replica Servers A map entry can have multiple locations if the location is replicated. key location {location }... pkg pkg pkg server1:/pkg server2:/pkg server3:/pkg server1,server2,server3:/pkg server1,server2(1),server3(2):/pkg Weighting reduces preference Page 16 of 28

Replica Servers (cont) Replica list ordered by: My host Same server My subnet (subject to weighting) My network (subject to weighting) Solaris mounts entire list if read-only Otherwise, mount the best Page 17 of 28

Map Variables Select a mount based on a client characteristic /usr/local/bin server1,server2:/export/local/$osname using map variable text in exported path share /export/local/linux share /export/local/solaris share /export/local/macosx share /export/local/netbsd share /export/local/hpux Page 18 of 28

Map Variables (cont) Most useful map variables are predefined Variable Meaning Derived From $ARCH Architecture type uname -m I86pc $CPU Processor type uname -p I386 $HOST Hostname uname -n dinky Example $OSNAME Operating system name uname -s solaris $OSREL Operating system release uname -r 5.7 $OSVERS Operating system version uname -v Generic & Insert key text Entry key Page 19 of 28

Key Substitution The map key often reappears in the location arnold homeserve:/export/home/& brian homeserve:/export/home/& charles homeserve:/export/home/& jane tinytots:/export/home/& kim tinytots:/export/home/& oscar homeserve:/export/home/& rumplestiltskin tinytots:/export/home/& Page 20 of 28

Auto-unmounting Without auto-unmounting, mounts would pile up Every 5 min, automountd attempts to unmount Multiple mounts are unmounted in a bottom-up fashion. Page 21 of 28

Autofs Mounts Map entries default to NFS, but other filesystems can be mounted, incl autofs! src -fstype=autofs auto_src Mount option Location is map name Can use a hierarchy of autofs mounts to build a flexible, hierarchical namespace. Page 22 of 28

Autofs Mounts (cont) Namespace using autofs hierarchy /shared auto_master auto_shared auto_shared home local pkgs src -fstype=autofs auto_home aa,bb,cc:/export/local/$arch -fstype=autofs auto_pkgs -fstype=autofs auto_src auto_home arnold homeserve:/export/home/& brian homeserve:/export/home/& charles homeserve:/export/home/& jane tinytots:/export/home/& kim tinytots:/export/home/& oscar homeserve:/export/home/& rumplestiltskin tinytots:/export/home/& Page 23 of 28

Visible Directories Automounter directories used to show only mounted filesystems To avoid mount storms Page 24 of 28

Visible Directories (cont) Solaris 2.6 provided fully visible directories via delayed mounts. Includes a -nobrowse option for huge directories, e.g. /home /net Page 25 of 28

Recommendations Keep it simple! Avoid the use of mount options, map variables, multiple mounts, etc unless they provide real value. Not all automounters are equal. Some cannot handle fancy map technology. Avoid maps in files Yields non-uniform namespace Difficult to distribute, maintain Page 26 of 28

Recommendations (cont) Avoid direct maps use indirect maps. Plan your namespace don t put everything in one map! Test your automounter implementation at Connectathon. Page 27 of 28

Page 28 of 28