Содержащиеся в
Найти другие документы
Ресурсы поддержки
| Загрузить это руководство в формате PDF
- CHAPTER 2
Setting Up a Disk Drive
- This chapter describes how to configure disk drive devices using the Solaris operating environment.
- This chapter contains the following information:
-
Requirements
- Before you configure the operating environment for a new disk drive, you must:
-
-
Note - If you did not follow the procedures in "Shutting Down the System" on page 3, the operating system may not recognize the new disk drive.
Disk Drives
- A disk drive contains a user's file systems, such as the root (/) or /usr file systems, or both. A system must have these file systems in order to work.
-
Tip - For more information about disk drives, refer to "Managing Disks" in the System Administration Guide.
-
TABLE 2-1 shows the disks that are supported by the Solaris operating environment. For more information about which disk types are supported, along with their partition maps, see the /etc/format.dat file.
-
Note - If the Solaris operating environment is on your system, the format utility can automatically configure and label the SCSI disk drives, even if that specific type of drive was not previously described in the /etc/format.dat file. This lets you format, partition, and label any disk drive compliant with SCSI-2 without having to edit the /etc/format.dat file.
-
Note - After publication of this manual, additional combinations of hardware may be identified as supported by this Solaris release. If a combination of hardware isn't specifically listed in this chapter as being supported, contact your authorized Sun support provider to verify support.
-
TABLE 2-1
| Controllers |
|
|
|
|
| Xylogics 450/451 u u
| Xylogics 7053 | Emulex MD21 | ISP-80 IPI | Embedded SCSI |
| u | u |
| u | u |
| u | u |
-
SMCC Supported Embedded SCSI
-
| Fujitsu-M2312K |
| Fujitsu-M2284/M2322 |
| Fujitsu-M2351 Eagle |
| Fujitsu-M2333 |
| Fujitsu-M2361 Eagle |
-
TABLE 2-1 (Continued)
| Controllers |
|
|
|
|
|
| Xylogics 450/451 | Xylogics 7053 u | Emulex MD21 | ISP-80 IPI | Embedded SCSI |
|
| u | u |
| u |
u
u |
u
u |
u |
| u | u |
|
| u | u |
u
u
u |
u |
u |
u
u
u
u
u
u
u
u
u |
-
SMCC Supported Embedded SCSI
-
Fujitsu-M2372K
CDC EMD 9720
CDC 9720-850
CDC IPI 9720
CDC IPI 9722
CDC Wren VII 94601-12G
CDC Wren IV 94171-327
CDC Wren IV 94171-344
Hitachi DK815-10
NEC D2363
Micropolis 1355
Micropolis 1558
Toshiba MK 156F
Seagate IPI ZBR Elite
Quantum ProDrive 80S
Quantum ProDrive 105S
SUN0104
SUN0207
SUN0327
SUN0340
SUN0424
SUN0535
SUN0669
SUN1.0G
|
-
TABLE 2-1 (Continued)
| Controllers |
|
|
|
|
|
| Xylogics 450/451 | Xylogics 7053 | Emulex MD21 | ISP-80 IPI | Embedded SCSI |
u
u
u |
-
SMCC Supported Embedded SCSI
-
· Adding a Disk Drive
-
-
Shut down your system.
Tip - See "Shutting Down the System" on page 3.
-
Check that the address switch for the disk drive has been correctly set.
The first internal disk drive usually has jumper settings that were preset by the factory to SCSI target ID 3. If your system has a second internal disk drive, the factory usually sets the jumpers to SCSI target ID 1. External disk drives are usually preset to SCSI target ID 3.
Note - Because the internal disk drive has been preset to SCSI target ID 3 (SCSI target ID 0 and 1 for sun4u architectures), you must change the default SCSI setting of your external disk drive to an unused target ID. Each SCSI target ID determines the device address that the Solaris operating environment assigns to the drive. If you have more than one SCSI device, such as a disk drive, you must set each SCSI address switch to a different address.
Caution - Each disk drive must have a unique SCSI target ID setting, the SCSI address switches on your disk drives may need to be set to different numbers than those shown in TABLE 2-2. For further information on device addresses, see Chapter 6, "Selecting Addresses."
-
Tip - See Chapter 6, "" and the System Administration Guide for more information about SCSI address settings.
-
-
Install the disk drive.
For installation information, refer to the documentation that accompanies your hardware.
-
Turn on the power to all external peripheral devices, this includes the disk drive that you plan to configure and the system.
The system is booted and the Solaris operating environment configures the system by assigning a device address to the disk drive.
-
Prepare the disk, if necessary.
Caution - For information on how to prepare the disk drive, see "format Utility" in the following section.
TABLE 2-2 Sample Layout of Address Switch Settings for Disk Drives
-
| Disk Drives | Built-In SCSI Support | First SCSI Interface Card | Second SCSI Interface Card | First IPI Interface Card | Second IPI Interface Card |
| First internal disk drive | c0t3 |
|
|
|
|
| Second internal disk drive; if you do not have a second internal disk drive, use this address for your first external disk drive. | c0t1 |
|
|
|
|
| First external disk drive connected to the built-in SCSI connector | c0t2 |
|
|
|
|
| Second external disk drive | c0t0 |
|
|
|
|
| First external disk drive | c1t1 |
|
|
|
| Second external disk drive | c1t2 |
|
|
|
| Third external disk drive | c1t3 |
|
|
|
| First external disk drive | c2t1 |
|
|
| Second external disk drive | c2t2 |
|
|
| Third external disk drive | c2t3 |
|
|
| First external disk drive | c3t1 |
|
| Second external disk drive | c3t2 |
|
-
TABLE 2-2 (Continued)
| Disk Drives | Built-In SCSI Support | First SCSI Interface Card | Second SCSI Interface Card | First IPI Interface Card | Second IPI Interface Card |
| Third external disk drive |
|
|
| c3t3 |
|
| First external disk drive |
|
|
| c4t1 |
| Second external disk drive |
|
|
| c4t2 |
| Third external disk drive |
|
|
| c4t3 |
format Utility
- Use the format utility to format, partition, and label a disk. You can also detect and repair bad blocks on a disk.
- The format utility performs autoconfiguration by first checking if there is a /etc/ format.dat entry that matches the product name it detects for the drive. If the file lacks that information, the format utility will determine the disk's geometry and capacity by issuing SCSI commands to the disk.
- Autoconfiguration occurs at start-up time for a SCSI disk that is not already labeled. You will be prompted for permission to write that label to the disk.
- You can also use the format utility to autoconfigure a disk at any time. In that case, when you enter type at the format> prompt, you can enter 0 as the disk type value to specify autoconfiguration.
- If you are using the Solaris operating environment, you can use the formatting procedures in the following sections even if your SCSI drive is not already listed in the /etc/format.dat file.
-
Tip - For more information about the format utility, refer to the System Administration Guide.
- To use the format utility, refer to the following sections of this manual:
-
· Formatting a Disk
- Formatting your disk drive is optional, because many hard disks have already been formatted at the factory. If you need to format your disk, follow the steps below.
-
Note - Not all menu information appears exactly as shown. If you have a SPARCstorage Array you must load the SPARCstorage Array drivers in order to see the disk drives.
-
-
Become superuser.
-
Access the format utility.
-
-
-
Select the disk that you want to format from the list displayed on your screen.
If the disks are already labeled, the system displays information similar to the following:
-
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t3d0 <SUN0207 cyl 1214 alt 2 hd 9 sec 36>
/sbus@1,f8000000/esp@0,8000000/sd@3,0
1. c0t0d0 <SUN0207 cyl 1214 alt 2 hd 9 sec 36>
/sbus@1,f8000000/esp@0,8000000/sd@0,0
2. c1t1d0 <SUN0207 cyl 1214 alt 2 hd 9 sec 36>
/sbus@1,f8000000/esp@0,8000000/sd@1,0
3. c1t2d0 <SUN0207 cyl 1214 alt 2 hd 9 sec 36>
/sbus@1,f8000000/esp@0,8000000/sd@2,0
Specify disk (enter its number):2
|
- In the above example:
-
- Disk drives 2 and 3 have been added.
- Drive 2 with address c1t1d0 is the first external hard disk that is connected to a SCSI card.
- Drive 3, with address c1t2d0, is the second external hard disk that is connected to a SCSI card.
- After you format the first external hard disk, you can format the second external hard disk that is connected to the SCSI card.
-
Caution - Do not select item 0, the system disk. Formatting your system disk deletes your operating system and any data that you may have on this disk.
- If the Solaris operating system is unable to find a valid label on drive 2 with address c1t1d0, the system displays information similar to the following:
-
Searching for disks...done
c1t1d0: configured with capacity of 198 MB
AVAILABLE DISK SELECTIONS:
0. c0t3d0 <SUN0207 cyl 1214 alt 2 hd 9 sec 36>
/sbus@1,f8000000/esp@0,8000000/sd@3,0
1. c0t0d0 <SUN0207 cyl 1214 alt 2 hd 9 sec 36>
/sbus@1,f8000000/esp@0,8000000/sd@0,0
2. c1t1d0 <SUN0207 cyl 1214 alt 2 hd 9 sec 36>
/sbus@1,f8000000/esp@0,8000000/sd@1,0
3. c1t2d0 <SUN0207 cyl 1214 alt 2 hd 9 sec 36>
/sbus@1,f8000000/esp@0,8000000/sd@2,0
Specify disk (enter its number):2
Selecting c1t1d0
[disk formatted]
Disk not labeled. Label it now? y
|
- The configured with capacity message and the Label it now? prompt are displayed for a disk without a valid label or for a new, unlabeled disk.
-
-
At the format> prompt, type format, and confirm the command by typing y.
-
format> format
Ready to format. Formatting cannot be interrupted.
Continue? y
Beginning format. The current time is Fri Sept 11 14:56:51 1993
Formatting ...
done
Verifying media ...
pass 0 - pattern = 0xc6dec6de
pass 1 - pattern = 0x6db6db6d
total of 0 defective blocks repaired.
format>
|
· Partitioning a Disk
- Partitioning a disk means to divide a disk so individual file systems can be created on separate slices. Refer to the System Administration Guide.
-
-
Type partition at the format prompt.
The following menu is displayed:
-
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
quit
partition>
|
-
-
Type modify.
The following menu is displayed.
-
Select partitioning base:
0. Default partition for selected drive
1. Current partition table (original sd3)
2. All Free Hog
Choose base (enter number) [0]?
|
-
Note - Not all menu information appears exactly as shown. For disk drives greater than 2.1-Gbytes there is no default partitioning table available.
-
-
Type 0.
The following message is displayed:
-
Part Tag Flag Cylinders Size Blocks
0 - - 0 - 505 80.05MB (506/0/0)
1 - - 506 - 568 9.97MB (63/0/0)
2 - - 0 - 1253 198.39MB (1254/0/0)
3 - - 0 0 (0/0/0)
4 - - 0 0 (0/0/0)
5 - - 0 0 (0/0/0)
6 - - 569 - 937 58.38MB (369/0/0)
7 - - 938 - 1253 49.99MB (316/0/0)
Do you wish to continue creating a new partition
table based on above table[yes]?
|
-
-
Type y if you want to change the size of any partitions.
The following message is displayed:
-
-
-
Select one of the 7 partitions as a free hog partition.
This partition cannot be set to 0. In the following example, you can use partition 6 as the free hog partition. Do not use partition 2. The following menu is displayed:
-
Enter size of partition '0' [163944b, 506c, 80.05mb]: 0
Enter size of partition '1' [20412b, 63c, 9.97mb]: 0
Enter size of partition '3' [0b, 0c, 0.00mb]: 0
Enter size of partition '4' [0b, 0c, 0.00mb]: 0
Enter size of partition '5' [0b, 0c, 0.00mb]: 0
Enter size of partition '7' [102384b, 316c, 49.99mb]: 80mb
|
- When you use the format utility to change the size of one or more disk partitions, you must designate a temporary partition that can expand and shrink to accommodate resizing. This partition frees space when you expand a partition, and receives or hogs the discarded space when you shrink a partition.
- For this reason, the donor partition is sometimes called the free hog. The donor partition exists only during installation or whenever you execute the format utility. There is no permanent donor partition during day-to-day operations.
-
-
Specify the size of each partition in megabytes by changing any of the displayed sizes.
In this example, the sizes have been changed as displayed:
-
Part Tag Flag Cylinders Size Blocks
0 - - 0 0 (0/0/0)
1 - - 0 0 (0/0/0)
2 - - 0 - 1253 198.39MB (1254/0/0)
3 - - 0 0 (0/0/0)
4 - - 0 0 (0/0/0)
5 - - 0 0 (0/0/0)
6 - - 0 - 747 118.34MB (748/0/0)
7 - - 748 - 1253 80.05MB (506/0/0)
Okay to make this the current partition table [yes]?
|
-
Caution - Do not change partition 2. Reducing the size of partition 2 decreases available disk space.
-
-
Type y to confirm.
The following message is displayed:
-
Enter table name (remember quotes):
|
-
-
Assign a name to the newly created table.
-
Type the new name of the partition table and press Return.
You are now ready to label your disk.
· Labeling a Disk
- To label a disk means to write back to disk the information in the partition table that you have just finished modifying.
-
Note - You must label a disk after it is partitioned or the operating system will not recognize the partitions or any changes that you have made.
-
-
Type label at the partition> or format> prompt.
The following menu is displayed:
-
-
-
Type y and press Return.
-
Type q.
-
Type q again.
· Creating a File System
- You need to create a file system for a partition when you have:
-
- Added or replaced a disk drive
- Changed the existing partitioning structure
- You must know the device address of the disk drive and partition for which you want to create a file system.
-
Note - The disk for which you plan to create a file system must already be formatted and partitioned.
-
-
Become superuser.
-
Type:
-
# newfs /dev/rdsk/cxtxdxsx
|
-
Caution - Make sure that you have specified the correct device name for the partition before you create a file system for the next partition. If you specify the wrong partition, you erase the contents of the partition that you specified.
-
-
Press Return.
The operating system asks for confirmation.
-
newfs: construct a new file system /dev/rdsk/cxtxdxsx (y/n)?
|
-
-
Type y to confirm.
· Mounting a File System
- Once you have created a file system, you need to make it available to others by mounting them. A mounted file system is attached to the system directory tree at the specified mount point, and becomes available to the system. The root file system is always mounted. Any other file system can be connected or disconnected from the root (/) file system.
- To mount a file system, follow these steps:
-
-
Edit the /etc/vfstab file with vi or any text editor.
a. Add the entry by separating each field with a space or a tab. If a field has no entry, enter a dash (-).
b. Save the /etc/vfstab file with the modifications.
Tip - For more information about writing entries in the /etc/vfstab file, see man Pages(4): File Formats and the System Administration Guide.
-
Verify that a mount point directory has been created.
If it does not exist, create it now with the mkdir command.
-
# mkdir /mount_point_directory
|
-
Note - The mount point directory must be created prior to mounting a file system.
-
-
Type:
-
# mount /dev/dsk/cxtxdxsx /mount_point_directory
|
- Or, if the entry for this file system was already made in the /etc/vfstab file:
- Type:
-
# mount /mount_point_directory
|
- You also can use the mountall(1M) command at this point.
-
Note - Be sure not to mount any partition that you intend to use as swap space or as an unmounted partition.
|
|