File System Administration
只搜尋這本書
以 PDF 格式下載這本書

............................Contents


Preface
xix

Part 1 --Administering File Systems

1. Planning File Systems
1
...Types of File Systems 2
......Disk-Based File Systems 3
......Network-Based File Systems 3
......Pseudo File Systems 4
...File System Administration Commands 7
......Syntax of Generic Commands 8
......Manual Pages for Generic and Specific Commands 9
......How the File System Commands Determine the File System
........Type 9
......How to Find Out the Type of a File System 9
...The Default SunOS File Systems 12
...Understanding Disk Device Names 13
...Understanding the UFS File System 13
......Disk Slices 14
......Cylinder Groups 19
...Planning UFS File Systems 19
......File System Parameters 20
...Making File Systems Available 21
......Understanding Mounting and Unmounting 22
......The Automounter 29
......Sharing Files From a Server 29

2. Creating File Systems
35
...Creating a UFS File System on a Disk Slice 35
......Preparing to Create a UFS File System 36
......Installing a Boot Block on a UFS File System 37
...Creating a File System on a Diskette 37
...Creating a Temporary File System (TMPFS) 38
...Creating a Loopback File System 39

3. Mounting and Unmounting File Systems
41
...Finding Out Which File Systems Are Mounted 41
...Creating Entries in the File System Table 42
...Mounting File Systems in the File System Table 45
...Mounting File Systems From the Command Line 47
...Unmounting File Systems 53
...Sharing File Systems 55
......Examples of Automatic Sharing Entries in the
......../etc/dfs/dfstab File 56

4. Copying UFS Files and File Systems
57
...Commands for Copying File Systems 58
...Copying Complete File Systems 58
......Using the labelit and volcopy Commands 59
......Using the dd Command 63
......Using the cpio Command 64
...Copying Files and File Systems to Tape 65
......Useful Commands for Streaming Tape Cartridges 65
......Using the tar Command 67
......Using the cpio Command 69
...Copying Files and File Systems to Diskette 72
...Copying Files with a Different Header Format 76
...Retrieving Files Created With the bar Command 77

5. The Cache File System
79
...Cache File System Concepts 79
......Resource Management 80
......Front File System Requirements 80
......Setting Up a Cached File System 80
...Administering a Cache 81
......Creating a Cache 81
......Cache Parameters 81
......Setting Cache Parameters 83
......Modifying Parameters 84
......Displaying Information About Cached File Systems 85
......Deleting Cached File Systems 86
...Mounting a Cached File System 86
......Using mount to Mount a Cached File System 87
......Creating a vfstab Entry for Cached File Systems 91
...Checking a Cached File System 91

Part 2 --Backup and Restore

6. Planning a Backup Strategy
95
...Why You Back Up File Systems 95
...Understanding the ufsdump Command 96
......Advantages of ufsdump 96
......Disadvantages of ufsdump 97
......How ufsdump Works 97
...Choosing Which File Systems to Back Up 99
......File Systems to Back Up on a Standalone System 100
......File Systems to Back Up on a Server 100
...Choosing Which Media to Use 102
......Backup Device Names 103
......Guidelines for Drive Maintenance and Media Handling 107
...Considering Other Issues 108
......When to Run Backups 108
......How Long to Save Backups 109
......How to Back Up Files to a Remote Drive 109
......Do You Need to Become Superuser? 110
......Should You Check File Systems Before a Full Backup? 110
......Do You Want to Put Multiple Backups on the Same Tape? 111
......Where Do the Files Reside? 111
......How Do You Backup on a Heterogeneous Network? 111
......What Are the Security Issues? 112
...Planning a Backup Schedule 112

7. Backing Up Files and File Systems
121
...Preparing to Do Backups 121
...Doing Complete Backups 126
...Doing Incremental Backups 128
...Backing Up Individual Files and Directories 128
...Using a Remote Drive to Do Backups 128
...Doing Backups on Remote Systems 130
...Troubleshooting When the Root File System Fills Up 130
...Options and Arguments for the ufsdump Command 131
......Default Command Options 132
......Options for the ufsdump Command 132

