disks.pdf

382
Oracle® Solaris Administration: Devices and File Systems Part No: 821–1459–12 February 2012

Upload: elie-el-masry

Post on 17-Dec-2015

42 views

Category:

Documents


0 download

TRANSCRIPT

  • Oracle Solaris Administration: Devices andFile Systems

    Part No: 821145912February 2012

  • Copyright 2004, 2012, Oracle and/or its affiliates. All rights reserved.

    This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectualproperty laws. Except as expressly permitted in your license agreement or allowed by law, youmay not use, copy, reproduce, translate, broadcast, modify, license,transmit, distribute, exhibit, perform, publish or display any part, in any form, or by anymeans. Reverse engineering, disassembly, or decompilation of this software,unless required by law for interoperability, is prohibited.

    The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

    If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice isapplicable:

    U.S. GOVERNMENTRIGHTS. Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are"commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplementalregulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicableGovernment contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, CommercialComputer Software License (December 2007). Oracle America, Inc., 500 Oracle Parkway, Redwood City, CA 94065.

    This software or hardware is developed for general use in a variety of informationmanagement applications. It is not developed or intended for use in any inherentlydangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shallbe responsible to take all appropriate fail-safe, backup, redundancy, and othermeasures to ensure its safe use. Oracle Corporation and its affiliates disclaim anyliability for any damages caused by use of this software or hardware in dangerous applications.

    Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other namesmay be trademarks of their respective owners.

    Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registeredtrademarks of SPARC International, Inc. AMD,Opteron, the AMD logo, and the AMDOpteron logo are trademarks or registered trademarks of AdvancedMicroDevices. UNIX is a registered trademark of TheOpenGroup.

    This software or hardware and documentationmay provide access to or information on content, products, and services from third parties. Oracle Corporation andits affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporationand its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.

    Ce logiciel et la documentation qui laccompagne sont protgs par les lois sur la proprit intellectuelle. Ils sont concds sous licence et soumis des restrictionsdutilisation et de divulgation. Sauf disposition de votre contrat de licence ou de la loi, vous ne pouvez pas copier, reproduire, traduire, diffuser, modifier, breveter,transmettre, distribuer, exposer, excuter, publier ou afficher le logiciel, mme partiellement, sous quelque forme et par quelque procd que ce soit. Par ailleurs, il estinterdit de procder toute ingnierie inverse du logiciel, de le dsassembler ou de le dcompiler, except des fins dinteroprabilit avec des logiciels tiers ou tel queprescrit par la loi.

    Les informations fournies dans ce document sont susceptibles demodification sans pravis. Par ailleurs, Oracle Corporation ne garantit pas quelles soient exemptesderreurs et vous invite, le cas chant, lui en faire part par crit.

    Si ce logiciel, ou la documentation qui laccompagne, est concd sous licence au Gouvernement des Etats-Unis, ou toute entit qui dlivre la licence de ce logicielou lutilise pour le compte duGouvernement des Etats-Unis, la notice suivante sapplique:

    U.S. GOVERNMENTRIGHTS. Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are"commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplementalregulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicableGovernment contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, CommercialComputer Software License (December 2007). Oracle America, Inc., 500 Oracle Parkway, Redwood City, CA 94065.

    Ce logiciel oumatriel a t dvelopp pour un usage gnral dans le cadre dapplications de gestion des informations. Ce logiciel oumatriel nest pas conu ni nestdestin tre utilis dans des applications risque, notamment dans des applications pouvant causer des dommages corporels. Si vous utilisez ce logiciel oumatrieldans le cadre dapplications dangereuses, il est de votre responsabilit de prendre toutes les mesures de secours, de sauvegarde, de redondance et autres mesuresncessaires son utilisation dans des conditions optimales de scurit. Oracle Corporation et ses affilis dclinent toute responsabilit quant aux dommages causspar lutilisation de ce logiciel oumatriel pour ce type dapplications.

    Oracle et Java sont desmarques dposes dOracle Corporation et/ou de ses affilis. Tout autre nommentionn peut correspondre desmarques appartenant dautres propritaires quOracle.

    Intel et Intel Xeon sont desmarques ou desmarques dposes dIntel Corporation. Toutes les marques SPARC sont utilises sous licence et sont desmarques ou desmarques dposes de SPARC International, Inc. AMD,Opteron, le logo AMD et le logo AMDOpteron sont desmarques ou desmarques dposes dAdvancedMicroDevices. UNIX est unemarque dpose dTheOpenGroup.

    Ce logiciel oumatriel et la documentation qui laccompagne peuvent fournir des informations ou des liens donnant accs des contenus, des produits et des servicesmanant de tiers. Oracle Corporation et ses affilis dclinent toute responsabilit ou garantie expresse quant aux contenus, produits ou services manant de tiers. Enaucun cas, Oracle Corporation et ses affilis ne sauraient tre tenus pour responsables des pertes subies, des cots occasionns ou des dommages causs par laccs des contenus, produits ou services tiers, ou leur utilisation.

    120305@25097

  • Contents

    Preface ...................................................................................................................................................17

    1 ManagingRemovableMedia (Overview) ........................................................................................21What's New in RemovableMedia? .................................................................................................... 21

    Changes and Improvements to RemovableMediaManagement .......................................... 21Where to FindManaging RemovableMedia Tasks ......................................................................... 24RemovableMedia Features and Benefits .......................................................................................... 25Comparison ofManual and AutomaticMounting ......................................................................... 25Overview of Accessing RemovableMedia ........................................................................................ 26

    2 ManagingRemovableMedia (Tasks) ...............................................................................................27Managing RemovableMedia (TaskMap) ........................................................................................ 27Preparing RemovableMedia .............................................................................................................. 28

    RemovableMedia Considerations ............................................................................................. 28How to Load RemovableMedia ................................................................................................. 29How to Format a Diskette (rmformat) ....................................................................................... 30How to Create a File System on RemovableMedia .................................................................. 31How to Create a File System on aDVD-RAM .......................................................................... 32How to Check a File System on RemovableMedia .................................................................. 32How to Repair Bad Blocks on RemovableMedia ..................................................................... 33

    Applying Read orWrite Protection and Password Protection to RemovableMedia .......... 33How to Enable or DisableWrite Protection on RemovableMedia ........................................ 33How to Enable or Disable Read orWrite Protection and Set a Password on Removable

    Media ............................................................................................................................................. 34

    3 AccessingRemovableMedia (Tasks) ................................................................................................35Accessing RemovableMedia (TaskMap) ......................................................................................... 35

    3

  • Accessing RemovableMedia .............................................................................................................. 36Using RemovableMedia Names ................................................................................................ 36Guidelines for Accessing RemovableMedia Data ................................................................... 36

    How to Add aNewRemovableMedia Drive ............................................................................ 36How toDisable or Enable RemovableMedia Services ............................................................. 37How to Access Information on RemovableMedia .................................................................. 38How to Copy Information FromRemovableMedia ................................................................ 38How toDetermine If RemovableMedia Is Still in Use ............................................................ 39How to Eject RemovableMedia .................................................................................................. 39

    Accessing RemovableMedia on a Remote System (TaskMap) ..................................................... 40How toMake LocalMedia Available to Other Systems ........................................................... 40How to Access RemovableMedia on Remote Systems ............................................................ 41

    4 WritingCDs andDVDs (Tasks) ........................................................................................................... 43WorkingWith Audio CDs andData CDs andDVDs ..................................................................... 43

    CD/DVDMedia Commonly Used Terms ................................................................................ 44Writing CD andDVDData and Audio CDs .................................................................................... 45

    Restricting User Access to RemovableMediaWith RBAC ..................................................... 46How to Restrict User Access to RemovableMediaWith RBAC ............................................. 46How to Identify a CD or DVDWriter ....................................................................................... 47How to Check the CD or DVDMedia ....................................................................................... 47

    Creating a Data CD or DVD ....................................................................................................... 48How to Create an ISO 9660 File System for a Data CD or DVD ............................................. 48How to Create aMulti-SessionData CD ................................................................................... 49

    Creating an Audio CD ................................................................................................................. 51How to Create an Audio CD ....................................................................................................... 51How to Extract an Audio Track on a CD ................................................................................... 52How to Copy a CD ....................................................................................................................... 53How to Erase CD-RWMedia ..................................................................................................... 54

    5 ManagingDevices (Overview/Tasks) ...............................................................................................55What's New inDeviceManagement? ................................................................................................ 56

    Customizing Driver Configuration ........................................................................................... 56Solaris PCI ResourceManager ................................................................................................... 56New InfiniBand Administration Features ................................................................................. 57

    Contents

    Oracle Solaris Administration: Devices and File Systems February 20124

  • New InfiniBandDiagnostic Tools and Commands ................................................................. 57New Ethernet Over InfiniBandDevices .................................................................................... 57NewHot Plugging Features ........................................................................................................ 57Device Naming Enhancements .................................................................................................. 58Support for PCI Express (PCIe) ................................................................................................. 58

    Where to Find Additional DeviceManagement Tasks ................................................................... 59Managing Devices in the Oracle Solaris OS ..................................................................................... 60

    Identifying Device Support ......................................................................................................... 60About Device Drivers .................................................................................................................. 60Automatic Configuration of Devices ......................................................................................... 61Displaying Device Configuration Information ........................................................................ 63Resolving Faulty Devices ............................................................................................................. 67

    Adding a Peripheral Device to a System ........................................................................................... 69How to Add a Peripheral Device ................................................................................................ 69How to Add aDevice Driver ....................................................................................................... 70

    Accessing Devices ................................................................................................................................ 71HowDevice Information Is Created .......................................................................................... 71HowDevices AreManaged ......................................................................................................... 72Device Naming Conventions ..................................................................................................... 72Logical Disk Device Names ........................................................................................................ 73Logical Tape Device Names ........................................................................................................ 75Logical RemovableMedia Device Names ................................................................................. 76

    6 Dynamically ConfiguringDevices (Tasks) .......................................................................................77Dynamic Reconfiguration andHot-Plugging .................................................................................. 77

    Attachment Points ....................................................................................................................... 79Detaching PCI or PCIe Adapter Cards ...................................................................................... 80Attaching PCI or PCIe Adapter Cards ....................................................................................... 81PCIe Hot-PluggingWith the (hotplug) Command ................................................................ 81

    SCSI Hot-PluggingWith the cfgadmCommand (TaskMap) ....................................................... 83SCSI Hot-PluggingWith the cfgadmCommand ............................................................................. 84How toDisplay Information About SCSI Devices ................................................................... 84How toUnconfigure a SCSI Controller ..................................................................................... 85How to Configure a SCSI Controller ......................................................................................... 85How to Configure a SCSI Device ................................................................................................ 86

    Contents

    5

  • How toDisconnect a SCSI Controller ....................................................................................... 86 SPARC: How to Connect a SCSI Controller ............................................................................. 87 SPARC: How to Add a SCSI Device to a SCSI Bus ................................................................... 88 SPARC: How to Replace an Identical Device on a SCSI Controller ....................................... 89 SPARC: How to Remove a SCSI Device .................................................................................... 90

    Troubleshooting SCSI Configuration Problems ...................................................................... 91How to Resolve a Failed SCSI Unconfigure Operation ........................................................... 93

    PCI or PCIe Hot-PluggingWith the cfgadmCommand (TaskMap) ........................................... 93PCI or PCIe Hot-PluggingWith the cfgadmCommand ................................................................ 94

    PCIe LED Indicator Behavior ..................................................................................................... 94How toDisplay PCI Slot Configuration Information ............................................................. 94How to Remove a PCI Adapter Card ......................................................................................... 96How to Add a PCI Adapter Card ................................................................................................ 97

    Troubleshooting PCI Configuration Problems ....................................................................... 99SATAHot-PluggingWith the cfgadmCommand ......................................................................... 100How toUnconfigure a SATADevice ....................................................................................... 100How to Configure a SATADevice ............................................................................................ 101

    Reconfiguration CoordinationManager (RCM) Script Overview ............................................. 101What Is an RCMScript? ............................................................................................................ 102What Can an RCMScript Do? ................................................................................................. 102HowDoes the RCMScript ProcessWork? ............................................................................. 102

    RCMScript Tasks .............................................................................................................................. 103ApplicationDeveloper RCMScript (TaskMap) .................................................................... 103SystemAdministrator RCMScript (TaskMap) ..................................................................... 104Naming an RCMScript ............................................................................................................. 104Installing or Removing an RCMScript ................................................................................... 105

    How to Install an RCMScript ................................................................................................... 105How to Remove an RCMScript ............................................................................................... 105How to Test an RCMScript ...................................................................................................... 106

    Tape Backup RCMScript Example .......................................................................................... 106

    7 UsingUSBDevices (Overview) .........................................................................................................111What's New inUSBDevices? ........................................................................................................... 112

    USB Interface AssociationDescriptor Support ...................................................................... 112EHCI Isochronous Transfer Support ...................................................................................... 112

    Contents

    Oracle Solaris Administration: Devices and File Systems February 20126

  • USBDevice Hotpluggable Behavior ........................................................................................ 112x86: Support for USBCDs andDVDs in GRUB-Based Booting .......................................... 113USBVirtual Keyboard andMouse Support ............................................................................ 113

    Oracle Solaris Support for USBDevices ......................................................................................... 114Overview of USBDevices ................................................................................................................. 115

    Commonly UsedUSBAcronyms ............................................................................................ 115USB Bus Description ................................................................................................................. 115

    About USB in the Oracle Solaris OS ................................................................................................ 120USB 2.0 Features ......................................................................................................................... 120USBKeyboards andMouse Devices ........................................................................................ 122USBHost Controller andHubs ................................................................................................ 123Guidelines for USBCables ........................................................................................................ 124

    8 UsingUSBDevices (Tasks) ................................................................................................................127Managing USBDevices in the Oracle Solaris OS (Roadmap) ...................................................... 127Using USBMass Storage Devices (TaskMap) ............................................................................... 128Using USBMass Storage Devices .................................................................................................... 129

    Using USBDiskette Devices ..................................................................................................... 130Using Non-Compliant USBMass Storage Devices ............................................................... 131Hot-Plugging USBMass Storage Devices ............................................................................... 131Preparing to Use a USBMass Storage Device ......................................................................... 135

    How toDisplay USBDevice Information ............................................................................... 135How to Create a File System on aUSBMass Storage Device ................................................ 136How toModify Partitions and Create a PCFS File System on aUSBMass Storage

    Device .......................................................................................................................................... 138How to Create a Solaris Partition andModify the Slices on a USBMass Storage Device .. 141How toMount or Unmount a USBMass Storage Device ..................................................... 143

    Troubleshooting Tips for USBMass Storage Devices ........................................................... 144Disabling Specific USBDrivers ................................................................................................ 145

    How toDisable Specific USBDrivers ...................................................................................... 145How to Remove UnusedUSBDevice Links ........................................................................... 146

    Using USBAudio Devices (TaskMap) ........................................................................................... 146Using USBAudio Devices ................................................................................................................ 147

    Hot-PluggingMultiple USBAudio Devices ........................................................................... 148How to AddUSBAudio Devices .............................................................................................. 148

    Contents

    7

  • How to Identify Your System's Primary Audio Device ......................................................... 148How to Change the Primary USBAudio Device .................................................................... 149

    Troubleshooting USBAudio Device Problems ...................................................................... 149Hot-Plugging USBDevicesWith the cfgadmCommand (TaskMap) ........................................ 150

    Hot-Plugging USBDevicesWith the cfgadmCommand ..................................................... 151How toDisplay USB Bus Information (cfgadm) .................................................................... 151How toUnconfigure a USBDevice .......................................................................................... 152How to Configure a USBDevice .............................................................................................. 153How to Logically Disconnect a USBDevice ........................................................................... 153How to Logically Connect a USBDevice ................................................................................ 154How to Logically Disconnect a USBDevice Subtree ............................................................. 154How to Reset a USBDevice ....................................................................................................... 155How to Change the Default Configuration of aMulti-ConfigurationUSBDevice ........... 155

    9 Using InfiniBandDevices (Overview/Tasks) ..................................................................................157Overview of InfiniBandDevices ...................................................................................................... 157

    InfiniBand Software Packages .................................................................................................. 159Dynamically Reconfiguring IBDevices (TaskMap) ..................................................................... 159Dynamically Reconfiguring IBDevices (cfgadm) ......................................................................... 161

    Unconfiguring IBDevice Considerations .............................................................................. 162How toDisplay IBDevice Information ................................................................................... 162How toUnconfigure an IB Port, HCA_SVC, or a VPPADevice .......................................... 164How to Configure a IB Port, HCA_SVC, or a VPPADevice ................................................. 164How toUnconfigure an IB PseudoDevice .............................................................................. 165How to Configure an IB PseudoDevice .................................................................................. 165How toDisplay Kernel IB Clients of anHCA ......................................................................... 166How toDynamically Reconfigure anHCAWith Active EoIBDevices ............................... 166How to Reconfigure and Restore an EoIB Interface After Hot Removal ............................. 167

    Configuring an IBHCA ............................................................................................................ 168How toUpdate the IB P_keyTables ......................................................................................... 168How toDisplay IB Communication Services ......................................................................... 169How to Add a VPPACommunication Service ....................................................................... 169How to Remove an Existing IB Port, HCA_SVC, or a VPPACommunication Service .... 170

    Using the uDAPLApplication InterfaceWith InfiniBandDevices ............................................. 170How to Enable uDAPL .............................................................................................................. 171

    Contents

    Oracle Solaris Administration: Devices and File Systems February 20128

  • Updating the DAT Static Registry ............................................................................................ 171Administering IPoIBDevices (dladm) ............................................................................................ 173How toDisplay Physical Data Link Information ................................................................... 173How to Create IB Partition Links ............................................................................................. 173How toDisplay IB Partition Link Information ...................................................................... 174How to Remove an IB Partition Link ....................................................................................... 175

    Monitoring and Troubleshooting IBDevices ................................................................................ 175

    10 ManagingDisks (Overview) .............................................................................................................179What's New inDiskManagement? ................................................................................................. 179

    Identifying Devices by Physical Locations .............................................................................. 180Multiple Disk Sector Size Support ........................................................................................... 183Two-Terabyte Disk Support for Installing and Booting the Oracle Solaris OS .................. 183iSNS Support in the Solaris iSCSI Target and Initiator ......................................................... 184Solaris COMSTAR iSCSI Support ........................................................................................... 184x86: DiskManagement in the GRUBBoot Environment ..................................................... 184Support for SCSI Disks That are Larger Than 2 Terabytes ................................................... 185

    Where to FindDiskManagement Tasks ........................................................................................ 185Overview of DiskManagement ....................................................................................................... 186

    Disk Terminology ...................................................................................................................... 186About Disk Labels ...................................................................................................................... 186EFI Disk Label ............................................................................................................................ 187About Disk Slices ....................................................................................................................... 190formatUtility ............................................................................................................................. 191

    Partitioning a Disk ............................................................................................................................. 194Partition Table Terminology .................................................................................................... 194Displaying Partition Table Information .................................................................................. 195Using the Free Hog Slice ............................................................................................................ 197

    11 AdministeringDisks (Tasks) .............................................................................................................199Administering Disks (TaskMap) .................................................................................................... 199Identifying Disks on a System .......................................................................................................... 200How to Identify the Disks on a System .................................................................................... 200

    Formatting a Disk .............................................................................................................................. 202How toDetermine if a Disk Is Formatted ............................................................................... 202

    Contents

    9

  • How to Format a Disk ................................................................................................................ 203Displaying Disk Slices ....................................................................................................................... 204How toDisplay Disk Slice Information ................................................................................... 204

    Creating and Examining a Disk Label ............................................................................................. 206How to Label a Disk ................................................................................................................... 206How to Examine a Disk Label ................................................................................................... 211

    Recovering a Corrupted Disk Label ................................................................................................ 212How to Recover a Corrupted Disk Label ................................................................................. 212

    Adding a Third-Party Disk ............................................................................................................... 214

    12 SPARC: SettingUpDisks (Tasks) ...................................................................................................... 217SPARC: Setting upDisks for ZFS File Systems (TaskMap) .......................................................... 217

    SPARC: Setting UpDisks for ZFS File Systems ...................................................................... 218 SPARC: How to Set Up aDisk for a ZFS Root File System .................................................... 219

    SPARC: Creating a Disk Slice for a ZFS Root File System ..................................................... 219 SPARC: How to Create a Disk Slice for a ZFS Root File System ........................................... 220 SPARC: How to Install Boot Blocks for a ZFS Root File System ........................................... 223 SPARC: How to Set Up aDisk for a ZFS File System ............................................................. 224

    13 x86: SettingUpDisks (Tasks) ........................................................................................................... 227x86: Setting UpDisks for ZFS File Systems (TaskMap) ............................................................... 227

    x86: Setting UpDisks for ZFS File Systems ............................................................................. 228Creating and Changing Solaris fdisk Partitions ............................................................................. 235

    x86: Guidelines for Creating an fdisk Partition .................................................................... 235 x86: How to Create a Solaris fdisk Partition .......................................................................... 236

    Changing the fdisk Partition Identifier .................................................................................. 238How to Change the Solaris fdisk Identifier ........................................................................... 238

    14 Configuring StorageDevicesWith COMSTAR ............................................................................... 241COMSTAR and iSCSI Technology (Overview) ............................................................................ 241

    COMSTAR Software andHardware Requirements .............................................................. 243Configuring COMSTAR (TaskMap) ............................................................................................. 243

    Configuring COMSTAR ........................................................................................................... 245Configuring iSCSI DevicesWith COMSTAR ................................................................................ 247

    Contents

    Oracle Solaris Administration: Devices and File Systems February 201210

  • How to Enable the STMF Service ............................................................................................. 247How to BackUp and Restore a COMSTARConfiguration .................................................. 248How to Create an iSCSI LUN .................................................................................................... 248How to Create the iSCSI Target ................................................................................................ 250How to Configure an IBHCA for iSER ................................................................................... 250How to Configure an iSCSI Initiator ....................................................................................... 251How to Remove Discovered iSCSI Targets ............................................................................. 253

    Creating iSCSI Target Portal Groups ...................................................................................... 254How to Access iSCSI Disks ....................................................................................................... 256

    Making SCSI Logical Units Available ...................................................................................... 256How toMake a Logical Unit Available to All Systems ........................................................... 257How to Restrict LUNAccess to Selected Systems .................................................................. 257

    Configuring Fibre Channel DevicesWith COMSTAR ................................................................ 259Configuring Fibre Channel Ports For COMSTAR ................................................................ 259Making Logical Units Available for FC and FCoE ................................................................. 261

    Configuring FCoEDevicesWith COMSTAR ............................................................................... 263Configuring FCoE Ports ............................................................................................................ 263Enabling 802.3x PAUSE and Jumbo Frames on the Ethernet Interface ............................... 264

    How to Create FCoE Target Ports ............................................................................................ 264How to Verify That an FCoE Target Port IsWorking ........................................................... 264How toDelete FCoE Target Ports ............................................................................................ 265

    Configuring SRPDevicesWith COMSTAR .................................................................................. 266Using COMSTARViewsWith SRP ......................................................................................... 266

    How to Enable the SRP Target Service .................................................................................... 267How to Verify SRP Target Status ............................................................................................. 267

    Configuring Authentication in Your iSCSI-Based Storage Network .......................................... 267How to Configure CHAPAuthentication for Your iSCSI Initiator ..................................... 268How to Configure CHAPAuthentication for Your iSCSI Target ........................................ 270

    Using a Third-Party RADIUS Server to Simplify CHAPManagement in Your iSCSIConfiguration ............................................................................................................................. 270

    Setting Up iSCSIMultipathedDevices in Oracle Solaris .............................................................. 273How to EnableMultiple iSCSI Sessions for a Target .............................................................. 274

    Monitoring Your iSCSI Configuration ........................................................................................... 276How toDisplay iSCSI Configuration Information ................................................................ 276

    Modifying iSCSI Initiator and Target Parameters ......................................................................... 278Tuning iSCSI Parameters .......................................................................................................... 278

    Contents

    11

  • How toModify iSCSI Initiator and Target Parameters ......................................................... 280Troubleshooting iSCSI Configuration Problems .......................................................................... 283

    NoConnections to the iSCSI Target From the Local System ............................................... 284iSCSI Device or Disk Is Not Available on the Local System .................................................. 285Use LUNMaskingWhenUsing the iSNSDiscoveryMethod .............................................. 285General iSCSI ErrorMessages .................................................................................................. 286

    15 Configuring andManaging theOracle Solaris Internet StorageNameService (iSNS) ..........291The iSNS Technology (Overview) ................................................................................................... 291Configuring the iSNS Server ............................................................................................................ 293

    Setting Up the iSNSAdministrative Settings .......................................................................... 294Using the Command Line Interface to Configure iSNS ........................................................ 296

    Managing the iSNS Server and Clients ........................................................................................... 299How toDisplay the Status of a Discovery Domain Set .......................................................... 299How toDisplay the Status of a Discovery Domain ................................................................ 300How toDisplay the Status of Clients ........................................................................................ 300How to Remove a Client from aDiscovery Domain .............................................................. 300How to Remove a Discovery Domain from aDiscovery Domain Set ................................. 301How toDisable a Discovery Domain Set ................................................................................. 301How to Remove a Discovery Domain Set ............................................................................... 301

    16 The formatUtility (Reference) ........................................................................................................303Recommendations and Requirements for Using the formatUtility .......................................... 303formatMenu and CommandDescriptions ................................................................................... 304

    partitionMenu ........................................................................................................................ 306x86: fdiskMenu ........................................................................................................................ 306analyzeMenu ............................................................................................................................ 307defectMenu .............................................................................................................................. 309

    Rules for Input to formatCommands ............................................................................................ 310Specifying Numbers to formatCommands ........................................................................... 310Specifying formatCommandNames ...................................................................................... 310Specifying Disk Names to formatCommands ....................................................................... 311

    GettingHelp on the formatUtility ................................................................................................. 311

    Contents

    Oracle Solaris Administration: Devices and File Systems February 201212

  • 17 Managing File Systems (Overview) ................................................................................................313What's New inOracle Solaris File Systems? ................................................................................... 313

    File SystemMonitoring Tool (fsstat) ................................................................................... 313Oracle Solaris ZFS File System ................................................................................................. 314

    Where to Find File SystemManagement Tasks ............................................................................. 314Overview of File Systems .................................................................................................................. 315

    Types of Oracle Solaris File Systems ........................................................................................ 315Default Oracle Solaris File Systems ................................................................................................. 320Overview ofMounting andUnmounting File Systems ................................................................ 321

    TheMounted File SystemTable ............................................................................................... 322The Virtual File SystemTable ................................................................................................... 322TheNFS Environment .............................................................................................................. 323Automounting (autofs) ............................................................................................................. 324TheOracle Solaris SMB Service ............................................................................................... 325

    Determining a File System's Type ................................................................................................... 325How toDetermine a File System's Type .................................................................................. 325

    18 Creating andMounting File Systems (Tasks) ................................................................................ 327Creating Oracle Solaris File Systems ............................................................................................... 327

    Creating ZFS File Systems ......................................................................................................... 327Creating a Temporary File System ........................................................................................... 328Creating a LOFS File System ..................................................................................................... 328

    Mounting andUnmounting Oracle Solaris File Systems ............................................................. 328Field Descriptions for the /etc/vfstab File ........................................................................... 330Prerequisites for Unmounting Oracle Solaris File Systems .................................................. 331

    Creating andMounting Oracle Solaris File Systems ..................................................................... 332How to Create an ZFS File System ........................................................................................... 332How to Create andMount a Legacy UFS File System ............................................................ 333How to Create andMount a TMPFS File System ................................................................... 334How to Create andMount an LOFS File System .................................................................... 335How to Add an Entry to the /etc/vfstab File ....................................................................... 336How toMount a File System (/etc/vfstab File) ................................................................... 337How toMount anNFS File System (mountCommand) ........................................................ 338 x86: How toMount a PCFS (DOS) File System From aHardDisk (mountCommand) ... 339How to Stop All Processes Accessing a File System ............................................................... 340

    Contents

    13

  • How toUnmount a File System ................................................................................................ 340

    19 ConfiguringAdditional SwapSpace (Tasks) ................................................................................. 343About Swap Space ............................................................................................................................. 343

    Swap Space andVirtualMemory ............................................................................................. 343Swap Space and the TMPFS File System ................................................................................. 344Swap Space andDumpDevice Configuration ....................................................................... 344Swap Space andDynamic Reconfiguration ............................................................................ 345Configuring Swap Space in a SANEnvironment ................................................................... 345

    HowDo I Know If I NeedMore Swap Space? ................................................................................ 346Swap-Related ErrorMessages .................................................................................................. 346TMPFS-Related ErrorMessages .............................................................................................. 346

    How Swap Space Is Allocated ........................................................................................................... 347Swap Areas and the /etc/vfstab File ..................................................................................... 347

    Planning for Swap Space ................................................................................................................... 347Allocating Swap Space for ZFS-Based Systems ...................................................................... 348

    Monitoring Swap Resources ............................................................................................................ 349Adding or Changing Swap Space in anOracle Solaris ZFS Root Environment ......................... 350How to Add Swap Space in anOracle Solaris ZFS Root Environment ................................ 350

    20 Copying Files andFile Systems (Tasks) .......................................................................................... 353Commands for Copying File Systems ............................................................................................. 353Copying Directories Between File Systems (cpioCommand) .................................................... 355How to CopyDirectories Between File Systems (cpio) ........................................................ 356

    Copying Files and File Systems to Tape .......................................................................................... 357Copying Files to Tape (tarCommand) .......................................................................................... 357How to Copy Files to a Tape (tar) ........................................................................................... 357How to List the Files on a Tape (tar) ....................................................................................... 358How to Retrieve Files From a Tape (tar) ................................................................................ 359

    Copying Files to a TapeWith the paxCommand .......................................................................... 360How to Copy Files to a Tape (pax) ........................................................................................... 360

    Copying Files to TapeWith the cpioCommand .......................................................................... 361How to Copy All Files in a Directory to a Tape (cpio) .......................................................... 361How to List the Files on a Tape (cpio) ..................................................................................... 362How to Retrieve All Files From a Tape (cpio) ........................................................................ 362

    Contents

    Oracle Solaris Administration: Devices and File Systems February 201214

  • How to Retrieve Specific Files From a Tape (cpio) ................................................................ 363Copying Files to a Remote Tape Device .......................................................................................... 364How to Copy Files to a Remote Tape Device (tar and dd) ................................................... 364How to Extract Files From a Remote Tape Device ................................................................. 366

    21 ManagingTapeDrives (Tasks) .........................................................................................................367ChoosingWhichMedia to Use ........................................................................................................ 367BackupDevice Names ...................................................................................................................... 368

    Specifying the RewindOption for a Tape Drive ..................................................................... 369Specifying Different Densities for a Tape Drive ..................................................................... 369

    Displaying Tape Drive Status ........................................................................................................... 370How toDisplay Tape Drive Status ........................................................................................... 370

    HandlingMagnetic Tape Cartridges ............................................................................................... 371Retensioning aMagnetic Tape Cartridge ................................................................................ 371Rewinding aMagnetic Tape Cartridge .................................................................................... 371

    Guidelines for DriveMaintenance andMedia Handling ............................................................. 371

    Index ................................................................................................................................................... 373

    Contents

    15

  • 16

  • Preface

    SystemAdministration Guide: Devices and File Systems is part of a set that includes a significantpart of the Oracle Solaris system administration information. This guide contains informationfor both SPARC based and x86 based systems.

    This book assumes you have completed the following tasks: Installed the Oracle Solaris 11 Operating System Set up all the networking software that you plan to use

    For the Oracle Solaris 11 releases, new features of interest to system administrators are coveredin sections calledWhat's New in ... ? in the appropriate chapters.

    Note This Oracle Solaris release supports systems that use the SPARC and x86 families ofprocessor architectures. The supported systems appear in theOracle Solaris HardwareCompatibility List at http://www.oracle.com/webfolder/technetwork/hcl/index.html. Thisdocument cites any implementation differences between the platform types.

    WhoShouldUseThis BookThis book is intended for anyone responsible for administering one ormore systems runningthe Oracle Solaris 11 release. To use this book, you should have 12 years of UNIX systemadministration experience. Attending UNIX system administration training courses might behelpful.

    How the SystemAdministrationGuidesAreOrganizedHere is a list of the topics that are covered by the SystemAdministration Guides.

    BookTitle Topics

    Booting and Shutting DownOracle Solaris on SPARC Platforms Booting and shutting down a system,managing boot services,modifying boot behavior, booting fromZFS, managing the bootarchive, and troubleshooting booting on SPARC platforms

    17

  • BookTitle Topics

    Booting and Shutting DownOracle Solaris on x86 Platforms Booting and shutting down a system,managing boot services,modifying boot behavior, booting fromZFS, managing the bootarchive, and troubleshooting booting on x86 platforms

    Oracle Solaris Administration: Common Tasks UsingOracle Solaris commands, booting and shutting down asystem,managing user accounts and groups, managing services,hardware faults, system information, system resources, andsystem performance, managing software, printing, the consoleand terminals, and troubleshooting system and softwareproblems

    Oracle Solaris Administration: Devices and File Systems Removablemedia, disks and devices, file systems, and backing upand restoring data

    Oracle Solaris Administration: IP Services TCP/IP network administration, IPv4 and IPv6 addressadministration, DHCP, IPsec, IKE, IP Filter, and IPQoS

    Oracle Solaris Administration: Naming and Directory Services DNS, NIS, and LDAP naming and directory services, includingtransitioning fromNIS to LDAP

    Oracle Solaris Administration: Network Interfaces and NetworkVirtualization

    Automatic andmanual IP interface configuration includingWiFiwireless; administration of bridges, VLANs, aggregations, LLDP,and IPMP; virtual NICs and resourcemanagement.

    Oracle Solaris Administration: Network Services Web cache servers, time-related services, network file systems(NFS and autofs), mail, SLP, and PPP

    Oracle Solaris Administration: Oracle Solaris Zones, OracleSolaris 10 Zones, and ResourceManagement

    Resourcemanagement features, which enable you to control howapplications use available system resources; Oracle Solaris Zonessoftware partitioning technology, which virtualizes operatingsystem services to create an isolated environment for runningapplications; andOracle Solaris 10 Zones, which host OracleSolaris 10 environments running on the Oracle Solaris 11 kernel

    Oracle Solaris Administration: Security Services Auditing, devicemanagement, file security, BART, Kerberosservices, PAM, Cryptographic Framework, KeyManagement,privileges, RBAC, SASL, Secure Shell, and virus scanning

    Oracle Solaris Administration: SMB andWindows Interoperability SMB service, which enables you to configure anOracle Solarissystem tomake SMB shares available to SMB clients; SMB client,which enables you to access SMB shares; and native identitymapping services, which enables you tomap user and groupidentities betweenOracle Solaris systems andWindows systems

    Oracle Solaris Administration: ZFS File Systems ZFS storage pool and file system creation andmanagement,snapshots, clones, backups, using access control lists (ACLs) toprotect ZFS files, using ZFS on a Solaris systemwith zonesinstalled, emulated volumes, and troubleshooting and datarecovery

    Preface

    Oracle Solaris Administration: Devices and File Systems February 201218

  • BookTitle Topics

    Trusted Extensions Configuration and Administration System installation, configuration, and administration that isspecific to Trusted Extensions

    Oracle Solaris 11 Security Guidelines Securing anOracle Solaris system, as well as usage scenarios for itssecurity features, such as zones, ZFS, and Trusted Extensions

    Transitioning FromOracle Solaris 10 to Oracle Solaris 11 Provides system administration information and examples fortransitioning fromOracle Solaris 10 to Oracle Solaris 11 in theareas of installation, device, disk, and file systemmanagement,softwaremanagement, networking, systemmanagement,security, virtualization, desktop features, user accountmanagement, and user environments

    Access toOracle SupportOracle customers have access to electronic support throughMyOracle Support. Forinformation, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visithttp://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.

    WhatTypographic ConventionsMeanThe following table describes the typographic conventions used in this book.

    TABLE P1 TypographicConventions

    Typeface or Symbol Meaning Example

    AaBbCc123 The names of commands, files, and directories;on screen computer output

    Edit your .login file.

    Use ls -a to list all files.

    machine_name% you have mail.

    AaBbCc123 What you type, contrasted with on screencomputer output

    machine_name% su

    Password:

    AaBbCc123 Command-line placeholder: replace with a realname or value

    To delete a file, type rm filename.

    AaBbCc123 Book titles, newwords or terms, or words to beemphasized

    Read Chapter 6 inUser's Guide.

    These are called class options.

    Do not save changes yet.

    Preface

    19

  • Shell Prompts in CommandExamplesThe following table shows the default system prompt and superuser (or administrative) promptfor the C shell, Bourne shell, and Korn shell.

    TABLE P2 Shell Prompts

    Shell Prompt

    C shell prompt machine_name%

    C shell superuser prompt machine_name#

    Bourne shell and Korn shell prompt $

    Bourne shell and Korn shell superuser prompt #

    Preface

    Oracle Solaris Administration: Devices and File Systems February 201220

  • Managing RemovableMedia (Overview)

    This chapter provides general guidelines formanaging removablemedia in the Oracle SolarisOS.

    This is a list of the overview information in this chapter. What's New in RemovableMedia? on page 21 Where to FindManaging RemovableMedia Tasks on page 24 RemovableMedia Features and Benefits on page 25 Comparison ofManual and AutomaticMounting on page 25 Overview of Accessing RemovableMedia on page 26

    What's New inRemovableMedia?

    Changes and Improvements toRemovableMediaManagementOracle Solaris 11: Previous features formanaging removablemedia have been removed andreplaced with services andmethods that provide better removablemediamanagement.

    The following new features are available: New removablemedia services aremanaged by SMF.

    online 12:17:54 svc:/system/hal:default

    online 12:17:56 svc:/system/filesystem/rmvolmgr:default

    online 12:17:26 svc:/system/dbus:default

    Removablemedia is nowmounted automatically in the /media directory. However,symbolic links to /media are provided from previousmediamount points, /cdrom and/rmdisk, for compatibility purposes.For example, a compact flashmemory card (/dev/dsk/c4d0p0:1) is mounted as follows:

    1C H A P T E R 1

    21

  • $ ls /media/NIKON

    For example, a USBmemory stick (/dev/dsk/c3t0d0s0) is mounted as follows:

    $ ls /media/U3

    The default removablemedia volumemanager, rmvolmgr, is responsible for followingactivities: Mounting and unmounting volumes. The root instance of rmvolmgr starts at system boot. However, you can configure your

    session's configuration files to start an instance of rmvolmgrwhen you log in.When runwithin a user session, rmvolmgr onlymounts devices owned by the current user orsession and does not conflict with the root instance.

    When rmvolmgr exits, it unmounts all media that it mounted. For compatibility purposes, rmvolmgr creates symbolic links under the /cdrom or

    /rmdisk directories to the actual mount points under /media. A special rmvolmgr runmode is available for CDE compatibility.

    The hardware abstraction layer (HAL) daemon, hald, provides a view of the device attachedto a system. This view is updated automatically as hardware configuration changes, byhotplugging or othermechanisms.HAL represents a piece of hardware as a device object. A device object is identified by aunique device identifier (UDI) and carries a set of key-value pairs referred to as deviceproperties. Some properties are derived from the actual hardware, some aremerged fromdevice information files (.fdi files) and some are related to the actual device configuration.

    The following features are removed: Only USB diskettes are supported in this release. The vold daemon, the volfs file system, and the volfs service have been removed.

    svc:/system/filesystem/volfs

    Logical device names for removablemedia under the /vol directory, such as/vol/dev/rdsk/... or /vol/dev/aliases/..., are no longer provided.To access removablemedia by its logical device name, the /dev device should be used. Forexample:

    /dev/rdsk/c0t6d0s2

    Some vold device nicknames are no longer available. The following eject -l outputidentified the available device nicknames for each device and in this example, themountedmedia pathname (/media/SOL_11_X86_4):

    $ eject -l

    /dev/dsk/c2t0d0s2 cdrom,cdrom0,cd,cd0,sr,sr0,SOL_11_X86_4,/media/SOL_11_X86_4

    The comma-separated list shows the nicknames that can be used to eject each device.

    What's New in RemovableMedia?

    Oracle Solaris Administration: Devices and File Systems February 201222

  • Customizations that weremade in vold.conf and rmmount.conf are no longer availablebecause these configuration files no longer exist. For information aboutmanagingmediacustomizations, see Customizing RemovableMediaManagement on page 24.

    Commands that begin with vol* commands except for volcheck and volrmmount.

    BackwardCompatibilityThe following features provide backward compatibility with previous Oracle Solaris removablemedia features: Removablemediamount points havemoved to the /media directory, which is used to

    mount removablemedia, such as CD-ROMs andUSB devices. Symbolic links to /mediafrom previousmediamounts points, such as /cdrom and /rmdisk, are provided forcompatibility purposes.

    The rmformat command is still available. The output of this command is identical to what itlooks in previous Solaris releases with vold disabled.For example:

    # rmformat

    Looking for devices...

    1. Logical Node: /dev/rdsk/c0t6d0s2

    Physical Node: /pci@1f,4000/scsi@3/sd@6,0

    Connected Device: TOSHIBA DVD-ROM SD-M1401 1009

    Device Type: DVD Reader

    Bus: SCSI

    Size: 2.9 GB

    Label:

    Access permissions:

    The eject command is available but has been enhanced. Formore information, seeEjecting RemovableMedia on page 24.

    Mounting andUnmountingRemovableMediaMost commands that begin with vol* are removed in this release. Amodified version ofrmmount and a new rmumount command are available tomount and unmount removablemedia.

    These commands can be used tomount by device name, label, or mount point. For example, tomount an iPod:

    % rmmount ipod

    For example, to unmount the file systems on aDVD:

    # rmumount cdrom

    cdrom /dev/dsk/c0t6d0s5 unmounted

    cdrom /dev/dsk/c0t6d0s0 unmounted

    Formore information, see rmmount(1M).

    What's New in RemovableMedia?

    Chapter 1 Managing RemovableMedia (Overview) 23

  • EjectingRemovableMediaAs in previous Solaris releases, use the eject command to unmount and eject removablemedia.However, the following eject options are available:

    -f Forces the device to eject even if the device is busy.

    -l Displays paths and nicknames of devices that can be ejected.

    -t ACD-ROM tray close command is provided to the device. Not all devices support thisoption.

    For example, to eject by its volume label:

    % eject mypictures

    Formore information, see eject(1).

    CustomizingRemovableMediaManagementFormost customizations that were available in the vold.conf and rmmount.conf files, you willneed to either use Desktop Volumemanager preferences ormodify the .fdi files. For rmmount.conf actions, you will need to use either Desktop VolumeManager actions,

    gconf, or HAL callouts. Previously, rmmount.conf actions could be run as root on behalf of ordinary users. Now,

    this is done by installing callout executables in the /usr/lib/hal directory.

    DisablingRemovableMedia FeaturesTo prevent volumes frommounting outside of user sessions, disable the rmvolmgr service. Forexample:

    # svcadm disable rmvolmgr

    Where to FindManagingRemovableMediaTasksUse these references to find step-by-step instructions formanaging removablemedia.

    RemovableMediaManagementTask ForMore Information

    Format removablemedia Chapter 2, Managing RemovableMedia (Tasks)

    Access removablemedia Chapter 3, Accessing RemovableMedia (Tasks)

    Write data CDs andDVDs andmusic CDs Chapter 4, Writing CDs andDVDs (Tasks)

    Where to FindManaging RemovableMediaTasks

    Oracle Solaris Administration: Devices and File Systems February 201224

  • RemovableMedia Features andBenefitsTheOracle Solaris release gives users and software developers a standard interface for dealingwith removablemedia. Removablemedia services provide the following benefits: Automatically mounts removablemedia. For a comparison ofmanual and automatic

    mounting, see the following section. Enables you to access removablemedia without having to become an administrator. Allows you to give other systems on the network automatic access to any removablemedia

    on your local system. Formore information, see Chapter 3, Accessing RemovableMedia(Tasks).

    ComparisonofManual andAutomaticMountingThe following table compares the steps involved inmanual mounting (without removablemedia services) and automatic mounting (with removablemediamanagement) of removablemedia.

    TABLE 11 Comparison ofManual andAutomaticMounting of RemovableMedia

    Steps ManualMounting AutomaticMounting

    1 Insert media. Insert media.

    2 Become an administrator. For USB diskettes, use the volcheckcommand.

    3 Determine the location of themedia device. Removablemedia services automaticallyperformmany of the tasks that are required tomanually mount and work with removablemedia.

    4 Create amount point.

    5 Make sure you are not in themount pointdirectory.

    6 Mount the device and use the proper mountoptions.

    7 Exit the administrator account.

    8 Work with files onmedia. Work with files onmedia.

    9 Become an administrator.

    10 Unmount themedia device.

    11 Eject media. Eject media.

    Comparison ofManual and AutomaticMounting

    Chapter 1 Managing RemovableMedia (Overview) 25

  • TABLE 11 Comparison ofManual andAutomaticMounting of RemovableMedia (Continued)Steps ManualMounting AutomaticMounting

    12 Exit the administrator account.

    OverviewofAccessingRemovableMediaEssentially, removablemedia services enable you to access removablemedia just as manualmounting does, but more easily and without the need for administrative access.

    If themedia contains a file system and a label, themedia label name is used to name the/media/pathnamemount point. If a label is not present, the diskmodel name is used to namethemedia, such as /media/cdrom. A generic nickname is used only for legacy symbolic links.For example, /rmdisk/rmdisk0.

    If your system hasmore than one type of removable device, see the following table for theiraccess points.

    TABLE 12 How toAccessData onRemovableMedia

    Access Insert UnlabeledMedia Pathnames LabeledMedia PathnameExamples

    Files on aremovable harddisk

    The removable harddisk and typevolcheck on thecommand line

    /media/usb-disk or the legacypath /rmdisk/rmdisk0

    /media/00JB-00CRA0

    Files on a DVD TheDVD andwaitfor a few seconds

    /media/cdrom /media/sol_10_sparc

    Files on a DVD TheDVD andwaitfor a few seconds

    /media/cdrom /media/SOL_11_X86

    You can use the rmmount -l command to identify mountedmedia on your system. For example:

    # rmmount -l

    /dev/dsk/c5t0d0p0 rmdisk6,/media/FD-05PUB

    /dev/dsk/c4t0d3p0 rmdisk5,/media/223UHS-SD-MMC

    /dev/dsk/c2t0d0s2 cdrom1,cd1,sr1,SOL_11_X86,/media/SOL_11_X86

    /dev/dsk/c3t0d0p0 rmdisk2,/media/00JB-00CRA0

    In the above output, themounted devices are as follows:

    /dev/dsk/c5t0d0p0 USB diskette

    /dev/dsk/c4t0d3p0 CF card in a USB card reader

    /dev/dsk/c2t0d0s2 DVD-ROM

    /dev/dsk/c3t0d0p0 Removable USB disk

    Overview of Accessing RemovableMedia

    Oracle Solaris Administration: Devices and File Systems February 201226

  • Managing RemovableMedia (Tasks)

    This chapter describes how tomanage removablemedia from the command line in the OracleSolaris OS.

    For information on the procedures associated withmanaging removablemedia, see ManagingRemovableMedia (TaskMap) on page 27. For background information on removablemedia,see Chapter 1, Managing RemovableMedia (Overview).

    ManagingRemovableMedia (TaskMap)The following taskmap describes the tasks formanaging removablemedia.

    Task Description For Instructions

    1. Loadmedia. Insert the diskette into the drive and type thevolcheck command.

    How to Load RemovableMedia on page 29

    2. (Optional) Format thediskette.

    Format diskette. How to Format a Diskette(rmformat) on page 30

    3. (Optional) Add a PCFS filesystem.

    Add a PCFS file system to use themedia fortransferring files.

    How to Create a File System onRemovableMedia on page 31

    Add aUDFS file system to a DVD-RAMdevice.

    How to Create a File System onaDVD-RAM on page 32

    4. (Optional) Check themedia.

    Verify the integrity of the file system on themedia.

    How to Check a File System onRemovableMedia on page 32

    5. (Optional) Repair badblocks on themedia.

    Repair any bad blocks on themedia, ifnecessary.

    How to Repair Bad Blocks onRemovableMedia on page 33

    2C H A P T E R 2

    27

  • Task Description For Instructions

    6. (Optional) Apply read orwrite and passwordprotection.

    Apply read or write protection or passwordprotection on themedia, if necessary.

    How to Enable or DisableWrite Protection on RemovableMedia on page 33

    PreparingRemovableMediaThe following sections describe how to prepare removablemedia for use.

    RemovableMedia ConsiderationsKeep the following considerations inmind when working with diskettes: SunOS file system formats consist of the basic bit formatting in addition to the structure to

    support a SunOS file system. A complete format for a DOS file system consists of the basicbit formatting in addition the structure to support either anMS-DOS or anNEC-DOS filesystem. The procedures required to prepare amedia for each type of file system are different.Therefore, before you format a diskette, consider which procedure to follow. Formoreinformation, see Managing RemovableMedia (TaskMap) on page 27. For information on removablemedia names, see Using RemovableMedia Names on

    page 36. Diskettes that are not named (that is, they have no label) are assigned the default name

    of unnamed_floppy. Diskettes that are not named (that is, they have no label) are assigned the default name

    of floppy.

    AnOracle Solaris system can format the following file system types: ZFS or UFS MS-DOS or NEC-DOS (PCFS) UDFS

    On anOracle Solaris system (either SPARC or x86), you can format diskettes with thefollowing densities.

    Diskette Size DisketteDensity Capacity

    3.5 High density (HD) 1.44MB

    3.5 Double density (DD) 720 KB

    By default, the diskette drive formats a diskette to a like density. This default means that a1.44MB drive attempts to format a diskette for 1.44MB, regardless of whether the diskette

    Preparing RemovableMedia

    Oracle Solaris Administration: Devices and File Systems February 201228

  • is, in fact, a 1.44MB diskette, unless you instruct it otherwise. In other words, a diskette canbe formatted to its capacity or lower, and a drive can format to its capacity or lower.

    FormattingDiskettesYou can use the rmformat command to format and protect rewritable diskettes. File systems aremounted automatically. So, youmight have to unmountmedia before you can format it, if themedia contains an existing file system.

    The rmformat command has three formatting options: quick This option formats diskettes without certification or with limited certification of

    certain tracks on themedia. long This option completely formats diskettes. For some devices, the use of this option

    might include the certification of the wholemedia by the drive. force This option formats completely without user confirmation. For diskettes with a

    password-protectionmechanism, this option clears the password before formatting. Thisfeature is useful when a password is forgotten. On diskettes without password protection,this option forces a long format.

    How to LoadRemovableMediaFor information about removablemedia hardware considerations, see RemovableMediaConsiderations on page 28.

    Insert themedia.

    Ensure that themedia is formatted.If you aren't sure, insert themedia and check the statusmessages in the system console window,as described in Step 3. If you need to format themedia, go to How to Format a Diskette(rmformat) on page 30.

    (Optional) Notify volumemanagement if you are using a legacy, non-USBdiskette device.$ volcheck -v

    Two statusmessages are possible:

    media was found Volumemanagement detected themedia and will attempt tomount itin the directory described in Using RemovableMedia Names onpage 36.

    If themedia is formatted properly, no errormessages appear in theconsole.

    1

    2

    3

    Preparing RemovableMedia

    Chapter 2 Managing RemovableMedia (Tasks) 29

  • If the media is not formatted, the media was found message is stilldisplayed. However, errormessages similar to the following appear inthe system console window:

    fd0: unformatted diskette or no diskette in the drive

    fd0: read failed (40 1 0)

    fd0: bad format

    Youmust format themedia before volumemanagement canmountit. Formore information, see Chapter 2, Managing RemovableMedia (Tasks).

    no media was found Volumemanagement did not detect themedia. Ensure that themediais inserted properly, and run volcheck again. If unsuccessful, checkthemedia, which could be damaged. You can also try tomount themediamanually.

    Verify that themediawasmountedby listing its contents.For example, do the following for a diskette:$ ls /media/floppy

    lost+found myfiles

    How to Format aDiskette (rmformat)You can use the rmformat command to format a diskette. By default, this command creates twopartitions on themedia: partition 0 and partition 2 (the wholemedia).

    Verify that removablemedia service is running. If so, you can use the shorter nickname for thedevice name.# svcs hal dbus rmvolmgr

    STATE STIME FMRI

    online Apr_09 svc:/system/dbus:default

    online Apr_09 svc:/system/hal:default

    online Apr_09 svc:/system/filesystem/rmvolmgr:default

    For information on restarting removablemedia services, see How toDisable or EnableRemovableMedia Services on page 37. For information on identifyingmedia device names,see Using RemovableMedia Names on page 36.

    Format the diskette.$ rmformat -F [ quick | long | force ] device-name

    See Formatting Diskettes on page 29 formore information on rmformat formatting options.

    4

    1

    2

    Preparing RemovableMedia

    Oracle Solaris Administration: Devices and File Systems February 201230

  • If the rmformat output indicates bad blocks, see How to Repair Bad Blocks on RemovableMedia on page 33.

    (Optional) Label the diskettewith an 8-character label.$ rmformat -b label device-name

    For information on creating a DOS label, see mkfs_pcfs(1M).

    Formatting aDiskette

    This example shows how to format a diskette.

    $ rmformat -F quick /dev/rdiskette

    Formatting will erase all the data on disk.

    Do you want to continue? (y/n) y

    .........................................................................

    How toCreate a File SystemonRemovableMedia(Optional) Format a diskette, if necessary.To format a USB diskette, use syntax similar to the following:$ rmformat -F long /dev/rdsk/c11t0d0p0

    (Optional) Create an alternate Solaris partition table.$ rmformat -s slice-file device-name

    A sample slice file appears similar to the following:

    slices: 0 = 0, 30MB, "wm", "home" :

    1 = 30MB, 51MB :

    2 = 0, 94MB, "wm", "backup" :

    6 = 81MB, 13MB

    Becomean administrator.Formore information, see How toUse Your Assigned Administrative Rights inOracle SolarisAdministration: Security Services.

    Determine the appropriate file system type and select one of the following:

    Create a PCFS file system. For example:

    # mkfs -F pcfs -o nofdisk,size=9800 /dev/rdsk/c11t0d0p0

    Create a UDFS file system. For example:

    # mkfs -F udfs /dev/rdsk/c0t1d0p0

    3

    Example 21

    1

    2

    3

    4

    Preparing RemovableMedia

    Chapter 2 Managing RemovableMedia (Tasks) 31

  • How toCreate a File SystemonaDVD-RAMUse this procedure to create a file system on aDVD-RAM.

    Becomean administrator.Formore information, see How toUse Your Assigned Administrative Rights inOracle SolarisAdministration: Security Services.

    Create a file systemon theDVD-RAMdevice.

    Create a UDFS file system. For example:

    # mkfs -F udfs /dev/rdsk/c0t0d0s2

    Mount the file system.

    Mount a UDFS file system. For example:

    # mount -F udfs /dev/dsk/c0t0d0s2 /mnt

    Verify that you can read orwrite to the file system.

    Whenfinished, eject theDVD-RAM.

    How toCheck a File SystemonRemovableMediaBecomean administrator.Formore information, see How toUse Your Assigned Administrative Rights inOracle SolarisAdministration: Security Services.

    Identify the file system type and select one of the following:

    Check a UDFS file system.

    # fsck -F udfs device-name Check a PCFS file system.

    # fsck -F pcfs device-name

    Checking a PCFS File Systemon RemovableMedia

    The following example shows how check the consistency of a PCFS file system onmedia.

    # fsck -F pcfs /dev/rdsk/c0t4d0s2

    ** /dev/rdsk/c0t4d0s2

    ** Scanning file system meta-data

    1

    2

    3

    4

    5

    1

    2

    Example 22

    Preparing RemovableMedia

    Oracle Solaris Administration: Devices and File Systems February 201232

  • ** Correcting any meta-data discrepancies

    1457664 bytes.

    0 bytes in bad sectors.

    0 bytes in 0 directories.

    0 bytes in 0 files.

    1457664 bytes free.

    512 bytes per allocation unit.

    2847 total allocation units.

    2847 available allocation units.

    How toRepair BadBlocks onRemovableMediaYou can only use the rmformat command to verify, analyze, and repair bad sectors that arefound during verification if the drive supports bad blockmanagement.Most USBmemorysticks do not support bad blockmanagement.

    If the drive supports bad blockmanagement, a best effort is made to rectify the bad block. If thebad block cannot be rectified despite the best effort mechanism, amessage indicates the failureto repair themedia.

    Repair badblocks on removablemedia.$ rmformat -c block-numbers device-name

    Supply the block number in decimal, octal, or hexadecimal format from a previous rmformatsession.

    Verify themedia.$ rmformat -V read device-name

    ApplyingReadorWrite Protection andPasswordProtection toRemovableMediaYou can apply read protection or write protection, and set a password, on removablemedia thatsupport this feature.

    How toEnable orDisableWrite ProtectiononRemovableMedia

    Determinewhether youwant to enable or disablewrite protection and select one of thefollowing:

    Enable write protection.

    1

    2

    1

    Preparing RemovableMedia

    Chapter 2 Managing RemovableMedia (Tasks) 33

  • $ rmformat -w enable device-name Disable write protection.

    $ rmformat -w disable device-name

    Verifywhether themedia'swrite protection is enabled or disabled.$ rmformat -p device-name

    How toEnable orDisable ReadorWrite Protection andSet a PasswordonRemovableMediaYou can apply a password with amaximum of 32 characters for removablemedia that supportthis feature.

    You will receive a warningmessage if you attempt to apply a password onmedia that does notsupport this feature.

    Determinewhether youwant to enable or disable readprotection orwrite protection and set apassword. Select one of the following:

    Enable read protection or write protection.

    $ rmformat -W enable device-namePlease enter password (32 chars maximum): xxxPlease reenter password:

    $ rmformat -R enable device-namePlease enter password (32 chars maximum): xxxPlease reenter password:

    Disable read protection or write protection and remove the password.

    $ rmformat -W disable device-namePlease enter password (32 chars maximum): xxx$ rmformat -R disable device-namePlease enter password (32 chars maximum): xxx

    Verifywhether themedia's readprotection orwrite protection is enabled or disabled.$ rmformat -p device-name

    2

    1

    2

    Preparing RemovableMedia

    Oracle Solaris Administration: