+ All Categories
Home > Documents > D69337.pdf

D69337.pdf

Date post: 05-Jul-2018
Category:
Upload: akdenizerdem
View: 213 times
Download: 0 times
Share this document with a friend

of 384

Transcript
  • 8/16/2019 D69337.pdf

    1/383

    System Administration for the

    Oracle Solaris 10 OS Part 1

    Volume II • Student Guide

    D61734GC20

    Edition 2.0

    November 2010

    D69337

  • 8/16/2019 D69337.pdf

    2/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Disclaimer 

    This document contains proprietary information and is protected by copyright and

    other intellectual property laws. You may copy and print this document solely for your

    own use in an Oracle training course. The document may not be modified or altered in

    any way. Except where your use constitutes "fair use" under copyright law, you may

    not use, share, download, upload, copy, print, display, perform, reproduce, publish,

    license, post, transmit, or distribute this document in whole or in part without the

    express authorization of Oracle.

    The information contained in this document is subject to change without notice. If you

    find any problems in the document, please report them in writing to: Oracle University,

    500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not

    warranted to be error-free.

    Restricted Rights Notice

    If this documentation is delivered to the United States Government or anyone using

    the documentation on behalf of the United States Government, the following notice is

    applicable:

    U.S. GOVERNMENT RIGHTS

    The U.S. Government’s rights to use, modify, reproduce, release, perform, display, or

    disclose these training materials are restricted by the terms of the applicable Oracle

    license agreement and/or the applicable U.S. Government contract.

    Trademark Notice

    Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names

    may be trademarks of their respective owners.

    Authors

    Michael Bean

    Venu Poddar 

    Technical Contributors

    and Reviewers

    Mike Lanker John Hathaway

    Venu Poddar 

    Editors

    Richard Wallis

    Smita Kommini

    Graphic Designer

    Rajiv Chandrabhanu

    Publishers

     Nita Brozowski

    Pavithran Adka

  • 8/16/2019 D69337.pdf

    3/383

     

    iii

    Contents

    Preface

    1 Introduction

    Course Introduction: Overview 1-2

    Course Goals 1-3

    Skills Gained in This Course 1-4

    Course Agenda: Day 1 1-5

    Course Agenda: Day 2 1-6

    Course Agenda: Day 3 1-7

    Course Agenda: Day 4 1-8

    Course Agenda: Day 5 1-9

    Supplementary Lessons 1-10

    Introductions 1-11

    Classroom Environment 1-12

    2 Introducing the Oracle Solaris 10 OS Directory Hierarchy

    Objectives 2-2

     Agenda 2-3

    Introducing File Systems 2-4

    File Systems 2-5/ (root) Subdirectories 2-6

    Important System Directories 2-7

    Important In-Memory System Directories 2-10

    Primary Subdirectories Under the /dev Directory 2-13

    Primary Subdirectories Under the /etc Directory 2-14

    Primary Subdirectories Under the /usr Directory 2-16

    Primary Subdirectories Under the /var Directory 2-18

    Quiz 2-19

     Agenda 2-21

    Introducing File Components 2-22

    Quiz 2-24

     Agenda 2-25

    Identifying File Types 2-26

    Regular Files 2-28

    Directories 2-29

  • 8/16/2019 D69337.pdf

    4/383

     

    iv

    Symbolic Links 2-31

    Device Files 2-33

    Quiz 2-36

     Agenda 2-38

    Using Hard Links 2-39

    Creating and Removing Hard Links 2-40

    Creating Hard Links 2-41

    Quiz 2-42

    Practice 2 Overview: Identifying File Types 2-44

    Summary 2-45

    3 Managing Local Disk Devices

    Objectives 3-2

     Agenda 3-3

    Basic Disk Architecture 3-4

    Data Organization on Disk Platters 3-5

    Disk Labels and Partition Tables 3-6

    SMI Disk Label 3-7

    Extensible Firmware Interface (EFI) Disk Label 3-9

    Disk Labels and Partitions 3-10

    x86/x64 Partitions and Slices 3-12

    Naming Conventions for Disk Devices 3-16

    Names for SCSI Disk Devices 3-18

    IDE and SATA Disk Device Names 3-21

    Quiz 3-23 Agenda 3-25

    Oracle Solaris OS Naming Conventions for Devices 3-26

    Logical Device Names 3-27

    Physical Device Names 3-30

    Instance Names 3-34

     Agenda 3-35

    Listing System Devices 3-36

    /etc/path_to_inst File 3-37

    prtconf Command 3-42

    format Utility 3-44

    prtdiag Command 3-46

    Quiz 3-50

     Agenda 3-52

    Performing a Reconfiguration Boot 3-53

    Using the devfsadm Command 3-55

  • 8/16/2019 D69337.pdf

    5/383

     

    v

    Quiz 3-58

     Agenda 3-59

    Partitioning a Hard Disk 3-60

    Introducing Disk Partitioning 3-61

    Recognizing Disk Space and Undesirable Conditions 3-62

    Recognizing Wasted Disk Space 3-65

    Recognizing Overlapping Disk Slices 3-66

    Recognizing Disk Space and Undesirable Conditions 3-67

    Disk Partition Tables 3-68

    fdisk Partition Tables 3-69

    Oracle Solaris OS Partition Tables 3-70

    Disk Labels 3-71

    Partition Table Terms and Usage 3-72

    Using the format Utility 3-74

    Defining Slices on a SPARC System 3-75Using the format Utility to Create fdisk Partitions 3-85

    Defining Slices on an x86/x64 System 3-89

    EFI Label and VTOC Label Comparison 3-98

    EFI Disk Label Restrictions 3-100

    Viewing the Disk VTOC 3-102

    Viewing the Disk VTOC by Using the verify Command 3-103

    Reading a Disk VTOC by Using the prtvtoc Command 3-105

    Replacing a SPARC or x86/x64 VTOC on a Disk 3-107

    x86/x64 VTOC Information and Oracle Solaris fdisk Partitions 3-109

    Viewing and Replacing fdisk Partition Tables on x86/x64 Systems 3-111

    Quiz 3-115

     Agenda 3-117

    Extended Volume Table of Contents 3-119

    Quiz 3-120

    Practice 3 Overview: Managing Local Disk Devices 3-122

    Summary 3-123

    4 Describing Interface Configurations

    Objectives 4-2 Agenda 4-3

    Controlling and Monitoring Network Interfaces 4-4

    Displaying the IP Address 4-6

    Marking an Ethernet Interface as down  4-7

    Sending ICMP ECHO_REQUEST Packets 4-8

    Capturing and Inspecting Network Packets 4-9

  • 8/16/2019 D69337.pdf

    6/383

     

    vi

    Quiz 4-11

     Agenda 4-13

    Introducing IPv4 Interface Files 4-14

    /etc/hostname.xxn File Entries and Corresponding Interfaces 4-15

    /etc/inet/ipnodes File 4-17

    Changing the System Host Name 4-18

    sys-unconfig Command 4-20

    Quiz 4-22

    Practice 4 Overview: Oracle Solaris OS Network Commands 4-24

    Summary 4-25

    5 Managing UFS File Systems

    Objectives 5-2

     Agenda 5-3

    Oracle Solaris OS File Systems 5-4 Agenda 5-6

    Viewing the Oracle Solaris OS UFS 5-7

    Oracle Solaris OS UFS on Different Disk Slices 5-8

    Partition Tables and Reserved Space 5-9

    UFS File System Structure 5-11

    Cylinder Groups in a ufs File System 5-13

    UFS Inode 5-14

    Fragmentation 5-16

     Agenda 5-17

    Creating a New usf File System 5-18

    Using the newfs Command 5-20

     Agenda 5-22

    Checking a File System by Using the fsck Command 5-23

    Non-Interactive Mode 5-25

    Interactive Mode 5-26

     Agenda 5-28

    Resolving File System Inconsistencies 5-29

    Reconnecting an Allocated Unreferenced File 5-30

     Adjusting a Link Counter 5-32Salvaging the Free List 5-33

    Using Backup Superblocks 5-34

     Agenda 5-38

    Monitoring File System Use 5-39

    df Command 5-40

    df Command Options 5-41

  • 8/16/2019 D69337.pdf

    7/383

     

    vii

    Fields for the df -k Command 5-42

    du Command 5-43

    quot Command 5-46

    Quiz 5-48

    Practice 5 Overview: Creating and Maintaining UFS File Systems 5-54

    Summary 5-55

    6 ZFS File System

    Objectives 6-2

     Agenda 6-3

    What Is ZFS? 6-4

    Features of ZFS 6-5

    Quiz 6-8

     Agenda 6-9

    ZFS Terminology 6-10Quiz 6-12

     Agenda 6-13

    Creating a Basic ZFS File System 6-14

    ZFS Storage Pool Components 6-15

    Using Disks in a ZFS Storage Pool 6-16

    Using Files in a ZFS Storage Pool 6-19

    Virtual Devices in a Storage Pool 6-20

    Using Cache Devices in a ZFS Storage Pool 6-21

    Quiz 6-23

     Agenda 6-24Mirrored Storage Pool Configuration 6-25

    RAID-Z Storage Pool Configuration 6-26

    Self-Healing Data in a Replicated Configuration 6-29

    Dynamic Striping in a Storage Pool 6-30

    Creating ZFS Storage Pools 6-31

    Quiz 6-32

     Agenda 6-33

    Destroying ZFS Storage Pools 6-34

    Getting Basic ZFS Storage Pool Information 6-35

    ZFS Storage Pool HEALTH Status 6-37

    Getting Basic Storage Pool Health Status 6-39

    Getting Detailed Storage Pool HEALTH Status 6-40

    Creating and Destroying ZFS File Systems 6-41

    Creating a ZFS File System 6-42

    Destroying a ZFS File System 6-43

  • 8/16/2019 D69337.pdf

    8/383

     

    viii

    Renaming a ZFS File System 6-45

    ZFS Properties 6-46

    Values of ZFS Properties 6-47

    Read-Only ZFS Properties 6-48

    Settable ZFS Properties 6-49

    ZFS Native Property Descriptions 6-50

    Using Space Accounting Properties 6-56

    Setting ZFS File System Properties at Pool Creation Time 6-58

    Setting Cache Properties on a ZFS File System 6-59

    Setting ZFS User and Group Quotas 6-60

    Listing Basic ZFS Information 6-62

    Quiz 6-63

     Agenda 6-64

    ZFS Snapshots Omitted from zfs list Output 6-65

    Sending and Receiving ZFS Data 6-66Creating ZFS Snapshots 6-67

    Destroying ZFS Snapshots 6-68

    Practice Overview 6: ZFS File System Introduction 6-69

    Summary 6-70

    7 Performing Mounts and Unmounts

    Objectives 7-2

     Agenda 7-3

    Mounting Basics 7-4

    Mounting Basics: Overview 7-5Mounting Basics 7-6

    Mounting a File System Automatically 7-7

     Adding Entries to /etc/vfstab  7-10

    /etc/mnttab File System Table 7-12

    Quiz 7-16

     Agenda 7-18

    Mounting a Local File System Manually 7-19

    Using the mount Command Options 7-21

    Mounting All File Systems Manually 7-23

    Mounting a New File System 7-25

    Mounting Different Types of File Systems 7-27

    Specifying hsfs and pcfs File System Types 7-29

    Specifying a zfs File System Type 7-30

    Quiz 7-31

     Agenda 7-33

  • 8/16/2019 D69337.pdf

    9/383

     

    ix

    Managing ZFS Mount Points 7-34

     Automatic Mount Points 7-36

    Legacy Mount Points 7-38

    Mounting ZFS File Systems 7-40

    Quiz 7-42

     Agenda 7-43

    Performing Unmounts 7-44

    Unmounting All File Systems 7-45

    Unmounting a Busy File System 7-46

    Unmounting a ZFS File System 7-48

    Quiz 7-49

     Agenda 7-50

    Repairing Files If Boot Fails on a SPARC System 7-51

    Repairing Files If Boot Fails on x86/x64 Systems 7-53

     Agenda 7-55 Accessing Mounted Diskettes, CD-ROMs, and DVDs 7-56

    Quiz 7-60

     Agenda 7-62

    Stopping Volume Management (vold) 7-63

    Troubleshooting the Volume Management Service 7-64

     Agenda 7-65

     Accessing a Diskette, CD-ROM, or DVD Without Volume Management 7-66

    Using the mount Command 7-67

    Quiz 7-68

    Practice 7 Overview: Mounting File Systems 7-70Summary 7-71

    8 Performing Package Administration

    Objectives 8-2

     Agenda 8-3

    Package Administration Fundamentals 8-4

    Package Formats 8-7

    File System Format 8-8

    Data Stream Format 8-9

    Quiz 8-10

     Agenda 8-11

     Administering Packages from the Command Line 8-12

    Displaying Information About Installed Software Packages 8-13

    Displaying Information for All Packages 8-14

    Displaying Information for a Specific Package 8-15

    Displaying Information for Software Packages 8-16

  • 8/16/2019 D69337.pdf

    10/383

     

    x

    Quiz 8-17

     Adding a Software Package 8-18

    Checking a Package Installation 8-23

    Removing a Software Package 8-27

     Adding Packages by Using a Spool Directory 8-29

    Streaming One or More Packages 8-31

    Quiz 8-35

    Practice 8 Overview: Adding a Software Package 8-38

    Summary 8-39

    9 Managing Software Patches

    Objectives 9-2

     Agenda 9-3

    Patch Administration: Overview 9-4

    Patch Names and Delivery Format 9-6

     Agenda 9-7

    Best Practices 9-8

     Accessing Patches and Patch Information 9-9

    Discontinued Patch Access Methods 9-10

    Requirements for Patch Access 9-11

    Quiz 9-12

     Agenda 9-13

     Accessing Patches by Using SunSolve 9-14

     Accessing Patch Documents 9-16

    Critical Patch Updates 9-17Downloading Patches by Using My Oracle Support 9-18

    Downloading Patches by Using SunSolve 9-19

    Patch Cluster and Patch Bundle Downloads 9-20

     Accessing Sun Alert Patch Clusters 9-22

    Checking Patch Levels 9-24

    Preparing Patches for Installation 9-25

    Patch Contents 9-27

     Agenda 9-28

    Tools and Commands to Manage Patches 9-29

    Installing a Patch 9-30

    Removing a Patch 9-32

    Quiz 9-34

     Agenda 9-35

    Installing Patch Clusters 9-36

     Agenda 9-42

    Using the smpatch Command 9-43

  • 8/16/2019 D69337.pdf

    11/383

     

    xi

    Phases for Applying Updates 9-44

     Applying an Update in Three Steps 9-46

     Applying an Update in One Step 9-48

    Configuring the Patch Management Environment 9-49

    Example: Configuring the Patch Management Environment 9-50

    Using the Update Policy for Applying Updates 9-56

    Install Type Parameter Values 9-57

    Policy Values for Each Update 9-59

    Example: Using the Update Policy 9-60

    Not Using the smpatch update Command 9-61

    Example: Using the Update Policy 9-64

    Working with Multiple Updates 9-67

     Authorization and Authentication 9-69

    Quiz 9-70

    Practice 9 Overview: Maintaining Patches 9-73Summary 9-74

    10 Using Boot PROM Commands

    Objectives 10-2

     Agenda 10-3

    Boot PROM Fundamentals 10-4

    Goal of the OpenBoot Architecture Standard 10-6

    Boot PROM 10-7

    System Configuration Information 10-9

    Disabling the Abort Sequence 10-14Displaying POST to the Serial Port 10-15

    Quiz 10-17

     Agenda 10-18

    Using Basic Boot PROM Commands 10-19

    Identifying the System Boot PROM Version 10-22

    Booting the System 10-23

     Accessing More Detailed Information 10-25

    Listing NVRAM Parameters 10-27

    Changing NVRAM Parameters 10-30

    Restoring Default NVRAM Parameters 10-31

    Displaying Devices Connected to the System 10-32

    probe-scsi Command 10-35

    probe-scsi–all Command 10-36

    probe-ide Command 10-37

    Quiz 10-38

  • 8/16/2019 D69337.pdf

    12/383

     

    xii

     Agenda 10-40

    Identifying the System Boot Device 10-41

    show-devs Command 10-44

    devalias Command 10-47

    boot-device Parameter 10-49

    Quiz 10-50

     Agenda 10-51

    Creating and Removing Custom Device Aliases 10-52

    nvalias Command 10-53

    nvunalias Command 10-56

    Quiz 10-58

     Agenda 10-59

    eeprom Command 10-60

    Quiz 10-62

     Agenda 10-63Interrupting an Unresponsive System 10-64

     Aborting an Unresponsive System 10-65

    Practice 10 Overview: Using Boot PROM Commands 10-66

    Summary 10-67

    11 Using the GRand Unified Bootloader (GRUB)

    Objectives 11-2

     Agenda 11-3

    Introduction to GRUB 11-4

    GRUB Terminology 11-5

    GRUB-Based Booting 11-7

    How GRUB-Based BootingWorks 11-9

    GRUB Device-Naming Conventions 11-11

    GRUB Functional Components 11-12

    GRUB Menu 11-13

    Quiz 11-15

     Agenda 11-17

    Modifying x86 System Boot Behavior in the Oracle Solaris OS 11-18

    Setting Boot Parameters by Using eeprom  11-20Modifying Boot Behavior by Using the kernel Comand 11-23

    kernel Command: Examples 11-27

    Verifying Which Kernel the System Is Using 11-28

    Quiz 11-29

     Agenda 11-31

    findroot Command for x86 11-32

  • 8/16/2019 D69337.pdf

    13/383

     

    xiii

     Agenda 11-33

    GRUB Boot Archives 11-34

    Managing the Primary Boot Archive 11-36

    Quiz 11-38

     Agenda 11-39

    Booting a System to Default Run Level (Multiuser) 11-40

    Booting a System to Run Level S (Single-User Level) 11-41

    Booting a System Interactively 11-43

    Stopping an x86 System for Recovery 11-45

    Booting the Failsafe Archive for Recovery 11-46

     Agenda 11-49

     Aborting an Unresponsive System 11-50

    Quiz 11-51

    Practice 11: Using GRUB 11-53

    Summary 11-54

    12 Performing Legacy Boot and Shutdown Procedures

    Objectives 12-2

     Agenda 12-3

    Oracle Solaris SPARC Boot Design: Overview 12-4

    Boot Process Phases 12-5

    Legacy Boot and Shutdown 12-7

    Quiz 12-8

     Agenda 12-9

    Boot Process Phases 12-10kernel Initialization Phase 12-15

    /etc/system File and Kernel Configuration 12-18

    Editing the /etc/system File 12-20

    init Phase 12-22

    Quiz 12-24

     Agenda 12-26

    Legacy Run-Level Fundamentals 12-27

    Quiz 12-30

     Agenda 12-32

    Legacy Boot Processes 12-33

    Quiz 12-41

     Agenda 12-42

    System Shutdown Procedures 12-43

    /usr/sbin/init Command 12-46

    /usr/sbin/shutdown Command 12-47

  • 8/16/2019 D69337.pdf

    14/383

     

    xiv

    “Ungraceful” Shutdown Commands 12-49

    Quiz 12-51

    Summary 12-52

    13 Service Management Facility (SMF)

    Objectives 13-2

     Agenda 13-3

    Introduction to the SMF 13-4

    SMF Features 13-5

    Service: Definition 13-6

    Quiz 13-7

    Service Identifiers 13-8

    Listing Service Information 13-11

    Service States 13-13

    Quiz 13-15

    Milestones 13-16

    svc.startd Daemon 13-19

    inetd Restarter 13-21

    Setting the Size of the inetd Managed Services Backlog Queue 13-22

    Service Configuration Repository 13-23

    Service Repository Database 13-24

    Listing Services with the svcsCommand 13-26

    Changing Service States by Using the svcadm Command 13-31

    Using svcs to Determine Why Services Are Not Running 13-33

    Creating New Service Scripts 13-34

    Manipulating Legacy Services That Are Not Managed by SMF 13-41

    Quiz 13-43

     Agenda 13-44

    Secure by Default 13-45

    Custom Configurations 13-46

    Limited Networking Profile 13-47

    Opening Selected Services 13-51

    Removing Restrictions 13-53

    Quiz 13-57Practice 13 Overview: Managing Services with SMF 13-59

    Summary 13-60

    14 Performing User Administration

    Objectives 14-2

     Agenda 14-3

  • 8/16/2019 D69337.pdf

    15/383

     

    xv

    Introducing User Administration 14-4

    Main Components of a User Account 14-5

    System Files That Store User Account Information 14-7

    /etc/passwd File 14-8

    Default System Account Entries 14-10

    /etc/shadow File 14-13

    Fields in the /etc/shadow File 14-16

    /etc/group File 14-18

    Fields in the /etc/group File 14-20

    Quiz 14-22

    /etc/default/passwd File 14-23

    Password Management 14-26

    Setting Password Aging on a User Account 14-28

    Quiz 14-29

     Agenda 14-30Command-Line Tools 14-31

    Creating a User Account 14-34

    useradd Command: Format and Options 14-35

    smuser add Command: Format and Options 14-38

    Modifying a User Account with the usermod Command 14-40

    Modifying a User Account with the smuser modify Command 14-41

    Deleting a User Account 14-42

    smuser delete Command: Format and Options 14-43

    Creating a Group Entry 14-44smgroup add Command: Format and Options 14-45

    Modifying a Group Entry 14-46

    groupmod Command: Format and Options 14-47

    smgroup modify Command: Format and Options 14-48

    Deleting a Group Entry 14-49

    smgroup delete Command: Format and Options 14-50

    Troubleshooting Login Issues 14-51

    Login Problems in the CDE 14-53

    Quiz 14-56

     Agenda 14-58

    Managing Initialization Files 14-59

    System-Wide Initialization Files 14-60

    User Initialization Files 14-61

    Customizing the User’s Work Environment 14-62

    Quiz 14-65

  • 8/16/2019 D69337.pdf

    16/383

     

    xvi

    Practice 14 Overview: Adding User and Group Accounts 14-66

    Summary 14-67

    15 Controlling System Processes

    Objectives 15-2

     Agenda 15-3

    prstat Command 15-4

    prstat Report Column Headings 15-7

    Quiz 15-9

     Agenda 15-11

    kill and pkill Commands 15-12

    Process Signal Numbers and Names 15-14

    Quiz 15-16

     Agenda 15-17

    Scheduling an Automatic One-Time Execution of a Command 15-18at Command 15-19

    Controlling Access to the at Command 15-21

    Quiz 15-23

     Agenda 15-24

    Scheduling an Automatic Recurring Execution of a Command 15-25

    crontab File Format 15-26

    crontab Command 15-28

    Editing a crontab File 15-29

    Controlling Access to the crontab Command 15-31

    Quiz 15-33

    Practice 15 Overview: Using Process Control 15-35

    Summary 15-36

    16 Oracle Solaris 10 Operating System Installation Requirements

    Objectives 16-2

     Agenda 16-3

    Hardware Requirements: SPARC Systems 16-4

    Hardware Requirements: x86/x64 Systems 16-5

    Support for 2 TB Disk 16-6Quiz 16-7

     Agenda 16-8

    Oracle Solaris OS: Installation Options 16-9

    GUI Installation 16-10

    CLI Installation 16-11

    Custom JumpStart Installation 16-12

  • 8/16/2019 D69337.pdf

    17/383

     

    xvii

    Flash Archive Installation 16-13

    Oracle SolarisWAN Boot 16-14

    Standard Upgrade to Oracle Solaris OS 16-15

    Solaris Live Upgrade 16-16

    Troubleshooting Oracle Solaris 10 OS Upgrades 16-17

    Quiz 16-18

     Agenda 16-19

    Oracle Solaris OS Software Components 16-20

    Software Clusters 16-21

    Oracle Solaris OS Software Groups 16-22

     Agenda 16-24

    DVD Installation Guidelines 16-25

    Quiz 16-29

     Agenda 16-30

    Secure by Default 16-31Simulation: Oracle Solaris 10 Operating System Installation 16-33

    Summary 16-34

    A Backing Up a Mounted File System with a UFS Snapshot

    Objectives A-2

     Agenda A-3

    Creating a UFS Snapshot A-4

    Using the fssnap Command A-5

    Limiting the Size of the Backing-Store File A-8

    Displaying Information for a UFS Snapshot A-9Quiz A-11

     Agenda A-13

    Backing Up the UFS Snapshot File A-14

    Using the tar Command to Back Up a Snapshot File A-15

    Performing an Incremental Backup by Using a UFS Snapshot A-17

    Restoring Data from a UFS Snapshot Backup A-21

    Deleting a UFS Snapshot A-23

    Quiz A-24

    Practice A Overview: Working with UFS Snapshots A-25

    Summary A-26

    B Performing File System Backups

    Objectives B-2

     Agenda B-3

    Backup Fundamentals B-4

    Naming Tape Drives B-5

  • 8/16/2019 D69337.pdf

    18/383

     

    xviii

    Tape Drive Control B-7

    Using the mt Command B-8

    Determining Backup Frequency and Levels B-10

    Identifying Incremental and Full Backups B-11

    /etc/dumpdates File B-13

    Quiz B-15

     Agenda B-17

    Backing Up an Unmounted File System B-18

    ufsdump Command Options B-19

    ufsrestore Utility B-21

    Tape Backups B-22

    Remote Backups to a Tape B-25

    Using the ufsdump Command B-26

    Backups to Disk B-27

    Saving ZFS Data with Other Backup Products B-30Quiz B-31

    Practice B Overview: Backing Up a File System to Tape B-33

    Summary B-35

    C Performing File System Restores

    Objectives C-2

    Restoring a Regular File System C-3

    Restoring the /usr File System C-7

    Performing Special-Case Recovery of /(root) on SPARC Systems C-10

    Quiz C-12

    Performing Special-Case Recovery of / (root) on x86/x64 Systems C-13

    Quiz C-16

    Invoking an Interactive Restore C-17

    Performing an Incremental Restore C-20

    Quiz C-25

    Practice C Overview: Restoring Files and File Systems C-26

    Summary C-27

  • 8/16/2019 D69337.pdf

    19/383

    Preface

  • 8/16/2019 D69337.pdf

    20/383

  • 8/16/2019 D69337.pdf

    21/383

  • 8/16/2019 D69337.pdf

    22/383

    Preface - 4

    Related Publications

    Oracle Publications

    System Administration Guide: Basic Administrationhttp://docs.sun.com/app/docs/doc/817-1985

    System Administration Guide: IP Serviceshttp://docs.sun.com/app/docs/coll/47.16?l=en

    System Administration Guide: Devices and File Systemshttp://docs.sun.com/app/docs/doc/817-5093

  • 8/16/2019 D69337.pdf

    23/383

    Preface - 5

    Typographic Conventions

    The following two lists explain Oracle University typographical conventions for

    words that appear in regular text or in code samples.

    1. Typographic Conventions for Words in Regular Text

    Convention Object or Term ExampleCourier New User input; Use the SELECT command to view

    commands; information stored in the LAST_NAMEcolumn, table, and column of the EMPLOYEES table.

    schema names;functions; Enter 300.

    PL/SQL objects; paths Log in as scott

    Initial cap Triggers; Assign a When-Validate-Item trigger to

    user interface object the ORD block.

    names, such as

     button names Click the Cancel button.

    Italic Titles of For more information on the subject see

    courses and Oracle SQL Reference

    manuals;  Manual 

    emphasized

    words or phrases; Do not save changes to the database.

     placeholders orvariables Enter hostname, where

    hostname is the host on which the

     password is to be changed.

    Quotation marks Lesson or module This subject is covered in Lesson 3,

    titles referenced “Working with Objects.”

    within a course

  • 8/16/2019 D69337.pdf

    24/383

    Preface - 6

    Typographic Conventions (continued)

    2. Typographic Conventions for Words in Code Samples

    Convention Object or Term Example

    Uppercase Commands, SELECT employee_id

    functions FROM employees;Lowercase, Syntax variables CREATE ROLE role;

    italic

    Initial cap Forms triggers Form module: ORDTrigger level: S_ITEM.QUANTITYitemTrigger name: When-Validate-Item

    . . .

    Lowercase Column names, . . .

    table names, OG_ACTIVATE_LAYERfilenames, (OG_GET_LAYER ('prod_pie_layer'))PL/SQL objects . . .

    SELECT last_nameFROM employees;

    Bold Text that must CREATE USER scott be entered by a IDENTIFIED BY tiger;user 

  • 8/16/2019 D69337.pdf

    25/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Performing Mounts and Unmounts

  • 8/16/2019 D69337.pdf

    26/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Objectives

     After completing this lesson, you should be able to:

    • Identify mounting basics• Perform mounts

    • Mount ZFS file systems

    • Perform unmounts

    • Repair important files if boot fails

    •  Access a mounted diskette, CD-ROM, or DVD

    • Restrict access to a mounted diskette, CD-ROM, or DVD

    •  Access a diskette, CD-ROM, or DVD without volumemanagement (vold)

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 2

  • 8/16/2019 D69337.pdf

    27/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Agenda

    • Identifying mounting basics

    • Performing mounts• Mounting ZFS file systems

    • Performing unmounts

    • Repairing important files if boot fails

    • Accessing a mounted diskette, CD-ROM, or DVD

    • Restricting access to a mounted diskette, CD-ROM, or DVD

    • Accessing a diskette, CD-ROM, or DVD without volume

    management (vold)

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 3

  • 8/16/2019 D69337.pdf

    28/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Mounting Basics

    • Mounting

     –  Attaches individual file systems to their mount points in thedirectory hierarchy

     – Makes a file system accessible to the system and to users

    • Unmounting

     – Detaches a file system from its mount point in the directory

    hierarchy

     – Makes a file system unavailable to the system and to users

    Mounting Basics After you create a UNIX file system (UFS) with the newfs command, you must attach it to the

    Oracle Solaris OS directory hierarchy at a mount point. A mount point is a directory that is the

    point of connection for a file system. File systems are commonly referred to by the names oftheir mount points, for example, the / (root) file system or the /usr file system.

    This lessons focuses on methods used to mount and unmount UFSs.

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 4

  • 8/16/2019 D69337.pdf

    29/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Mounting Basics: Overview

    Mounting Basics: OverviewThis illustration shows how the directory hierarchy spans from one file system to the next.

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 5

  • 8/16/2019 D69337.pdf

    30/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Mounting Basics

    • Determine which file systems are currently mounted by

    using the mount or df command.• The Oracle Solaris OS provides several methods for

    automating file system mounts.

    • The Oracle Solaris OS creates a default /etc/vfstab file

    during software installation, based on your selections.

    • The automounter can mount network file systems on

    demand.

    Mounting BasicsThe df command displays the amount of disk space occupied by mounted and unmounted

    file systems and, depending on the options used, displays both locally mounted and virtual file

    system information.

    The mount command, which is located in the /usr/sbin directory, maintains a table of

    currently mounted file systems in the /etc/mnttab file system table. When the mount

    command is used without arguments, it lists all of the mounted file systems in the/etc/mnttab file system table. When used with only a partial argument list, the mount

    command searches the /etc/vfstab file for an entry that supplies the missing arguments.

    Note: Options to the mount command are discussed later in this lesson.

    The symbolic link /usr/sbin/mount points to the /sbin/mount command.

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 6

  • 8/16/2019 D69337.pdf

    31/383

  • 8/16/2019 D69337.pdf

    32/383

    Mounting a File System Automatically (continued)

     A sample /etc/vfstab file from a Sun Blade 1500 system:

    # cat /etc/vfstab

    #device device mount FS fsck mount

    mount

    #to mount to fsck point type pass at boot

    options

    #

    fd - /dev/fd fd - no -

    /proc - /proc proc - no -

    /dev/dsk/c0t0d0s1 - - swap - no -

    /dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1

    no -

    /dev/dsk/c0t0d0s6 /dev/rdsk/c0t0d0s6 /usr ufs 1

    no -

    /dev/dsk/c0t0d0s3 /dev/rdsk/c0t0d0s3 /var ufs 1

    no -

    /dev/dsk/c0t0d0s7 /dev/rdsk/c0t0d0s7 /export/home

    ufs 2

    yes -

    /dev/dsk/c0t0d0s5 /dev/rdsk/c0t0d0s5 /opt ufs 2

    yes -

    /devices - /devices devfs - no -

    ctfs - /system/contract ctfs - no -

    objfs - /system/object objfs - no -

    swap - /tmp tmpfs - yes -

    #

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 8

  • 8/16/2019 D69337.pdf

    33/383

    Mounting a File System Automatically (continued)

     A sample /etc/vfstab file from an Ultra 20 system:

    # cat /etc/vfstab

    #device device mount FS fsck mount

    mount

    #to mount to fsck point type pass at

    bootoptions

    #

    fd - /dev/fd fd - no -

    /proc - /proc proc - no -

    /dev/dsk/c1d0s1 - - swap - no -

    /dev/dsk/c1d0s0 /dev/rdsk/c1d0s0 / ufs 1

    no -

    /dev/dsk/c1d0s6 /dev/rdsk/c1d0s6 /usr ufs 1 no -

    /dev/dsk/c1d0s3 /dev/rdsk/c1d0s3 /var ufs 1 no -/dev/dsk/c1d0s7 /dev/rdsk/c1d0s7 /export/home ufs 2

    yes -

    /dev/dsk/c1d0s5 /dev/rdsk/c1d0s5 /opt ufs 2 yes -

    /devices - /devices devfs - no -

    ctfs - /system/contract ctfs - no

    -

    objfs - /system/object objfs - no -

    swap - /tmp tmpfs - yes -

    #

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 9

  • 8/16/2019 D69337.pdf

    34/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Adding Entries to /etc/vfstab

    To add an entry to /etc/vfstab, you need the following

    information:• Device to mount

    • Device to fsck

    • Mount point

    • File system type

    • fsck pass number 

    • Mount at boot

    • Mount options

    Adding Entries to /etc/vfstabdevice to mount: The device to be mounted (for example, a local ufs file system

    /dev/dsk/c#t#d#s# or a pseudo file system /proc)

    device to fsck: The raw or character device checked by the file system check program

    (fsck) if applicable. Pseudo and distributed file systems have a dash (–) in this field.

     mount point: The name of the directory that serves as the attach mount point in the Oracle

    Solaris OS directory hierarchy

    FS type: The type of file system to be mounted

    fsck pass: The pass number used by the fsck command to decide whether to check a file

    system. When the field contains a (-), the file system is not checked. When the field containsa zero, UFS file systems are not checked; however, non-UFS file systems are checked. When

    the field contains a value greater than zero, the file system is always checked. All file systemswith a value of 1 in this field are checked one at a time in the order they appear in the vfstab

    file. When the fsck command is run on multiple UFSs that have fsck pass values greater

    than 1 and the preen option (-o p) is used, the fsck command automatically checks the file

    systems on different disks in parallel to maximize efficiency. Otherwise, the value of the pass

    number has no effect.

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 10

  • 8/16/2019 D69337.pdf

    35/383

    Adding Entries to /etc/vfstab (continued)

     mount at boot: Enter yes to enable the mountall command to mount the file systems at

    boot time. Enter no to prevent a file system mount at boot time.

    Note: For / (root), /usr, and /var (if it is a separate file system) file systems, the mount at

    boot field value is specified as no. The kernel mounts these file systems as part of the

    boot sequence before the mountall command is run. SMF uses scripts in the

    /lib/svc/method directory whose names begin with fs- to mount all required file systems.

     mount options: A comma-separated list of options passed to the mount command. A dash

    (–) indicates the use of default mount options.

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 11

  • 8/16/2019 D69337.pdf

    36/383

  • 8/16/2019 D69337.pdf

    37/383

    /etc/mnttab File System Table (continued)

    The /var/run file system is a tmpfs mounted file system in the Oracle Solaris OS. It is the

    repository for temporary operating system files that are not needed across system reboots in

    this Oracle Solaris OS release. It is mounted as a pseudo file system rather than a disk-based

    file system.

    The /var/run directory requires no administration. For security reasons, it is owned by the

    root user.

    The /tmp directory continues to be a tmpfs mounted file system in the Oracle Solaris OS. It

    is the repository for temporary user and application files that are not needed across system

    reboots. It is a pseudo file system rather than a disk-based file system.

    The following examples show two ways to display currently mounted file systems:

    # cat /etc/mnttab

    /dev/dsk/c0t0d0s0 / ufs

    rw,intr,largefiles,logging,xattr,onerror=panic,dev=2200008

    1170808975

    /devices /devices devfs dev=53c0000 1170808960

    ctfs /system/contract ctfs dev=5400001 1170808960proc /proc proc dev=5440000 1170808960

    mnttab /etc/mnttab mntfs dev=5480001 1170808960

    swap /etc/svc/volatile tmpfs xattr,dev=54c0001 1170808960

    objfs /system/object objfs dev=5500001 1170808960

    /dev/dsk/c0t0d0s6 /usr ufs

    rw,intr,largefiles,logging,xattr,onerror=panic,dev=220000e

    1170808975

    /platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap1.so.1

    /platform/sun4uus3/

    lib/libc_psr.so.1 lofs dev=2200008 1170808971/platform/sun4u-

    us3/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1

    /platform/sun4uus3/

    lib/sparcv9/libc_psr.so.1 lofs dev=2200008 1170808972

    fd /dev/fd fd rw,dev=56c0001 1170808975

    /dev/dsk/c0t0d0s3 /var ufs

    rw,intr,largefiles,logging,xattr,onerror=panic,dev=220000b

    1170808989

    swap /tmp tmpfs xattr,dev=54c0002 1170808989

    swap /var/run tmpfs xattr,dev=54c0003 1170808989

    /dev/dsk/c0t0d0s5 /opt ufs

    rw,intr,largefiles,logging,xattr,onerror=panic,dev=220000d

    1170808994

    /dev/dsk/c0t0d0s7 /export/home ufs

    rw,intr,largefiles,logging,xattr,onerror=panic,dev=220000f

    1170808994

    -hosts /net autofs

    nosuid,indirect,ignore,nobrowse,dev=5780001

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 13

  • 8/16/2019 D69337.pdf

    38/383

  • 8/16/2019 D69337.pdf

    39/383

  • 8/16/2019 D69337.pdf

    40/383

  • 8/16/2019 D69337.pdf

    41/383

    Answer: b

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Quiz

    The /etc/vfstab file lists:

    a.  All the file systems that will be manually mounted aftersystem boot time

    b.  All the file systems that will be automatically mounted at

    system boot time

    c.  All the file systems that will be manually mounted at

    system boot time

    d.  All the file systems that will not be automatically mounted

    at system boot time

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 17

  • 8/16/2019 D69337.pdf

    42/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Agenda

    • Identifying mounting basics

    • Performing mounts• Mounting ZFS file systems

    • Performing unmounts

    • Repairing important files if boot fails

    • Accessing a mounted diskette, CD-ROM, or DVD

    • Restricting access to a mounted diskette, CD-ROM, or

    DVD

    • Accessing a diskette, CD-ROM, or DVD without volumemanagement (vold)

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 18

  • 8/16/2019 D69337.pdf

    43/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Mounting a Local File System Manually

    To mount a local file system manually:

    # mount /dev/dsk/c0t0d0s7 /export/home

    Mounting a Local File System ManuallyYou mount file systems manually by running the mount command, or the system can

    automatically mount file systems at boot time after consulting the /etc/vfstab file.

    The mount command not only lists the file systems that are currently mounted. It also

    provides you with a method for mounting file systems.

    Default Behavior of the mount Command

    To mount a local file system manually, you need to know the name of the device where the

    file system resides and its mount point path name. Run the following command:

    # mount /dev/dsk/c0t0d0s7 /export/home

    In this example, the default action mounts the file system with the following options:read/write, setuid, intr, logging, largefiles, xattr, and onerror.

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 19

  • 8/16/2019 D69337.pdf

    44/383

    Mounting a Local File System Manually (continued)

    The following list explains the default options for the mount command.

    read/write: Indicates whether reads and writes are allowed on the file system

    setuid: Permits the execution of setuid programs in the file system

    intr/nointr: Allows and forbids keyboard interrupts to kill a process that is waiting for an

    operation on a locked file system

    logging: Indicates that logging is enabled for the ufs file system. This is the default for theOracle Solaris 10 OS.

    largefiles: Allows for the creation of files larger than 2 GB. A file system mounted with this

    option can contain files larger than 2 GB.

    xattr: Supports extended attributes not found in standard UNIX file systems (see man

    fsattr(5)for more information).

    Note: Due to file system overhead, the largest file that can be created in a ufs file system is

    approximately 1 TB. The data capacity of a 1 TB file system is approximately 1 TB minus

    0.5% overhead and the recommended 1% free space.

    onerror=action: Specifies the action that the ufs file system should take to recover froman internal inconsistency on a file system. An action can be specified as:

    panic: Causes a forced system shutdown. This is the default.

    lock: Applies a file system lock to the file system

    umount: Forcibly unmounts the file system

    The /etc/vfstab file provides you with another important feature. Because this file

    contains the mapping between the mount point and the actual device name, the root user

    can manually mount a file system specifying only the mount point on the command line:

    # mount /export/home

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 20

  • 8/16/2019 D69337.pdf

    45/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Using the mount Command Options

    • The mount options are preceded by the -o flag.

    • Enter multiple options as a comma-separated list• The mount options include:

     – ro: Mounts the file system as read-only

     – nosuid: Prohibits the execution of setuid programs in the

    file system

     – noatime: Suppresses the time-last-accessed modification

    on inodes

     – nolargefiles: Prevents a file system that contains one or

    more “large files” from being mounted

    Using the mount Command OptionsWhen you are using mount options on the command line, remember that the options arepreceded by the -o flag. When you are using multiple options, enter them as a comma-

    separated list following the -o flag.

    mount -o option,option,... device_name mount_point

    Note: Mount options are described in detail in the mount_ufs man page. This man page

    describes mount command options specific to the ufs file system.

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 21

  • 8/16/2019 D69337.pdf

    46/383

    Using the mount Command Options (continued)

    Some options used to mount local file systems include ro, nosetuid, noatime,

    nolargefiles, and nologging.

    •   ro: Mounts the file system as read-only

    The following is an example using this option on the command line:

    # mount -o ro /dev/dsk/c0t0d0s7 /export/home

    •   nosuid: Prohibits the execution of setuid programs in the file system. This does notrestrict the creation of setuid programs.

    The following example shows the use of multiple options in the command line:

    # mount -o ro,nosuid /dev/dsk/c0t0d0s7 /export/home

    •   noatime: Suppresses the time-last-accessed modification on inodes, which reduces

    disk activity on a file system where access times are not important. Specifying this

    option generally improves file access times and boosts overall performance, as in this

    example:

    # mount -o noatime /dev/dsk/c0t0d0s7 /export/home

      nolargefiles: Prevents a file system that contains one or more “large files” frombeing mounted, as in the following example:

    # mount -o nolargefiles /dev/dsk/c0t0d0s7 /export/home

    Use of the nolargefiles option fails if the file system to be mounted contains a large

    file or did contain a large file at one time. If the file system currently contains a large file

    and the root user needs to mount it with this option, the large file must be located andmoved or removed from the file system. Then you must execute the fsck command

    manually to update the superblock information.

    The mount also fails if the file system at one time contained a large file, even though itwas moved or removed. You must execute the fsck command to clear the old

    information and allow the file system to be mounted.

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 22

  • 8/16/2019 D69337.pdf

    47/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Mounting All File Systems Manually

    The root user can use the mountall command to manually

    mount every file system in the /etc/vfstab file that has a yesin the mount at boot field.

    # mountall

    Mounting All File Systems ManuallyThe /etc/vfstab file is read by the /usr/sbin/mountall command during the system

    boot sequence and mounts all file systems that have yes in the mount at boot field.

    The root user can use the mountall command to manually mount every file system in the

    /etc/vfstab file that has a yes in the mount at boot field, as in the following example:

    # mountall

    To mount only the local file systems listed in the /etc/vfstab file, execute the following

    command:

    # mountall –l

    During the boot sequence, the fsck utility checks each local file system in the /etc/vfstabfile that has a device to fsck entry and an fsck pass number greater than 0. The utility

    determines if the file system is in a usable state to be safely mounted.

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 23

  • 8/16/2019 D69337.pdf

    48/383

    Mounting All File Systems Manually (continued)

    If the fsck utility determines that the file system is in an unusable state (for example,

    corrupted), the utility only performs noninteractive repairs before attempting to mount the filesystem. If the repairs require interaction, the boot process takes the system to singleuser

    mode to allow you to run fsck manually.

    The system attempts to mount any local file systems that have a – (dash) or 0 (zero) entry in

    the fsck pass field without checking the file system itself.

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 24

  • 8/16/2019 D69337.pdf

    49/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Mounting a New File System

    • Use the format utility to partition the disk into one or more

    slices.• Create a new file system on one slice by using the newfs

    command.

    • Create a mount point for the file system by using themkdir command.

    • Mount the new file system manually by using the mount

    command.

    • Use themount

    command to determine if the file system is

    mounted.

    •  Add an /etc/vfstab entry for the new file system.

    Mounting a New File SystemTo add a new disk to the system, use the steps on the following page.

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 25

  • 8/16/2019 D69337.pdf

    50/383

    Mounting a New File System (continued)

    To add a new disk to the system, prepare the disk to hold a file system, and mount the file

    system, perform these general steps:

    1. Set up the disk hardware, which might include setting address switches and connecting

    cables.

    2. Perform a reconfiguration boot or run the devfsadm utility to add support for the new

    disk.

    3. Use the format utility to define one or more slices. On x86/x64 systems, create an

    Oracle Solaris fdisk partition and then create one or more slices in the Oracle Solaris

    partition.

    4. Create a new file system on one slice by using the newfs command.

    5. Create a mount point for the file system by using the mkdir command to create a new

    directory in the / (root) file system.

    # mkdir /data

    6. Mount the new file system manually by using the mount command.

    # mount /dev/dsk/c1t3d0s7 /data

    7. Use the mount command to determine if the file system is mounted.

    # mount

    ...

    /data on /dev/dsk/c1t3d0s7

    read/write/setuid/devices/intr/largefiles/logging/xattr/onerror=pani

    c/dev

    =800027 on Sat Oct 23 11:55:34 2004

    8. Edit the /etc/vfstab file to add a line entry for the new file system.

    # vi /etc/vfstab

    fd - /dev/fd fd - no -

    /proc - /proc proc - no -

    /dev/dsk/c0t0d0s1 - - swap - no -

    /dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no -

    /dev/dsk/c0t0d0s6 /dev/rdsk/c0t0d0s6 /usr ufs 1 no -

    /dev/dsk/c0t0d0s3 /dev/rdsk/c0t0d0s3 /var ufs 1 no -

    /dev/dsk/c0t0d0s7 /dev/rdsk/c0t0d0s7 /export/home ufs 2 yes -

    /devices - /devices devfs - no -

    ctfs - /system/contract ctfs - no -objfs - /system/object objfs - no -

    swap - /tmp tmpfs - yes -

    /dev/dsk/c1t3d0s7 /dev/rdsk/c1t3d0s7 /data ufs 2 yes -

    #

    The file system automatically mounts whenever the system boots.

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 26

  • 8/16/2019 D69337.pdf

    51/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Mounting Different Types of File Systems

    • Different file system types have unique properties that

    affect how the mount command functions.• Use the -F option with the mount command to specify the

    type of file system to mount.

    • The file system type must be determinable from the/etc/vfstab, /etc/default/fs, or

    /etc/dfs/fstypes files.

    Mounting Different Types of File SystemsBy default, the mount command assumes that it is mounting a ufs-type file system.

    However, when you are mounting a different type of file system, you might have to specify its

    type on the command line.

    Determining a File System’s Type

    Because the mount command needs the file system type to function properly, the file system

    type must be explicitly specified or determined by searching the following files:

    • /etc/vfstab for the FS type field

    • /etc/default/fs for a local file system type

    • /etc/dfs/fstypes for a remote file system type

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 27

  • 8/16/2019 D69337.pdf

    52/383

  • 8/16/2019 D69337.pdf

    53/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Specifying hsfs and pcfs File System Types

    To mount a file system that resides on a CD-ROM when the

    Volume Management (vold) Services are stopped, performthis command as the root user:

    # mount -F hsfs -o ro /dev/dsk/c0t6d0s0 /cdrom 

    To mount a file system that resides on a diskette when theVolume Management (vold) Services are stopped:

    # mkdir /pcfs

    # mount -F pcfs /dev/diskette /pcfs

    Specifying hsfs and pcfs File System TypesIn the first example in the slide, the file system type is hsfs, the file system resides on disk

    slice /dev/dsk/c0t6d0s0, and the mount point /cdrom is an existing directory in the Oracle

    Solaris OS.

    In the second example in the slide, the file system type is pcfs. This file system resides on

    the device /dev/diskette, and the mount point is /pcfs.

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 29

  • 8/16/2019 D69337.pdf

    54/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Specifying a zfs File System Type

    To mount a zfs file system by using the mount command, run

    the following command as the root user:

    # mount -F zfs rzpool/users/jf /home/jf

    Specifying a zfs File System TypeIn this example, the file system type is zfs. The file system is named rzpool/users/jf

    and resides within the ZFS pool called rzpool. The mount point /home/jf is an existing

    directory in the Oracle Solaris OS.

    Note: To use the mount command to mount a ZFS file system, you must set the

    mountpoint property for the ZFS file system to the legacy value. By default, ZFS file

    systems mount automatically when you create them. For more information, see thezfs(1M)command man page.

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 30

  • 8/16/2019 D69337.pdf

    55/383

    Answer: b

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Quiz

    Which of the following options of the mount command do you

    use to prevent a file system containing large files from beingmounted?

    a. nosetuid

    b. nolargefiles

    c. noatime

    d. ro

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 31

  • 8/16/2019 D69337.pdf

    56/383

    Answer: d

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Quiz

    Which of the following commands do you use to mount only the

    local file systems listed in the /etc/vfstab file?a. mountall -m

    b. mountall -z

    c. mountall –s

    d. mountall -l

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 32

  • 8/16/2019 D69337.pdf

    57/383

  • 8/16/2019 D69337.pdf

    58/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Managing ZFS Mount Points

    • By default, all ZFS file systems are mounted by the ZFS at

    boot by using the svc://system/filesystem/ localservice.

    • File systems are mounted under /path, where path is

    the file system name.

    • Override the default mount point by using the zfs set

    command to set the mountpoint property to a specific

    path.

    • ZFS automatically creates this mount point, if needed.

    • The mountpoint property is inherited.

    Managing ZFS Mount PointsThe ZFS automatically creates the mount point (if needed) and automatically mounts this filesystem when the zfs mount -a command is invoked, without requiring you to edit the

    /etc/vfstab file.

    The mountpoint property is inherited. For example, if pool/home has its mountpoint set

    to /export/stuff, then pool/home/user inherits /export/stuff/user for its

    mountpoint property.

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 34

  • 8/16/2019 D69337.pdf

    59/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Managing ZFS Mount Points

    • You can set the mountpoint property to none to prevent

    a file system from being mounted.• If desired, you can explicitly manage file systems through

    legacy mount interfaces by setting the mountpoint

    property to legacy.

    Managing ZFS Mount PointsYou can explicitly manage file systems through legacy mount interfaces by setting themountpoint property to legacy by using zfs set. Doing so prevents the ZFS from

    automatically mounting and managing this file system. Legacy tools including the mount and

    umount commands and the /etc/vfstab file must be used instead.

    When changing mount point management strategies, the following behaviors apply:

    •  Automatic mount point behavior 

    • Legacy mount point behavior 

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 35

  • 8/16/2019 D69337.pdf

    60/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Automatic Mount Points

    • When you create a pool, you can set the default mount

    point for the root dataset by using zpool create -m.•  Any dataset whose mountpoint property is not legacy

    is managed by the ZFS.

    • When you change the mountpoint property, the file

    system is automatically unmounted from the old mount

    point and remounted to the new mount point.

    • Mount point directories are created as needed.

    Automatic Mount Points• When changing from legacy or none, the ZFS automatically mounts the file system.

    • If the ZFS is currently managing the file system but it is currently unmounted, and themountpoint property is changed, the file system remains unmounted.

    You can also set the default mount point for the root dataset at pool creation time by usingzpool create with the -m option.

     Any dataset whose mountpoint property is not legacy is managed by the ZFS. In the

    following example, a dataset is created whose mount point is automatically managed by the

    ZFS:

    # zfs create pool/filesystem# zfs get mountpoint pool/filesystem

    NAME PROPERTY VALUE SOURCE

    pool/filesystem mountpoint /pool/filesystem default

    # zfs get mounted pool/filesystem

    NAME PROPERTY VALUE SOURCE

    pool/filesystem mounted yes -

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 36

  • 8/16/2019 D69337.pdf

    61/383

    Automatic Mount Points (continued)

    You can also explicitly set the mountpoint property, as shown in the following example:

    # zfs set mountpoint=/mnt pool/filesystem

    # zfs get mountpoint pool/filesystem

    NAME PROPERTY VALUE SOURCE

    pool/filesystem mountpoint /mnt local

    # zfs get mounted pool/filesystem

    NAME PROPERTY VALUE SOURCE

    pool/filesystem mounted yes -

    When the mountpoint property is changed, the file system is automatically unmounted from

    the old mount point and remounted to the new mount point. Mount point directories are

    created as needed. If the ZFS is unable to unmount a file system due to its being active, an

    error is reported and a forced manual unmount is necessary.

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 37

  • 8/16/2019 D69337.pdf

    62/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Legacy Mount Points

    The following examples show how to set up and manage a ZFS

    dataset in legacy mode:

    # zfs set mountpoint=legacy tank/home/eschrock

    # mount -F zfs tank/home/eschrock /mnt

    Legacy Mount PointsManage ZFS file systems with legacy tools by setting the mountpoint property to legacy.

    Manage the legacy file systems through the mount and umount commands and the

    /etc/vfstab file. The ZFS does not automatically mount legacy file systems on boot, and

    the zfs mount and zfs umount commands do not operate on datasets of this type. The

    following examples show how to set up and manage a ZFS dataset in legacy mode:

    # zfs set mountpoint=legacy tank/home/eschrock

    # mount -F zfs tank/home/eschrock /mnt

    If you set up separate ZFS /usr or /var file systems, you must indicate that they are legacy

    file systems. You must mount them by creating entries in the /etc/vfstab file. Otherwise,

    the system/filesystem/local service enters maintenance mode when the system boots.

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 38

  • 8/16/2019 D69337.pdf

    63/383

    Legacy Mount Points (continued)

    To automatically mount a legacy file system on boot, you must add an entry to the/etc/vfstab file. The following example shows what the entry in the /etc/vfstab file

    might look like:

    #device device mount FS fsck mount

    mount

    #to mount to fsck point type pass at bootoptions

    #

    tank/home/eschrock - /mnt zfs - yes-

    The device to fsck and fsck pass entries are set to -. This syntax is used because

    the fsck command is not applicable to ZFS file systems.

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 39

  • 8/16/2019 D69337.pdf

    64/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Mounting ZFS File Systems

    • The ZFS automatically mounts file systems when they are

    created or when the system boots.• The zfs mount command is only necessary when

    changing mount options or explicitly mounting or 

    unmounting file systems.

    • The zfs mount command with no arguments shows all

    currently mounted file systems that are managed by the

    ZFS.

    Mounting ZFS File SystemsWith no arguments, the zfs mount command displays all currently mounted file systems that

    are managed by the ZFS. Legacy managed mount points are not displayed.

    Example:

    # zfs mount

    tank /tank

    tank/home /tank/home

    tank/home/bonwick /tank/home/bonwick

    tank/ws /tank/ws

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 40

  • 8/16/2019 D69337.pdf

    65/383

    Mounting ZFS File Systems (continued)By default, the ZFS does not allow mounting on top of a nonempty directory. To force a mount

    on top of a nonempty directory, use the -O option:

    # zfs mount tank/home/lalt

    cannot mount ’/export/home/lalt’: directory is not empty

    use legacy mountpoint to allow this behavior, or use the -O

    flag

    # zfs mount -O tank/home/lalt

    Use legacy tools to manage legacy mount points. Errors occur if you use ZFS tools, as in the

    following example:# zfs mount pool/home/billm

    cannot mount ’pool/home/billm’: legacy mountpoint

    use mount(1M) to mount this filesystem

    # mount -F zfs tank/home/billm

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 41

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Mounting ZFS File Systems

    You can use the -a option to mount all ZFS managed file

    systems, as in this example:

    # zfs mount –a

    • This command does not mount legacy managed file

    systems.

    • When a file system mounts, it uses a set of mount options

    based on the property values associated with the dataset.

  • 8/16/2019 D69337.pdf

    66/383

    Answer: a

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Quiz

    Which file or directory do you edit or modify to automatically

    mount a specific file system at boot time?a. /etc/vfstab

    b. /etc/mnttab

    c. /var/run

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 42

  • 8/16/2019 D69337.pdf

    67/383

  • 8/16/2019 D69337.pdf

    68/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Performing Unmounts

    To unmount a file system manually by using the directory

    mount point:

    # umount /export/home

    To unmount a file system manually by using the logical disk

    device name:

    # umount /dev/dsk/c0t0d0s7

    Unmounting a File System A file system is commonly unmounted if it needs to be checked and repaired by the fsck

    command or if it needs to be backed up completely.

    Some file system administration tasks cannot be performed on mounted file systems.

    To unmount a file system to prepare it for system maintenance, use the umount command.

    Unmounting a file system by using the umount command detaches it from the file system

    mount point and deletes its entry from the /etc/mnttab file system table.

    Note: Notify users before unmounting a file system that they are currently accessing.

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 44

  • 8/16/2019 D69337.pdf

    69/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Unmounting All File Systems

    • The umountall command unmounts all file systems

    specified in the /etc/vfstab file except / (root), /usr,/proc, /dev/fd, /var, /var/run, and /tmp.

    • Run the umountall command when you want to

    manually unmount all the file systems listed in the/etc/mnttab file.

    Unmounting All File SystemsThe /etc/mnttab file system table is read by the /usr/sbin/umountall command

    during the system shutdown sequence or when umountall is invoked from the command

    line.

    To unmount manually all the file systems listed in /etc/mnttab:

    # umountall

    To unmount only the local file systems listed in /etc/mnttab:

    # umountall -l

    To verify that a file system or a number of file systems have been unmounted, invoke the

    mount command and check the output.

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 45

  • 8/16/2019 D69337.pdf

    70/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Unmounting a Busy File System

    There are two methods to make a file system available for 

    unmounting if it is busy:• fuser command: Lists all of the processes that are

    accessing the file system and kills them if necessary

    • umount -f command: Forces the unmount of a file

    system

    Unmounting a Busy File System Any file system that is busy is not available for unmounting. Both the umount and

    umountall commands display the following error message:

    umount: file_system_name busy 

     A file system is considered to be busy if one of the following conditions exists:

    •  A program is accessing a file or directory in the file system.

    •  A user is accessing a directory or file in the file system.

    •  A program has a file open in the file system.

    • The file system is being shared.

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 46

  • 8/16/2019 D69337.pdf

    71/383

    Unmounting a Busy File System (continued)

    Note: The fuser command displays the process IDs of all processes currently using the

    specified file system. Each process ID is followed by a letter code. These letter codes are

    described in the man page for this command.

    Using the fuser Command

    To stop all processes that are currently accessing a file system:

    1. As the root user, list all of the processes that are accessing the file system. Use thefollowing command to identify which processes need to be terminated.

    # fuser -cu mount_point

    This command displays the name of the file system and the user login name for each process

    currently active in the file system.

    2. Kill all processes accessing the file system.

    # fuser -ck mount_point

     A SIGKILL message is sent to each process that is using the file system.

    3. Verify that there are no processes accessing the file system.

    # fuser -c mount_point4. Unmount the file system.

    # umount mount_point

    Using the umount -f Command

     As the root user, you can use the umount command with the -f (force) option to unmount a

    file system even if it is busy:

    umount -f mount_point

    This command unmounts the file system even if it contains open files. A forced unmount can

    result in loss of data and in zombie processes that are left running on the system. However, it

    is particularly useful for unmounting a shared file system if the remote file server isnonfunctional.

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 47

  • 8/16/2019 D69337.pdf

    72/383

  • 8/16/2019 D69337.pdf

    73/383

    Answer: b

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Quiz

    The fuser and umount –z commands are the two methods

    to make a busy file system available for unmounting.a. True

    b. False

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 49

  • 8/16/2019 D69337.pdf

    74/383

  • 8/16/2019 D69337.pdf

    75/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Repairing Files If Boot Fails

    on a SPARC System

    To boot from the Oracle Solaris OS software DVD to edit a

    misconfigured /etc/vfstab file:1. Insert the DVD in the CD-ROM drive.

    2. Execute a single-user boot from the DVD. On an x86/x64

    system, select the single-user shell option when it is presented.

    3. Use the fsck command on the faulty / (root) file system.

    4. Mount the / (root) file system on the /a directory

    5. Edit the /etc/vfstab file and correct any problems. Then exit

    the file.

    6. Unmount the file system.

    7. Reboot the system.

    Repairing Files If Boot Fails on a SPARC System1. Insert the DVD in the CD-ROM drive.

    2. Execute a single-user boot from the DVD.

    ok boot cdrom -s

    Boot device: /pci@1e,600000/ide@d/cdrom@2,0:f File and args

    -s

    Booting to milestone "milestone/single-user:default"

    Configuring devices.

    Using RPC Bootparams for network configuration information.

     Attempting to configure interface bge0...

    Skipped interface bge0

    Requesting System Maintenance Mode

    SINGLE USER MODE

    #

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 51

  • 8/16/2019 D69337.pdf

    76/383

    Repairing Files If Boot Fails on a SPARC System (continued)

    Note: Performing a single-user boot operation from this software CD-ROM creates an in-memory copy of the /root file system, which supports your ability to perform administrative

    tasks.

    3. Use the fsck command on the faulty / (root) partition to check and repair any

    potential problems in the file system and make the device writable.

    # fsck /dev/rdsk/c0t0d0s0

    4. If the fsck command is successful, mount the / (root) file system on the /a

    directory to gain access to the file system on disk.

    # mount /dev/dsk/c0t0d0s0 /a

    Then set and export the TERM variable, which enables the vi editor to work properly.

    # TERM=vt100

    # export TERM

    5. Edit the /etc/vfstab file and correct any problems. Then exit the file.

    # vi /a/etc/vfstab

    :wq!6. Unmount the file system.

    # cd /

    # umount /a

    7. Reboot the system.

    # init 6

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 52

  • 8/16/2019 D69337.pdf

    77/383

  • 8/16/2019 D69337.pdf

    78/383

    Repairing Files If Boot Fails on x86/x64 Systems (continued)

    The system presents the following list of installation methods and possible tasks to perform.

    Press the space bar to pause at this menu.

    1.Solaris Interactive (default)

    2.Custom Jump-start

    3.Solaris Interactive Text (Desktop session)

    4.Solaris Interactive Text (Console session)5.Apply driver updates

    6.Single user shell

    3. Enter 6 to select the single-user shell. The system searches for installed Oracle Solaris

    OS instances and asks if you want to mount the root file system on the /a mount point.

    Example:

    Searching for installed OS instances...

    Solaris 10 10/09 s10x_u8wos_08a X86 was found on

    /dev/dsk/c1d0s0.

    Do you wish to have it mounted read-write on /a? [y,n,?]5. Enter n to choose not to mount the file system.

    Do you wish to have it mounted read-write on /a? [y,n,?] n

    Starting shell.

    #

    4 Use the fsck command on the faulty / (root) partition to check and repair any potential

    problems in the file system and make the device writable.

    # fsck /dev/rdsk/c1d0s0

    5. If the fsck command is successful, mount the / (root) file system on the /a

    directory to gain access to the file system.# mount /dev/dsk/c1d0s0 /a

    Note: Set and export the TERM variable, which enables the vi editor to work properly.

    # TERM=vt100

    # Export TERM

    6. Edit the /etc/vfstab file and correct any problems. Then exit the file.

    # vi /a/etc/vfstab

    :wq!

    7. Unmount the /a file system

    # cd /# umount /a

    8. Eject the DVD and reboot the system.

    # init 6

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 54

  • 8/16/2019 D69337.pdf

    79/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Agenda

    • Identify mounting basics

    • Performing mounts• Mounting ZFS file systems

    • Performing unmounts

    • Repairing important files if boot fails

    •  Accessing a mounted diskette, CD-ROM, or DVD

    • Restricting access to a mounted diskette, CD-ROM, or

    DVD

    • Accessing a diskette, CD-ROM, or DVD without volumemanagement (vold)

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 55

  • 8/16/2019 D69337.pdf

    80/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Accessing Mounted Diskettes,

    CD-ROMs, and DVDs

    • To provide access to file systems on diskettes and

    CDROMs, the Oracle Solaris OS provides the VolumeManagement (vold) Service as the standard interface.

    • Volume management provides two benefits:

     – It automatically mounts removable media for both the root

    user and non-root users.

     – It can give other systems on the network automatic access to

    any removable media currently inserted in the local system.

    Accessing Mounted Diskettes, CD-ROMs, and DVDsThe Volume Management Service is controlled by the /usr/sbin/vold daemon. With a

    default install, this service automatically manages diskettes and CD-ROMs for regular users.

    The Volume Management Service features automatic DVD and CD-ROM detection. It doesnot detect the presence of a diskette that has been inserted in the drive until the volcheck

    command is run. This command instructs the vold daemon to check the diskette drive for

    any inserted media. The Volume Management Service can mount ufs, pcfs, hsfs, and

    udfs file systems.

    Note: The Oracle Solaris 10 OS includes support for additional removable media such as

    DVDs, Jaz drives, and Zip drives. For more information about using these devices, see the

    resources available on the Oracle Solaris 10 Documentation CD or visithttp:/docs.sun.com to access online documentation.

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 56

  • 8/16/2019 D69337.pdf

    81/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Accessing Mounted Diskettes,

    CD-ROMs, and DVDs

    Media Device Access File Systems On

    First diskette drive /floppy/floppy0

    First CD-ROM or DVD drive /cdrom/cdrom0

    First Jaz drive /rmdisk/jaz0

    First Zip drive /rmdrive/zip0

    First PCMIA card /pcmem0

    First thumbdrive /rmdisk/rmdisk0

    Accessing Mounted Diskettes, CD-ROMs, and DVDs (continued)To make working with diskettes, DVDs, and CD-ROMs simple, each device is easy to mount

    and mounts at an easy-to-remember location.

    If the vold daemon detects that the mounted device contains a file system, the device is

    mounted at the directory location. The table in the slide lists the directory locations of mounted

    devices that contain file systems.

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 57

  • 8/16/2019 D69337.pdf

    82/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Accessing Mounted Diskettes,

    CD-ROMs, and DVDs

    Media Device Access File Systems On

    First diskette drive /vol/dev/aliases/floppy0

    First CD-ROM or DVD drive /vol/dev/aliases/cdrom0

    First Jaz drive /vol/dev/aliases/jaz0

    First Zip drive /vol/dev/aliases/zip0

    First PCMIA card /vol/dev/aliases/pcmem0

    First thumbdrive /vol/dev/aliases/rmdisk0

    Accessing Mounted Diskettes, CD-ROMs, and DVDs (continued)If the vold daemon detects that the mounted device does not contain a file system, the

    device is accessible through a path.

    The table in the slide lists the paths for mounted devices that do not contain file systems.

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 58

  • 8/16/2019 D69337.pdf

    83/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Accessing Mounted Diskettes,

    CD-ROMs, and DVDs

    Media Device Access File Systems On

    /etc/vold.conf The vold configuration file. This file defines items

    such as what action should be taken when media

    is inserted or ejected, which devices are managedby vold, and which file system types are unsafe toeject.

    /etc/rmmount.conf The rmmount command configuration file. Thermmount command is a removable media mounter 

    that is executed by the vold daemon whenever a

    CD-ROM or diskette is inserted.

    Accessing Mounted Diskettes, CD-ROMs, and DVDs (continued)When the Volume Management Service is running on the system, a regular user can easily

    access a diskette or CD-ROM by following these basic steps:

    1. Insert the media.

    2. For diskettes only, enter the volcheck command.

    3. Use the cd command to change to the directory of the mounted volume.

    4. Work with files on the media.

    5. Use the cd command to leave the directory structure of the mounted volume.

    6. Eject the media.

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 59

  • 8/16/2019 D69337.pdf

    84/383

    Answer: b

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Quiz

    Which of the following file system types do you use with the

    mount command to mount a file system that resides on adiskette when the vold services are stopped?

    a. zfs

    b. pcfs

    c. hsfs

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 60

  • 8/16/2019 D69337.pdf

    85/383

    Answer: c

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Quiz

    Which command do you use to unmount a file system by using

    the logical disk device name?a. Unmount /export/home

    b. unmountall

    c. Umount /dev/dsk/c0t0d0s7

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 61

  • 8/16/2019 D69337.pdf

    86/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Agenda

    • Identifying mounting basics

    • Performing mounts• Mounting ZFS file systems

    • Performing unmounts

    • Repairing important files if boot fails

    • Accessing a mounted diskette, CD-ROM, or DVD

    • Restricting access to a mounted diskette, CD-ROM, or

    DVD

    • Accessing a diskette, CD-ROM, or DVD without volumemanagement (vold)

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 62

  • 8/16/2019 D69337.pdf

    87/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Stopping Volume Management (vold)

    To stop volume management (vold) from running on a

    system temporarily:

    # svcadm disable svc:/system/filesystem/volfs:default

    To restart volume management (vold):

    # svcadm enable svc:/system/filesystem/volfs:default

    Stopping Volume Management (vold)You can, as the root user, disable the Volume Management Service to restrict regular users

    from accessing diskettes or CD-ROMs on the system.

    To stop the Volume Management Service from running on a system, execute the followingcommand as the root user:

    # svcadm disable svc:/system/filesystem/volfs:default

    To restart the service, execute this command as the root user:

    # svcadm enable svc:/system/filesystem/volfs:default

    Legacy syntax to start and stop the Volume Management Service is provided in Oracle

    Solaris 10. The /etc/init.d/volmgt script calls the svcadm command with thearguments required to stop and start the vold daemon. You can use the following legacy

    commands to stop and start the service:

    # /etc/init.d/volmgt stop

    # /etc/init.d/volmgt start

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 63

  • 8/16/2019 D69337.pdf

    88/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Troubleshooting the Volume Management Service

    If a CD-ROM fails to eject from the drive, you should attempt to

    stop the Volume Management Service. If this is not successful,stop the vold daemon.

    # svcadm disable svc:/system/filesystem/volfs:default

    Troubleshooting the Volume Management Service As a last resort, you can run the following command:

    # pkill -9 vold

    Push the button on the system to eject the CD-ROM. The CD-ROM tray ejects. Remove the

    CD-ROM and leave the tray out. Then enable the Volume Management Service:

    # svcadm enable svc:/system/filesystem/volfs:default

    Wait a few seconds and then push the CD-ROM tray back into the drive.

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 64

  • 8/16/2019 D69337.pdf

    89/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Agenda

    • Identifying mounting basics

    • Performing mounts• Mounting ZFS file systems

    • Performing unmounts

    • Repairing important files if boot fails

    • Accessing a mounted diskette, CD-ROM, or DVD

    • Restricting access to a mounted diskette, CD-ROM, or

    DVD

    •  Accessing a diskette, CD-ROM, or DVD without volumemanagement (vold)

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 65

  • 8/16/2019 D69337.pdf

    90/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Accessing a Diskette, CD-ROM, or DVD

    Without Volume Management

    1. Insert the media device

    2. Become the root user.3. Create a mount point if necessary.

    4. Determine the file system type.

    5. Mount the device by using the mount options listed in the

    following slides.

    6. Work with files on the media device.

    7. Unmount the media device.

    8. Eject the media device.

    9. Exit the root session.

    Accessing a Diskette, CD-ROM, or DVD Without Volume ManagementWhen the vold daemon is not running, only the root user can mount and access a diskette or

    CD-ROM.

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 66

  • 8/16/2019 D69337.pdf

    91/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Using the mount Command

     As the root user, run the following command to mount a file

    system that resides on a DVD or CD-ROM when the VolumeManagement Service is stopped:

    # mount -F hsfs -o ro /dev/dsk/c0t2d0s2 /cdrom 

    Using the mount CommandIn the example in the slide, the file system type is hsfs, the file system resides on CD-ROM

    slice /dev/dsk/c0t2d0s2, and the mount point /cdrom is an existing directory in the

    Oracle Solaris OS.

    Note: Different systems use different names for their DVD or CD-ROM devices. This example

    is from a Sun Blade 1500 system.

     As the root user, you mount a file system that resides on a diskette when the Volume

    Management Service is stopped as follows:

    # mkdir /pcfs

    # mount -F pcfs /dev/diskette /pcfsIn this example, the file system type is pcfs. This file system resides on the /dev/diskette

    device, and the mount point used is /pcfs.

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 67

  • 8/16/2019 D69337.pdf

    92/383

    Answer: a

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Quiz

    Which command do you use to stop the Volume Management

    Service from running on a system?a. svcadm disable

    svc:/system/filesystem/folfs:default

    b. svcadm enable

    svc:/system/filesystem/volfs:default

    c. svcadm enable volfs

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 68

  • 8/16/2019 D69337.pdf

    93/383

    Answer: b

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Quiz

    Which command do you use to mount a CD-ROM if vold is not

    running?a. volcheck –v

    b. mount –F hsfs –o ro /dev/dsk/devicename /cdrom

    c. mount –F pcfs –o ro /dev/dsk/devicename /cdrom

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 69

  • 8/16/2019 D69337.pdf

    94/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Practice 7 Overview:

    Mounting File Systems

    This practice covers the following topics:

    • Creating mount points• Mounting file systems

    • Specifying mount options

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 70

  • 8/16/2019 D69337.pdf

    95/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Summary

    In this lesson, you should have learned how to:

    • Identify mounting basics• Perform mounts

    • Mount ZFS file systems

    • Perform unmounts

    • Repair important files if boot fails

    •  Access a mounted diskette, CD-ROM, or DVD

    • Restrict access to a mounted diskette, CD-ROM, or DVD

    •  Access a diskette, CD-ROM, or DVD without volumemanagement (vold)

    System Administration for the Oracle Solaris 10 OS Part 1 7 - 71

  • 8/16/2019 D69337.pdf

    96/383

  • 8/16/2019 D69337.pdf

    97/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Performing Package Administration

  • 8/16/2019 D69337.pdf

    98/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Objectives

     After completing this lesson, you should be able to:

    • Describe the fundamentals of package administration•  Administer packages by using the command-line interface

    System Administration for the Oracle Solaris 10 OS Part 1 8 - 2

  • 8/16/2019 D69337.pdf

    99/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Agenda

    • Describing the fundamentals of package administration

    • Administering packages by using the command-lineinterface

    System Administration for the Oracle Solaris 10 OS Part 1 8 - 3

  • 8/16/2019 D69337.pdf

    100/383

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

    Package Administration Fundamentals

    • Software package administration adds software to―and

    removes software from―

    systems.• Software packages contain the following:

     – Files that describe the package and the amount of disk

    space required for installation

     – Compressed software files to be installed on the system


Recommended