8. Restoring Files and File Systems
139
...Preparing to Restore Files and File Systems 139
......Determining Which Tapes to Use 140
......Determining the Disk Device Name 141
......Determining the Type of Tape Drive You Will Use 142
......Determining the Tape Device Name 142
...Restoring Complete File Systems 142
......Synopsis of Steps 142
...Restoring Individual Files and Directories 146
...Using a Remote Drive to Restore Files 150
...Troubleshooting 150
......Make Sure the Backup and Restore Commands Match 150
......Check to Make Sure You Have the Right Current Directory 151
......Use the Old restore Command to Restore Multivolume
........Diskette Backups 151
...Options and Arguments for the ufsrestore Command 151
......Command Syntax 151
......Options and Arguments 152

Part 3 --Configuring Swap Space and Managing Disk Use

9. Configuring Additional Swap Space
159
...About Swap Space 159
......Swap Space and Virtual Memory 160
......Swap Space and the tmpfs File System 161
...How Do I Know If I Need More Swap Space? 162
......Swap-Related Error Messages 162
......tmpfs-Related Error Messages 162
...How Swap Space is Allocated 163
......The /etc/vfstab File 163
...Planning for Swap Space 164
...Monitoring Swap Resources 165
...Adding More Swap Space 166
......Creating a Swap File 166
...Removing a Swap File From Use 168

10. Managing Disk Use
171
...Monitoring Available Disk Space 171
......Using the df Command 172
...Monitoring Files and Directories 176
......Monitoring System Log Files That Grow 176
......Finding Large Files 178
......Finding Large Directories 180
......Finding Large Space Users 182
......Finding Old and Inactive Files 185
...Reducing Overloaded File Systems 186
......Truncating Files That Grow 186
......Deleting Old or Inactive Files 187
......Clearing Out Temporary and Obsolete Files 188
......Deleting core Files 189
......Removing Crash Dump Files 190
......Creating Links Instead of Duplicating Files 191
......Moving Directory Trees Between File Systems 192
...Controlling Disk Space With Quotas 193
......Setting Up and Administering Quotas 194
......How Quotas Affect Users 195
......How Disk Quotas Work 195
......Administering Disk Quotas 201

Part 4 --Troubleshooting

11. Recognizing File Access Problems
209
...Recognizing Problems With Search Paths 209
...Recognizing Problems With Permission and Ownership 212
...Recognizing Problems With Network Access 215

12. Checking File System Integrity
217
...Understanding How the File System State Is Recorded 218
...What fsck Checks and Tries to Repair 219
......Why Inconsistencies May Occur 219
......The UFS Components That Are Checked for Consistency. 220
...Error Messages 226
......General fsck Error Messages 227
......Initialization Phase fsck Messages 229
......Phase 1: Check Blocks and Sizes Messages 232
......Phase 1B: Rescan for More DUPS Messages 236
......Phase 2: Check Path Names 236
......Phase 3: Check Connectivity Messages 244
......Phase 4: Check Reference Counts Messages 247
......Phase 5: Check Cylinder Groups Messages 251
......Cleanup Phase Messages 252
...Modifying Automatic Boot Checking 253
......The /etc/vfstab File 253
...Interactively Checking and Repairing a UFS File System 255
......Preening UFS File Systems 257
...Restoring a Bad Superblock 258
......How to Fix a UFS File System fsck Cannot Repair 260
...Syntax and Options for the fsck Command 260
......Generic fsck Command Syntax, Options, and Arguments 261

A. File System Reference
265
...Default Directories for / and /usr File Systems 265
...The Structure of UFS File System Cylinder Groups 270
......The Boot Block 271
......The Superblock 271
......Inodes 272
......Storage Blocks 273
......Free Blocks 273
...Deciding on Custom File System Parameters 274
......Logical Block Size 275
......Fragment Size 275
......Minimum Free Space 276
......Rotational Delay (Gap) 277
......Optimization Type 277
......Number of Bytes per Inode 278
...Commands for Creating a Customized File System 278
......The newfs Command Syntax, Options, and Arguments 278
......The Generic mkfs Command 281

B. Bibliography
283

Glossary
285

Index
295