Skip Navigation Links | |
Exit Print View | |
System Administration Guide: Devices and File Systems Oracle Solaris 10 1/13 Information Library |
1. Managing Removable Media (Overview/Tasks)
2. Writing CDs and DVDs (Tasks)
4. Dynamically Configuring Devices (Tasks)
5. Managing USB Devices (Tasks)
6. Using InfiniBand Devices (Overview/Tasks)
What's New in Disk Management?
Where to Find Disk Management Tasks
Comparison of the EFI Label and the VTOC Label
Restrictions of the EFI Disk Label
x86: Support for EFI-Labeled Disks
Managing Disks With EFI Labels
Troubleshooting Problems With EFI Disk Labels
When to Use the format Utility
Displaying Partition Table Information
9. Administering Disks (Tasks)
10. SPARC: Setting Up Disks (Tasks)
11. x86: Setting Up Disks (Tasks)
12. Configuring Oracle Solaris iSCSI Targets (Tasks)
13. The format Utility (Reference)
14. Managing File Systems (Overview)
15. Creating and Mounting File Systems (Tasks)
16. Configuring Additional Swap Space (Tasks)
17. Checking UFS File System Consistency (Tasks)
18. UFS File System (Reference)
19. Backing Up and Restoring UFS File Systems (Overview/Tasks)
20. Using UFS Snapshots (Tasks)
21. Copying Files and File Systems (Tasks)
22. Managing Tape Drives (Tasks)
Managing disks in the Oracle Solaris OS usually involves setting up the system and running the Oracle Solaris installation program to create the appropriate disk slices and file systems and to install the Oracle Solaris OS. Occasionally, you might need to use the format utility to add a new disk drive or replace a defective disk drive.
The following information is described in this section:
Before you can effectively use the information that is described in this section, you should be familiar with basic disk architecture. In particular, you should be familiar with the terms in the following table.
|
For additional information, see your disk manufacturer's product information.
A special area of every disk is set aside for storing information about the disk's controller, geometry, and slices. This information is called the disk's label. Another term that is used to described the disk label is the VTOC (Volume Table of Contents) on a disk with a VTOC label. To label a disk means to write slice information onto the disk. You usually label a disk after you change its slices or partitions.
The Oracle Solaris release supports the following two disk labels:
SMI – The traditional VTOC label for disks that are less than 2 TB in size.
EFI – Provides support for disks that are larger than 2 TB. The Extensible Firmware Interface GUID Partition Table (EFI GPT) disk label is also available for disks less than 2 TB.
If you fail to label a disk after you create slices, the slices will be unavailable because the OS has no way of “knowing” about the slices.
The EFI label provides support for physical disks and virtual disk volumes that are greater than 2 TB in size. This release also includes disk utilities for managing disks greater than 2 TB in size.
The following file system products support file systems that are greater than 1 TB in size:
The Oracle Solaris ZFS file system supports file systems that are greater than 1 TB in size.
The legacy Solaris Volume Manager software can also be used to manage disks that are greater than 1 TB..
You can use the format -e command to apply an EFI label to a disk, if the system is running a supported Oracle Solaris release. However, you should review the important information in Restrictions of the EFI Disk Label before attempting to apply an EFI label.
You can also use the format -e command to reapply a VTOC label, if the EFI label is no longer needed. For example:
# format -e Specify disk (enter its number): 2 selecting c0t5d0 [disk formatted] . . . format> label [0] SMI Label [1] EFI Label Specify Label type[1]: 0 Warning: This disk has an EFI label. Changing to SMI label will erase all current partitions. Continue? yes Auto configuration via format.dat[no]? Auto configuration via generic SCSI-2[no]? format> quit
Caution - Keep in mind that changing disk labels will destroy any data on the disk. |
The EFI disk label differs from the VTOC disk label in the following ways:
Provides support for disks greater than 2 terabytes in size.
Provides usable slices 0-6, where partition 2 is just another slice.
Partitions (or slices) cannot overlap with the primary or backup label, nor with any other partitions. The size of the EFI label is usually 34 sectors, so partitions usually start at sector 34. This feature means that no partition can start at sector zero (0).
EFI (GPT) labels do not use the notion of geometry. The partitions are defined based on logical blocks.
Some information that was stored in the alternate cylinder area is now stored in the last two cylinders of a disk or Solaris partition.
If you use the format utility to change partition sizes, the unassigned partition tag is assigned to partitions with sizes equal to zero. By default, the format utility assigns the usr partition tag to any partition with a size greater than zero. You can use the partition change menu to reassign partition tags, after the partitions are changed. However, you cannot change a partition with a non-zero size to the unassigned partition tag.
Keep the following restrictions in mind when determining whether using disks greater than 2 terabytes is appropriate for your environment:
Layered software products that are intended for systems with VTOC-labeled disks might be incapable of accessing a disk with an EFI disk label.
On x86 based systems, you can use the fdisk command on a disk with an EFI label that is greater than 2 TB in size.
Use the format utility to partition disks with EFI labels.
The EFI specification prohibits overlapping partitions. The entire disk is represented by cxtydz.
The EFI disk label provides information about disk or partition sizes in sectors and blocks, but not in cylinders and heads.
The following format options are either not supported or are not applicable to disks with EFI labels:
The save option is not supported, because disks with EFI labels do not need an entry in the format.dat file.
The backup option is not applicable.
Oracle Solaris support for the EFI disk label is available on x86 systems. Use the following command to add an EFI label on an x86 system:
# format -e > [0] SMI Label > [1] EFI Label > Specify Label type[0]: 1 > WARNING: converting this device to EFI labels will erase all current > fdisk partition information. Continue? yes
Previous label information is not converted to the EFI disk label.
You will have to recreate the label's partition information manually with the format command. You cannot use the fdisk command on a disk with an EFI label that is 2 terabytes in size. If the fdisk command is run on a disk that is greater than 2 TB in size to create a Solaris partition, the Solaris partition is limited to 2 TB. For more information about EFI disk labels, see the preceding section.
Use the following table to locate information on managing disks with EFI labels.
|
Use the following error messages and solutions to troubleshoot problems with EFI-labeled disks.
Boot a system running a SPARC or x86 kernel with a disk greater than 1 terabyte.
Dec 3 09:12:17 holoship scsi: WARNING: /sbus@a,0/SUNW,socal@d,10000/ sf@1,0/ssd@w50020f23000002a4,0 (ssd1): Dec 3 09:12:17 holoship corrupt label - wrong magic number
You attempted to add a disk to a system running an older Solaris release.
Add the disk to a system running the Solaris release that supports the EFI disk label.
Files that are stored on a disk are contained in file systems. Each file system on a disk is assigned to a slice, which is a group of sectors that are set aside for use by that file system. Each disk slice appears to the Oracle Solaris OS (and to the system administrator) as though it were a separate disk drive.
For information about file systems, see Chapter 14, Managing File Systems (Overview).
Note - Slices are sometimes referred to as partitions. Certain interfaces, such as the format utility, refer to slices as partitions.
When setting up slices, remember these rules:
Each disk slice holds only one file system.
No file system can span multiple slices.
Slices are set up slightly differently on SPARC and x86 platforms. The following table summarizes the differences.
The disk label is stored in block 0 of each disk. So, third-party database applications that create raw data slices must not start at block 0. Otherwise, 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:
Block 0 where the disk label is stored
Slice 2, which represents the entire disk with a VTOC label
Read the following overview of the format utility and its uses before proceeding to the “how-to” or reference sections.
The format utility is a system administration tool that is used to prepare hard disk drives for use on your Oracle Solaris system.
The following table describes the features and associated benefits of the format utility.
Table 7-1 Features and Benefits of the format Utility
|
The format utility options are described in Chapter 13, The format Utility (Reference).
Disk drives are partitioned and labeled by the Oracle Solaris installation utility when you install Oracle Solaris. You can use the format utility to do the following:
Display slice or partition information
Partition a disk
Add a disk drive to an existing system
Format a disk drive
Label a disk
Repair a disk drive
Analyze a disk for errors
The main reason a system administrator uses the format utility is to partition a disk. These steps are covered in Chapter 10, SPARC: Setting Up Disks (Tasks) and x86: Setting Up Disks for ZFS File Systems (Task Map).
See the following section for guidelines on using the format utility.
Table 7-2 format Utility Guidelines
|
In most cases, disks are formatted by the manufacturer or reseller. So, they do not need to be reformatted when you install the drive. To determine if a disk is formatted, use the format utility. For more information, see How to Determine if a Disk Is Formatted.
If you determine that a disk is not formatted, use the format utility to format the disk.
When you format a disk, you accomplish two steps:
The disk media is prepared for use.
A list of disk defects based on a surface analysis is compiled.
Caution - Formatting a disk is a destructive process because 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 the cause of recurring problems, you can use the format utility to do a surface analysis. However, be careful to use only the commands that do not destroy data. For details, see How to Format a Disk. |
A small percentage of total disk space that is 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 a disk might take anywhere from a few minutes to several hours, depending on the type and size of the disk.