包含在尋找其他文件熱門支援資源 | 以 PDF 格式下載這本書 (1386 KB)
Chapter 28 Disk Management (Overview)This overview chapter provides conceptual information about Solaris disk slices and introduces the format utility. This is a list of the overview information in this chapter. For instructions on how to add a disk drive to your system, see Chapter 30, SPARC: Adding a Disk (Tasks) or Chapter 31, IA: Adding a Disk (Tasks). What's New in Disk Management?This section describes features introduced in the Solaris 8 release. IA: Support for Large DisksThis Solaris release fully uses disks larger than 8 Gbytes because of improved BIOS interfaces. Previously, the following limitations impacted IA based systems running the Solaris Intel Platform Edition:
Both of these restrictions have been removed on systems with improved BIOSes. See Solaris 8 (Intel Platform Edition) Installation Guide for more information. Where to Find Disk Management TasksUse these references to find step-by-step instructions for managing disks. IntroductionManaging disks in the Solaris environment usually involves setting up the system and running the Solaris installation program to create the appropriate disk slices and install the operating system. Occasionally, you might need to use the format utility to add a new disk drive or replace a defective one. Disk TerminologyBefore you can effectively use the information in this section, you should be familiar with basic disk architecture. In particular, you should be familiar with the following terms:
If you are unfamiliar with these terms, refer to the glossary (for a brief definition) or product information from the disk's manufacturer. About Disk SlicesFiles stored on a disk are contained in file systems. Each file system on a disk is assigned to a slice--a group of cylinders set aside for use by that file system. Each disk slice appears to the operating system (and to the system administrator) as though it were a separate disk drive. See Chapter 34, Managing File Systems (Overview) for information about file systems. Note - Slices are sometimes referred to as partitions. This book uses slice but certain interfaces, such as the format utility, refer to slices as partitions. When setting up slices, remember these rules:
Slices are set up slightly differently on SPARC and IA platforms. The table below summarizes the differences: Table 28-1 Slice Differences on Platforms
SPARC: Disk SlicesOn SPARC based systems, Solaris defines eight disk slices and assigns to each a conventional use. These slices are numbered 0 through 7. The table below summarizes the contents of the eight Solaris slices on a SPARC based system. Table 28-2 SPARC: Customary Disk Slices
IA: Disk SlicesOn IA based systems, disks are divided into fdisk partitions. An fdisk partition is a section of the disk reserved for a particular operating environment, such as Solaris. Solaris places ten slices, numbered 0-9, on a Solaris fdisk partition as shown in the following table. Table 28-3 IA: Customary Disk Slices
Using Raw Data SlicesThe SunOS operating system stores the disk label in block 0, cylinder 0 of each disk. This means that using third-party database applications that create raw data slices must not start at block 0, cylinder 0, or the disk label will be overwritten and the data on the disk will be inaccessible. Do not use the following areas of the disk for raw data slices, which are sometimes created by third-party database applications:
Slice Arrangements on Multiple DisksAlthough a single disk that is large enough can hold all slices and their corresponding file systems, two or more disks are often used to hold a system's slices and file systems. Note - A slice cannot be split between two or more disks. However, multiple swap slices on separate disks are allowed. For instance, a single disk might hold the root (/) file system, a swap area, and the /usr file system, while a separate disk is provided for the /export/home file system and other file systems containing user data. In a multiple disk arrangement, the disk containing the operating system software and swap space (that is, the disk holding the root (/) or /usr file systems or the slice for swap space) is called the system disk. Disks other than the system disk are called secondary disks or non-system disks. Locating a system's file systems on multiple disks allows you to modify file systems and slices on the secondary disks without having to shut down the system or reload operating system software. Having more than one disk also increases input-output (I/O) volume. By distributing disk load across multiple disks, you can avoid I/O bottlenecks. Determining Which Slices to UseWhen you set up a disk's file systems, you choose not only the size of each slice, but also which slices to use. Your decisions about these matters depend on the configuration of the system to which the disk is attached and the software you want to install on the disk. The system configurations are:
Each system configuration requires the use of different slices. The table below lists these requirements. Table 28-4 System Configurations and Slice Requirements
See "Overview of System Types" for more information about system configurations. Note - The Solaris installation program provides slice size recommendations based on the software you select for installation. The format UtilityRead the following information if you want to see a conceptual view of the format utility and it uses before proceeding to the "how-to" or reference sections. DefinitionThe format utility is a system administration tool used to prepare hard disk drives for use on your Solaris system. The format utility cannot be used on diskette drives, CD-ROM drives, or tape drives. Features and BenefitsThe table below shows the features and associated benefits that the format utility provides. Table 28-5 Features and Benefits of the format Utility
All of the options of the format utility are fully described in Chapter 32, The format Utility (Reference). When to Use the format UtilityDisk drives are partitioned and labeled by the Solaris installation program as part of installing the Solaris release. You might need to use the format utility when:
The main reason a system administrator uses the format utility is to divide a disk into disk slices. These steps are covered in Chapter 30, SPARC: Adding a Disk (Tasks) and Chapter 31, IA: Adding a Disk (Tasks). See the section below for guidelines on using the format utility. Guidelines for Using the format UtilityTable 28-6 The format Utility Guidelines
Formatting a DiskIn most cases, disks are formatted by the manufacturer or reseller and do not need to be reformatted when you install the drive. To determine whether or not a disk is formatted, use the format utility. See "How to Determine if a Disk is Formatted" for more information. If you determine that a disk is not formatted, use the format utility to format the disk. Formatting a disk accomplishes two steps:
Formatting is a destructive process--it overwrites data on the disk. For this reason, disks are usually formatted only by the manufacturer or reseller. If you think disk defects are causing recurring problems, you can use the format utility to do a surface analysis, but be careful to use only the commands that do not destroy data. See "How to Format a Disk" for details. A small percentage of total disk space available for data is used to store defect and formatting information. This percentage varies according to disk geometry, and decreases as the disk ages and develops more defects. Formatting might take anywhere from a few minutes to several hours, depending on the type and size of the disk. About Disk LabelsA special area of every disk is set aside for storing information about the disk's controller, geometry, and slices. That information is called the disk's label. Another term used to described the disk label is the VTOC (Volume Table of Contents). To label a disk means to write slice information onto the disk. You usually label a disk after changing its slices. If you fail to label a disk after creating slices, the slices will be unavailable because the operating system has no way of "knowing" about the slices. Partition TableAn important part of the disk label is the partition table which identifies a disk's slices, the slice boundaries (in cylinders), and total size of the slices. A disk's partition table can be displayed using the format utility. The table below describes partition table terminology. Table 28-7 Partition Table Terminology
Partition flags and tags are assigned by convention and require no maintenance. See "How to Display Disk Slice Information" or "How to Examine a Disk Label" for more information on displaying the partition table. Examples--Partition TablesThe following partition table example is displayed from a 1.05-Gbyte disk using the format utility:
The partition table contains the following information:
The following example displays a disk label using the prtvtoc command.
The disk label includes the following information: Dimensions - This section describes the physical dimensions of the disk drive. Flags - This section describes the flags listed in the partition table section. See Table 28-7 for a description of partition flags. Partition (or Slice) Table - This section contains the following information:
Dividing a Disk Into SlicesThe format utility is most often used by system administrators to divide a disk into slices. The steps are:
The easiest way to divide a disk into slices is to use the modify command from the partition menu. The modify command allows you to create slices by specifying the size of each slice in megabytes without having to keep track of starting cylinder boundaries. It also keeps tracks of any disk space remainder in the "free hog" slice. Using the Free Hog SliceWhen you use the format utility to change the size of one or more disk slices, you designate a temporary slice that will expand and shrink to accommodate the resizing operations. This temporary slice donates, or "frees," space when you expand a slice, and receives, or "hogs," the discarded space when you shrink a slice. For this reason, the donor slice is sometimes called the free hog. The donor slice exists only during installation or when you run the format utility. There is no permanent donor slice during day-to-day, normal operations. See "SPARC: How to Create Disk Slices and Label a Disk" or "IA: How to Create Disk Slices and Label a Disk" for information on using the free hog slice. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||