Solaris 2.5.1 Handbook for SMCC Peripherals
  Sök endast i den här boken
Ladda ner denna bok i PDF

Setting Up a Disk Drive

2

This chapter describes how to configure disk drive devices using the Solaris 2.5.1 operating environment.
This chapter contains the following information:
Requirements you must performpage 14
Disk Drives and controllers supported by SMCCpage 14
Adding a Disk Drive to your systempage 17
The format Utilitypage 19
Formatting a Diskpage 20
Partitioning a Diskpage 23
Labeling a Diskpage 26
Creating a File Systempage 27
Mounting a File Systempage 28

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

Text Box(504x57)

Table 2-1 shows the disks that are supported by the Solaris 2.5.1 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 2.5.1 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 SMCC-Supported Disks and Controllers
Controllers
SMCC-Supported Disks Xylogics
Xylogics Emulex
ISP-80 IPI Embedded
SMCC
450/451..7053
MD21........ SCSI
Supported Embedded SCSI
Fujitsu-M2312K·
Fujitsu-M2284/M2322·
Fujitsu-M2351 Eagle           ·           ·
Fujitsu-M2333                 ·           ·
Fujitsu-M2361 Eagle           ·           ·
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                                                           ·

Table 2-1 SMCC-Supported Disks and Controllers (Continued)
Controllers
SMCC-Supported Disks Xylogics
Xylogics Emulex
ISP-80 IPI Embedded
SMCC
450/451..7053
MD21........ SCSI
Supported Embedded SCSI
Quantum ProDrive 105S·
SUN0104·
SUN0207·
SUN0327·
SUN0340·
SUN0424·
SUN0535·
SUN0669·
SUN1.0G·
SUN1.05·
SUN1.3G·
SUN2.1G·

· Adding a Disk Drive

Text Box(504x63)

Text Box(504x42)



Note - Because the internal disk drive has been preset to SCSI target ID 3, 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 2.5.1 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 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."

  1. Install the disk drive.

    For installation information, refer to the documentation that accompanies your hardware.

  2. 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 2.5.1 operating environment configures the system by assigning a device address to the disk drive.

  3. 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
Disk DrivesBuilt-In SCSI SupportFirst SCSI Interface CardSecond SCSI Interface CardFirst IPI Interface CardSecond IPI Interface Card
First internal disk drivec0t3



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 connectorc0t2



Second external disk drivec0t0



First external disk drivec1t1


Second external disk drivec1t2


Third external disk drivec1t3


First external disk drivec2t1

Second external disk drivec2t2

Third external disk drivec2t3

First external disk drivec3t1
Second external disk drivec3t2
Third external disk drivec3t3
First external disk drivec4t1
Second external disk drivec4t2
Third external disk drivec4t3

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.

Text Box(504x57)

To use the format utility, refer to the following sections of this manual:
Formatting a Diskpage 20
Partitioning a Diskpage 23
Labeling a Diskpage 26
Creating a File Systempage 27
Mounting a File Systempage 28

· 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.

  1. Become superuser.

  2. Access the format utility.


  # format  

  1. 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 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.
If you already know that the disk drive you are adding has a SCSI interface, skip to Step 9.
  1. Type defect at the format> prompt.

    The Defect menu entries that are displayed depend on the type of disk drive that you are formatting. The system displays information similar to the following:


  format> defect  
  
  DEFECT MENU:  
  
     primary - extract manufacturer's defect list  
     print   - display working list  
     dump    - dump working list to file  
     commit  - set current list = working list  
     quit  
  
  defect>  

  1. Read the Defect menu.

    If your disk drive has a SCSI interface, the commit option is not displayed. If this is the case, skip to Step 8.

  2. At the defect> prompt, type:


  defect> primary  
  
  Extracting manufacturer's defect list ... Extraction complete.  
  Current Defect List updated, total of 20 defects.  

  1. Type commit and confirm your choice by typing y.


  defect> commit  
  Ready to update Current Defect List, continue? y  
  Current Defect List updated, total of 20 defects.  
  Disk must be reformatted for changes to take effect.  

  1. To leave the Defect menu, type:


  defect> quit  

  1. 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, Volume II.
  1. 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>  

  1. 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.

  1. 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]?  

  1. Type y if you want to change the size of any partitions. The following message is displayed:


  Free Hog partition[6]?  

  1. 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.
  1. 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 Caution - Do not change partition 2. Reducing the size of partition 2 decreases available disk space.

  1. Type y to confirm.

    The following message is displayed:


  Enter table name (remember quotes):  

  1. Assign a name to the newly created table.

  2. 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.

  1. Type label at the partition> or format> prompt. The following menu is displayed:


  Ready to label disk?  

  1. Type y and press Return.

  2. Type q.

  3. 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.

  1. Become superuser.

  2. Type:


  # newfs /dev/rdsk/cxtxdxsx  


CAUTION 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.

  1. Press Return.

    The operating system asks for confirmation.


  newfs: construct a new file system /dev/rdsk/cxtxdxsx (y/n)?  

  1. 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:

Text Box(504x78)

  1. 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.

  1. 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.