Disk Slices
Disks are divided into regions called “disk slices” or “disk partitions.” A slice is composed of a single range of contiguous blocks. It is a physical subset of the disk (except for slice 2, which represents the entire disk). A UFS or the swap area is built within these disk slices. The boundaries of a disk slice are defined when a disk is partitioned using the format utility, and the slice information for a particular disk can be viewed by using the prtvtoc command. Each disk slice appears to the OS (and to the system administrator) as though it were a separate disk drive.
Disk slicing differs between the SPARC and x86 platforms. On the SPARC platform, the entire disk is devoted to the OS; the disk can be divided into 8 slices, numbered 0 to 7. On the x86 platform, the disk is divided into fdisk partitions using the fdisk command. The fdisk partition is divided into 10 slices, numbered 0 to 9.
A physical disk consists of a stack of circular platters. Data is stored on these platters in a cylindrical pattern called “cylinders” as illustrated in Figure 4-1. Cylinders can be grouped and isolated from one another. A group of cylinders is referred to as a slice. A slice is defined with start and end points, starting from the outside of the platters to the center of the stack of platters, which is called the “spindle.”
Figure 4-1 Disk platters and cylinders
For example, a 73GB SCSI disk has 14,087 cylinders, numbered 0 to 14,086. Cylinder 0 is on the outside edge of the platters, and cylinder 14,086 is the closest to the spindle. Disk slices are defined by an offset and a size in cylinders. The offset is the distance from cylinder 0. To define a slice, the administrator provides a starting cylinder and an ending cylinder. A slice spanning from cylinder 0 to 14,086 would use the entire disk and is typical of the slicing scheme used on a ZFS boot disk.
When setting up slices, remember these rules:
- Each disk slice holds only one file system.
- No file system can span multiple slices without the use of a volume manager such as ZFS or SVM.
- After a file system is created, its size cannot be increased or decreased without repartitioning and possibly destroying the partition directly before or after it.
- Slices cannot span multiple disks; however, multiple swap slices on separate disks are allowed.
When we discuss ZFS in Chapter 5, you’ll learn how to get around some of these limitations in file systems.
Displaying Disk Configuration Information
As described earlier, disk configuration information is stored in the disk label. If you know the disk and slice number, you can display information for a disk by using the print volume table of contents (prtvtoc) command. You can specify the volume by specifying any slice defined on the disk (for example, /dev/rdsk/c0t3d0s2 or /dev/rdsk/c0t3d0s*). Regardless of which slice you specify, all slices defined on the disk will be displayed. If you know the target number of the disk but do not know how it is divided into slices, you can show information for the entire disk by specifying either slice 2 or s*. The following steps show how you can examine information stored on a disk’s label by using the prtvtoc command.
- Become the superuser.
Type the following text and press Enter.
# prtvtoc /dev/rdsk/c2t0d0s2<cr>
The system responds with the following:
* /dev/rdsk/c2t0d0s2 partition map * * Dimensions: * 512 bytes/sector * 424 sectors/track * 24 tracks/cylinder * 10176 sectors/cylinder * 14089 cylinders * 14087 accessible cylinders * * Flags: * 1: unmountable * 10: read-only * * Unallocated space: * First Sector Last * Sector Count Sector * 0 10176 10175 * * First Sector Last * Partition Tag Flags Sector Count Sector Mount Directory 0 2 00 10176 143339136 143349311 2 5 01 0 143349312 143349311
The disk described is a SAS disk, target 0 with an SMI VTOC label. The prtvtoc command shows the number of cylinders and heads, as well as how the disk’s slices are arranged.
The following is an example of running the prtvtoc command on a SCSI disk with an EFI label:
# prtvtoc /dev/rdsk/c2t1d0s1<cr> * /dev/rdsk/c2t1d0s1 partition map * * Dimensions: * 512 bytes/sector * 8385121 sectors * 8385054 accessible sectors * * Flags: * 1: unmountable * 10: read-only * * First Sector Last * Partition Tag Flags Sector Count Sector Mount Directory 0 2 01 34 41006 41039 1 2 00 41040 8327663 8368702 /mnt 8 11 00 8368703 16384 8385086
Using the format Utility to Create Slices: SPARC
Before you can create a file system on a disk, the disk must be formatted, and you must divide it into slices using the format utility. Formatting involves two separate processes:
- Writing format information to the disk
- Completing a surface analysis, which compiles an up-to-date list of disk defects
When a disk is formatted, header and trailer information is superimposed on the disk. When the format utility runs a surface analysis, the controller scans the disk for defects. It should be noted that defects and formatting information reduce the total disk space available for data. This is why a new disk usually holds only 90% to 95% of its capacity after formatting. This percentage varies according to disk geometry and decreases as the disk ages and develops more defects.
The need to perform a surface analysis on a disk drive has dropped as more manufacturers ship their disk drives formatted and partitioned. You should not need to perform a surface analysis within the format utility when adding a disk drive to an existing system unless you think disk defects are causing problems. The primary reason that you would use format is if you want to view or change the partitioning scheme on a disk.
The format utility searches your system for all attached disk drives and reports the following information about the disk drives it finds:
- Target location
- Disk geometry
- Whether the disk is formatted
- Whether the disk has mounted partitions
In addition, the format utility is used in disk repair operations to do the following:
- Retrieve disk labels
- Repair defective sectors
- Format and analyze disks
- Partition disks
- Label disks (i.e., write the disk name and configuration information to the disk for future retrieval)
The installation program partitions and labels disk drives as part of installing the Oracle Solaris release. However, you might need to use the format utility when doing the following:
- Displaying slice information
- Dividing a disk into slices
- Formatting a disk drive when you think disk defects are causing problems
- Repairing a disk drive
- Changing a disk label from EFI to SMI or vice versa
The following example uses the format utility to create disk slices on a disk.
- Become the superuser
Type “code.”
The system responds with the following:
Searching for disks ... done AVAILABLE DISK SELECTIONS: 0. c0t0d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107> /pci@1f,0/pci@1/scsi@8/sd@0,0 1. c0t1d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107> /pci@1f,0/pci@1/scsi@8/sd@1,0
Specify the disk (enter its number).
The system responds with the format main menu:
FORMAT MENU: disk - select a disk type - select (define) a disk type partition - select (define) a partition table current - describe the current disk format - format and analyze the disk repair - repair a defective sector label - write label to the disk analyze - surface analysis defect - defect list management backup - search for backup labels verify - read and display labels save - save new disk/partition definitions inquiry - show vendor, product and revision volname - set 8-character volume name !<cmd> - execute <cmd>, then return quit
Table 4-4 describes the format main menu items.
Table 4-4 Format Main Menu Item Descriptions
Menu Item
Description
disk
Lists all of the system’s drives. Also lets you choose the disk you want to use in subsequent operations. This disk is referred to as the current disk.
type
Identifies the manufacturer and model of the current disk. Also displays a list of known drive types. Choose the Auto configure option for all SCSI-2 disk drives.
partition
Creates and modifies slices.
current
Describes the current disk (that is, device name, device type, number of cylinders, alternate cylinders, heads, sectors, and physical device name).
format
Formats the current disk using one of these sources of information in this order:
Information that is found in the format.dat file.
Information from the automatic configuration process.
Information that you type at the prompt if no format.dat entry exists.
This command does not apply to IDE disks. IDE disks are preformatted by the manufacturer.
fdisk
x86 platform only: Runs the fdisk program to create an Oracle Solaris fdisk partition.
repair
Used to repair a specific block on the current disk.
label
Writes a new label to the current disk. This is not the same as labeling the disk with volname.
analyze
Runs read, write, and compare tests.
defect
Retrieves and displays defect lists. This feature does not apply to IDE disks. IDE disks manage defects automatically.
backup
Searches for backup labels if the VTOC becomes corrupted or gets deleted.
verify
Displays information about the current disk such as device name, device type, number of cylinders, alternate cylinders, heads, sectors, and partition table.
save
Saves new disk and partition information.
inquiry
SCSI disks only: Displays the vendor, product name, and revision level of the current drive. This will also display the disk’s current firmware.
volname
Labels the disk with a new eight-character volume name that you specify. This is not the same as writing the partition table to disk using label.
quit
Exits the format menu. Pressing Ctrl+D will also exit the format utility from the main menu or from any submenu.
Type “partition” at the format prompt. The partition menu is displayed.
format> partition<cr> PARTITION MENU: 0 - change '0' partition 1 - change '1' partition 2 - change '2' partition 3 - change '3' partition 4 - change '4' partition 5 - change '5' partition 6 - change '6' partition 7 - change '7' partition select - select a predefined table modify - modify a predefined partition table name - name the current table print - display the current table label - write partition map and label to the disk !<cmd> - execute <cmd>, then return quit
Type “print” to display the current partition map.
partition> print<cr>
The system responds with the following:
Current partition table (original): Total disk cylinders available: 24620 + 2 (reserved cylinders) Part Tag Flag Cylinders Size Blocks 0 root wm 1418 - 9924 11.72GB (8507/0/0) 24576723 1 var wm 9925 - 13469 4.88GB (3545/0/0) 10241505 2 backup wm 0 - 24619 33.92GB (24620/0/0) 71127180 3 swap wu 0 - 1417 1.95GB (1418/0/0) 4096602 4 unassigned wm 13470 - 14887 1.95GB (1418/0/0) 4096602 5 unassigned wm 14888 - 16112 1.69GB (1225/0/0) 3539025 6 unassigned wm 16113 - 16821 1000.15MB (709/0/0) 2048301 7 home wm 16822 - 23910 9.77GB (7089/0/0) 20480121
The columns displayed with the partition table are
- Part: The slice number (0–7).
Tag: This is an optional value that indicates how the slice is being used. The value can be any of the following names that best fits the function of the file system you are creating:
unassigned, boot, root, swap, usr, backup, stand, var, home, alternates, reserved, system, BIOS_boot
Flag: Values in this column can be
- wm The disk slice is writable and mountable.
- wu The disk slice is writable and unmountable (such as a swap slice).
- rm The disk slice is read-only and mountable.
- ru The disk slice is read-only and unmountable.
- Cylinders: The starting and ending cylinder number for the disk slice.
Size: The slice size specified as
- mb megabytes
- gb gigabytes
- b blocks
- c cylinders
- b Blocks
- e Ending cylinder
You can use the name and save commands in the partition menu to name and save a newly created partition table to a file that can be referenced by name later, when you want to use this same partition scheme on another disk. When issuing the name command, you’ll provide a unique name for this partition scheme and then issue the save command to save the information to the ./format.dat file. Normally this file is located in the /etc directory, so provide the full pathname for /etc/format.dat to update the master file.
After you partition the disk, you must label it by typing label at the partition prompt:
partition> label<cr>
You are asked for confirmation on labeling the disk as follows:
Ready to label disk, continue? y<cr>
Enter “Y” to continue.
After labeling the disk, type “quit” to exit the partition menu or press Ctrl+D to exit the format utility:
partition> quit<cr>
Type “quit” again to exit the format utility:
format> quit<cr>
It’s important to point out a few undesirable things that can happen when defining disk partitions with the format utility if you’re not careful. First, be careful not to waste disk space. Wasted disk space can occur when you decrease the size of one slice and do not adjust the starting cylinder number of the adjoining disk slice.
Second, don’t overlap disk slices. Overlapping occurs when one or more cylinders are allocated to more than one disk slice. For example, increasing the size of one slice without decreasing the size of the adjoining slice will create overlapping partitions. The format utility will not warn you of wasted disk space or overlapping partitions.
The main reason a system administrator uses the format utility is to divide a disk into disk slices. In Oracle Solaris 11 11/11, for a bootable ZFS root pool, the disks in the pool must contain slices and must be labeled with an SMI label. The simplest configuration would be to put the entire disk capacity in slice 0 and use that slice for the root pool. Bootable ZFS root pools are discussed further in Chapter 5.
I’ll describe how to use the SMI label for SPARC-based systems. For example, on a SPARC-based system with a 72GB disk, you would need to have 68GB of usable space located in slice 0. Similarly, on an x86-based system with a 72GB disk, you would also need to allow 68GB of usable space located in slice 0. A small amount of boot information is contained in slice 8. Slice 8 requires no administration and cannot be changed.
Follow these steps to partition a disk (c2t0d0) to be used as a ZFS boot disk (bootable ZFS root pool) on a SPARC-based system. If the disk has an EFI label, and the firmware has not been upgraded, you must first convert it to an SMI label.
Use the prtvtoc command to verify the disk label as follows:
# prtvtoc /dev/rdsk/c2t0d0s2<cr>
The system displays
Part Tag Flag Cylinders Size Blocks 0 root wm 1 - 14086 68.35GB (14086/0/0) 143339136 1 unassigned wm 0 0 (0/0/0) 0 2 backup wu 0 - 14086 68.35GB (14087/0/0) 143349312 3 unassigned wm 0 0 (0/0/0) 0 4 unassigned wm 0 0 (0/0/0) 0 5 unassigned wm 0 0 (0/0/0) 0 6 unassigned wm 0 0 (0/0/0) 0 7 unassigned wm 0 0 (0/0/0) 0
Notice that slice 2 is labeled “backup” and the slices are numbered 0-7. This is an SMI label.
The following shows the output that is displayed for a disk with an EFI label:
Part Tag Flag First Sector Size Last Sector 0 usr wm 34 68.36GB 143358320 1 unassigned wm 0 0 0 2 unassigned wm 0 0 0 3 unassigned wm 0 0 0 4 unassigned wm 0 0 0 5 unassigned wm 0 0 0 6 unassigned wm 0 0 0 7 unassigned wm 0 0 0 8 reserved wm 143358321 8.00MB 143374704
Notice there is a slice 8 and slice 2 is NOT labeled “backup.” This is an EFI label and would need to be changed. Use the following steps to change the label from an EFI label to an SMI label:
As root, use the format -e command and select the disk to label as follows:
# format –e<cr>
The system displays a list of disks. In the example, I selected disk 1 (c2t1d0):
Searching for disks ... done AVAILABLE DISK SELECTIONS: 0. c2t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424> /pci@780/pci@0/pci@9/scsi@0/sd@0,0 1. c2t1d0 <SEAGATE-ST973402SSUN72G-0603-68.37GB> /pci@780/pci@0/pci@9/scsi@0/sd@1,0 Specify disk (enter its number): 1<cr> selecting c2t1d0 [disk formatted]
The main menu is displayed. Type “label” to label the disk:
FORMAT MENU: disk - select a disk type - select (define) a disk type partition - select (define) a partition table current - describe the current disk format - format and analyze the disk repair - repair a defective sector label - write label to the disk analyze - surface analysis defect - defect list management backup - search for backup labels verify - read and display labels inquiry - show disk ID scsi - independent SCSI mode selects cache - enable, disable or query SCSI disk cache volname - set 8-character volume name !<cmd> - execute <cmd>, then return quit format> label<cr>
Select option 1 to label the disk with an SMI label and press Enter when prompted for autoconfiguration:
[0] SMI Label [1] EFI Label Specify Label type[1]: 0<cr> Auto configuration via format.dat[no]?<cr> Auto configuration via generic SCSI-2[no]?<cr> format>
Exit the format utility.
format> quit<cr>
To slice the disk so that it can be used as a ZFS boot disk, follow these steps:
As root, enter the format utility:
# format<cr> Searching for disks ... done
Select the disk that is going to be sliced. In the example, I will select disk 1 (c2t1d0):
AVAILABLE DISK SELECTIONS: 0. c2t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424> /pci@780/pci@0/pci@9/scsi@0/sd@0,0 1. c2t1d0 <SEAGATE-ST973402SSUN72G-0603-68.37GB> /pci@780/pci@0/pci@9/scsi@0/sd@1,0 Specify disk (enter its number): 1<cr>
The system responds with
selecting c2t1d0 [disk formatted]
Type “partition” at the format prompt. The partition menu is displayed.
format> partition<cr> PARTITION MENU: 0 - change '0' partition 1 - change '1' partition 2 - change '2' partition 3 - change '3' partition 4 - change '4' partition 5 - change '5' partition 6 - change '6' partition 7 - change '7' partition select - select a predefined table modify - modify a predefined partition table name - name the current table print - display the current table label - write partition map and label to the disk !<cmd> - execute <cmd>, then return quit
Type “print” to display the current partition map.
partition> print<cr>
The system responds with the following:
partition> print<cr> Current partition table (original): Total disk cylinders available: 14087 + 2 (reserved cylinders) Part Tag Flag Cylinders Size Blocks 0 root wm 0 - 25 129.19MB (26/0/0) 264576 1 swap wu 26 - 51 129.19MB (26/0/0) 264576 2 backup wu 0 - 14086 68.35GB (14087/0/0) 143349312 3 unassigned wm 0 0 (0/0/0) 0 4 unassigned wm 0 0 (0/0/0) 0 5 unassigned wm 0 0 (0/0/0) 0 6 usr wm 52 - 14086 68.10GB (14035/0/0) 142820160 7 unassigned wm 0 0 (0/0/0) 0 partition>
Enter “modify” to change the partition table:
partition> modify<cr>
Select option 1 for “All Free Hog” when prompted:
Select partitioning base: 0. Current partition table (original) 1. All Free Hog Choose base (enter number) [0]? 1<cr> Part Tag Flag Cylinders Size Blocks 0 root wm 0 0 (0/0/0) 0 1 swap wu 0 0 (0/0/0) 0 2 backup wu 0 - 14086 68.35GB (14087/0/0) 143349312 3 unassigned wm 0 0 (0/0/0) 0 4 unassigned wm 0 0 (0/0/0) 0 5 unassigned wm 0 0 (0/0/0) 0 6 usr wm 0 0 (0/0/0) 0 7 unassigned wm 0 0 (0/0/0) 0
Type “yes” when asked whether to continue:
Do you wish to continue creating a new partition table based on above table[yes]? yes<cr>
Type “0” for the Free Hog partition:
Free Hog partition[6]? 0<cr>
The system will prompt you to enter a size for each partition. Press Enter when prompted as follows, and each slice will be 0MB:
Enter size of partition '1' [0b, 0c, 0.00mb, 0.00gb]:<cr> Enter size of partition '3' [0b, 0c, 0.00mb, 0.00gb]:<cr> Enter size of partition '4' [0b, 0c, 0.00mb, 0.00gb]:<cr> Enter size of partition '5' [0b, 0c, 0.00mb, 0.00gb]:<cr> Enter size of partition '6' [0b, 0c, 0.00mb, 0.00gb]:<cr> Enter size of partition '7' [0b, 0c, 0.00mb, 0.00gb]:<cr>
Because all of the slices have been set to “0,” the free hog space is the entire disk. This space will be allocated to slice 0 as specified in step 6.
When prompted to make this the current partition table, press Enter to use the default value “yes”:
Okay to make this the current partition table[yes]?<cr>
When prompted for a table name, enter “rootdisk.” This name is not significant and can be any name.
Enter table name (remember quotes): rootdisk<cr>
Enter “pr” to display the new partition table:
partition> pr<cr> Current partition table (unnamed): Total disk cylinders available: 14087 + 2 (reserved cylinders) Part Tag Flag Cylinders Size Blocks 0 root wm 0 - 14086 68.35GB (14087/0/0) 143349312 1 swap wu 0 0 (0/0/0) 0 2 backup wu 0 - 14086 68.35GB (14087/0/0) 143349312 3 unassigned wm 0 0 (0/0/0) 0 4 unassigned wm 0 0 (0/0/0) 0 5 unassigned wm 0 0 (0/0/0) 0 6 usr wm 0 0 (0/0/0) 0 7 unassigned wm 0 0 (0/0/0) 0 partition>
Notice that slice 0 is the entire disk.
Enter “quit” or press Ctrl+D to exit the format utility.
partition> quit<cr>
Using the format Utility to Create Slices: x86
As described earlier in this chapter, Oracle Solaris on the x86 platform treats disk drives slightly differently than on the SPARC-based systems. Disks on the x86 platform must have an fdisk partition table. The x86-based systems use the fdisk partition table to identify parts of the disk reserved for different OSs and to identify the partition that the system will boot from. This boot partition is referred to as the “active disk” partition. You can assign one fdisk partition on a disk to be used for Oracle Solaris.
On an x86-based system, once a disk drive has been physically installed and verified as working, you’ll use the format command to slice the disk, but first an fdisk partition must be created on the new drive. You can create this fdisk partition using the fdisk command from the command line or through the format utility. The following steps describe how to create a fixed disk partition table on a disk using the format utility:
As root, type “format” to get into the format utility.
# format<cr>
The following menu appears:
AVAILABLE DISK SELECTIONS: 0. c1t0d0 <FUJITSU-M1606S-512-6234 cyl 3455 alt 2 hd 6 sec 102> /pci@0,0/pci9004,8178@3/cmdk@0,0 1. c1t1d0 <IBM-DFHSS1W!e-4141 cyl 4071 alt 2 hd 4 sec 135> /pci@0,0/pci9004,8178@3/cmdk@1,0 2. c1t2d0 <DEFAULT cyl 2928 alt 2 hd 6 sec 120> /pci@0,0/pci9004,8178@3/cmdk@2,0 Specify disk (enter its number):
Enter the number corresponding to the new drive and the following menu will be displayed:
FORMAT MENU: disk - select a disk type - select (define) a disk type partition - select (define) a partition table current - describe the current disk format - format and analyze the disk fdisk - run the fdisk program repair - repair a defective sector label - write label to the disk analyze - surface analysis defect - defect list management backup - search for backup labels verify - read and display labels save - save new disk/partition definitions inquiry - show vendor, product and revision volname - set 8-character volume name5 quit format>
Select the fdisk option and the following menu appears:
The recommended default partitioning for your disk is: a 100% "SOLARIS System" partition. To select this, please type "y". To partition your disk differently, type "n" and the "fdisk" program will let you select other partitions.
If you wish to use the entire drive for Oracle Solaris, enter “Y.” This will return you to the format menu. If “N” is entered, the fdisk menu will be displayed.
Total disk size is 4073 cylinders Cylinder size is 540 (512 byte) blocks Cylinders Partition Status Type Start End Length ========= ====== ======== ===== === ====== === THERE ARE NO PARTITIONS CURRENTLY DEFINED SELECT ONE OF THE FOLLOWING: 1. Create a partition 2. Change Active (Boot from) partition 3. Delete a partition 4. Exit (Update disk configuration and exit) 5. Cancel (Exit without updating disk configuration) Enter Selection:
- Choose 1 to create an fdisk partition. This is not the same as a slice.
- After creating the partition, choose 4 to exit and save. The format menu will return.
- Choose partition and follow the procedure for formatting a disk on page 272, beginning at step 4.
Disks on x86-based systems can be divided into 10 slices labeled slice 0 through slice 9. On Oracle Solaris 11/11, slices 0 through 7 are used for the same purposes as disk slices found on SPARC-based systems. Slice 2 represents all of the space within the fdisk partition. As stated earlier, slices 8 and 9 are used for purposes specific to x86-based hardware. You cannot modify slices 8 and 9 using the format utility. Beginning with Oracle Solaris 11.1, the boot disk on an x86-based system can contain an EFI label, and the partition scheme is slightly different than the SPARC system. Slice 0 is reserved for the BIOS_boot information. I’ll describe this more in the next chapter.
Here’s an example of the partition table on an IDE or SATA disk on an x86-based system running Oracle Solaris 11/11, as displayed by the format utility:
Part Tag Flag Cylinders Size Blocks (output omitted) 8 boot wu 0 - 0 7.84MB (1/0/0) 16065 9 alternates wm 1 - 2 15.69MB (2/0/0) 32130
In the previous example, notice that slice 9 is defined and tagged as the alternates slice.
The next example shows the partition table for a SCSI disk attached to an x86-based system. Notice that partition 8 is assigned, but slice 9 is not used:
Part Tag Flag Cylinders Size Blocks (output omitted) 8 boot wu 0 - 0 7.84MB (1/0/0) 16065 9 unassigned wm 0 0 (0/0/0) 0
One more item of note: On standard UFSs, don’t change the size of disk slices that are currently in use. When a disk with existing slices is repartitioned and relabeled, any existing data will be lost. Before repartitioning a disk, first copy all of the data to tape or to another disk.
You can also create the fixed disk partition table on an x86-based system disk from the command line using a single command as follows:
# fdisk –B c1t0d0<cr>
The –B option creates a single fixed disk partition that spans the entire disk. The following 36GB disk was formatted using the fdisk –B command:
Part Tag Flag Cylinders Size Blocks 0 unassigned wm 0 0 (0/0/0) 0 1 unassigned wm 0 0 (0/0/0) 0 2 backup wu 0 - 4695 35.97GB (4696/0/0) 75441240 3 unassigned wm 0 0 (0/0/0) 0 4 unassigned wm 0 0 (0/0/0) 0 5 unassigned wm 0 0 (0/0/0) 0 6 unassigned wm 0 0 (0/0/0) 0 7 unassigned wm 0 0 (0/0/0) 0 8 boot wu 0 - 0 7.84MB (1/0/0) 16065 9 unassigned wm 0 0 (0/0/0) 0
The fdisk –B command can also be used to convert a disk label from an EFI to SMI.
To verify that a disk contains a fixed disk partition table, issue the following command:
# fdisk -v -W - /dev/rdsk/c3t0d0p<cr>
The system displays the fdisk table for disk c3t0d0:
* /dev/rdsk/c3t0d0p0 default fdisk table * Dimensions: * 512 bytes/sector * 63 sectors/track * 255 tracks/cylinder * 2088 cylinders * * systid: * 1: DOSOS12 * 2: PCIXOS * 4: DOSOS16 * 5: EXTDOS * 6: DOSBIG * 7: FDISK_IFS * 8: FDISK_AIXBOOT * 9: FDISK_AIXDATA * 10: FDISK_0S2BOOT * 11: FDISK_WINDOWS * 12: FDISK_EXT_WIN * 14: FDISK_FAT95 * 15: FDISK_EXTLBA * 18: DIAGPART * 65: FDISK_LINUX * 82: FDISK_CPM * 86: DOSDATA * 98: OTHEROS * 99: UNIXOS * 100: FDISK_NOVELL2 * 101: FDISK_NOVELL3 * 119: FDISK_QNX4 * 120: FDISK_QNX42 * 121: FDISK_QNX43 * 130: SUNIXOS * 131: FDISK_LINUXNAT * 134: FDISK_NTFSVOL1 * 135: FDISK_NTFSVOL2 * 165: FDISK_BSD * 167: FDISK_NEXTSTEP * 183: FDISK_BSDIFS * 184: FDISK_BSDISWAP * 190: X86BOOT * 191: SUNIXOS2 * 238: EFI_PMBR * 239: EFI_FS * Id Act Bhead Bsect Bcyl Ehead Esect Ecyl Rsect Numsect 191 128 0 1 1 254 63 1023 16065 33527655 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
When there are multiple disks of the same type (manufacturer, model, size, and geometry) to be sliced, you can save time by copying the label from a source disk over to a target disk without going through all of the steps using the format utility. Use the prtvtoc command to get the partition table from the source disk (c0t0d0) and write the table to the target disk (c0t1d0) using the fmthard command as follows:
# prtvtoc /dev/rdsk/c0t0d0s2 | fmthard –s - /dev/rdsk/c0t1d0s2<cr>