System Administration Guide, Volume I
  Search only this book
Download this book in PDF

x86: Adding a Disk

30

This chapter provides the procedures for adding a disk on an x86 system. This is a list of the step-by-step instructions in this chapter.
x86: How to Connect a System Disk and Bootpage 481
x86: How to Connect a Secondary Disk and Bootpage 483
x86: How to Create a Solaris fdisk Partitionpage 485
x86: How to Create Disk Slices and Label a Diskpage 487
x86: How to Create File Systemspage 490
x86: How to Restore File Systemspage 490
x86: How to Install a Boot Block on a System Diskpage 492
For overview information about disk management, see Chapter 27, "Overview of Disk Management."

About System and Secondary Disks

A system disk contains the root (/) or /usr file systems, or both. If the disk containing either of these file system becomes damaged, you have two ways to recover:
  • You can reinstall the entire Solaris environment
  • Or, you can replace the system disk and restore your file systems from a backup medium.
A secondary disk doesn't contain the root (/) and /usr file systems. It usually contains space for user files. You can add a secondary disk to a system for more disk space or you can replace a damaged secondary disk. If you replace a secondary disk on a system, you can restore the old disk's data on the new disk.

Adding a System or Secondary Disk

Table 30-1 x86: Adding a System or Secondary Disk

Imported image(504x346)

x86: Guidelines for Creating an fdisk Partition

Follow these guidelines when setting up the fdisk partition.
  • The disk can be divided into a maximum of four fdisk partitions. One of these partitions must be a Solaris partition.
  • The Solaris partition must be made the active partition on the disk. The active partition is the one whose operating system will be booted by default at system start-up.
  • Solaris fdisk partitions must begin on cylinder boundaries.
  • Solaris fdisk partitions must begin at cylinder 1, not cylinder 0, on the first disk because additional boot information, including the master boot record, is written in sector 0.
  • The Solaris fdisk partition can be the entire disk or you may want to make it smaller to allow room for a DOS partition. You can also make a new fdisk partition on a disk without disturbing existing partitions (if there is enough room to create a new one).

For x86 systems - Solaris slices are sometimes called partitions. This user guide uses the term slice, but some Solaris documentation and programs may refer to a slice as a partition. To avoid confusion, Solaris 2.x documentation tries to distinguish between fdisk partitions (which are supported only on Solaris for x86) and the divisions within the Solaris fdisk partition, which may be called slices or partitions.

· x86: How to Connect a System Disk and Boot

This procedure assumes that the system is down.
  1. Disconnect the damaged system disk from the system.

  2. Make sure the disk you are adding has a different target number than the other devices on the system.

    You will often find a small switch located at the back of the disk for this purpose.

  3. Connect the replacement system disk to the system and check the physical connections.

    Refer to the disk's hardware installation guide for installation details. Also, refer to the x86 Device Configuration Guide about hardware configuration requirements specific to the disk.

  4. Follow steps a-e if you are booting from a local or remote Solaris 2.x CD.

    If you are booting from the network, skip step a.

    a. Insert the Solaris 2.x installation CD into the CD-ROM drive. b. Insert the Solaris boot diskette into the primary diskette drive (DOS drive A).

    c. Press any key to reboot the system if the system displays the type any key to reboot prompt. Or, use the reset button to restart the system if the system is shut down.

    The Multiple Device Boot Subsystem menu is displayed after a few minutes.

    d. Select the CD-ROM drive or net(work) as the boot device from the Multiple Device Boot menu.

    The Secondary Boot Subsystem menu is displayed.

    e. Boot the system in single-user mode.


  Select the type of installation: b -s  

After a few minutes, the root prompt (#) is displayed.

Where to Go From Here

After you boot the system, you can create slices and a disk label on the disk. Go to "x86: How to Create Disk Slices and Label a Disk" on page 487.

· x86: How to Connect a Secondary Disk and Boot

  1. Become root.

  2. If the disk is unsupported by the Solaris software, add the device driver for the disk by following the instructions included with the hardware.

  3. Create the /reconfigure file that will be read when the system is booted.


  # touch /reconfigure  

The /reconfigure file will cause the SunOS software to check for the presence of any newly installed peripheral devices when you power on or boot your system later.
  1. Shut down the system.


  # shutdown -i0 -g30 -y  

In this command,
-i0Brings the system down to init state 0 (zero), the power-down state.
-g30Notifies logged-in users that they have n seconds before the system begins to shut down.
-ySpecifies the command should run without user intervention.
The Type any key to reboot prompt is displayed.
  1. Turn off power to the system and all external peripheral devices.

  2. Make sure the disk you are adding has a different target number than the other devices on the system.

    You will often find a small switch located at the back of the disk for this purpose.

  1. Connect the disk to the system and check the physical connections.

    Refer to the disk's hardware installation guide for installation details. Also, refer to the x86 Device Configuration Guide about hardware configuration requirements specific to the disk.

  2. Turn on the power to all external peripherals.

  3. Turn on the power to the system.

    The system will boot and display the login prompt.

Where to Go From Here

After you boot the system, you can create slices and a disk label on the disk. Go to "x86: How to Create Disk Slices and Label a Disk" on page 487.

· x86: How to Create a Solaris fdisk Partition

  1. Make sure you have read "x86: Guidelines for Creating an fdisk Partition" on page 480.

  2. Become root.

  3. Start the format utility.


  # format  

  1. Enter the number of the disk on which to create a Solaris fdisk partition from the list displayed on your screen.


  Specify disk (enter its number): disk-number  

At this prompt,
disk-number...Is the number of the disk on which to create a Solaris fdisk partition.
  1. Go into the fdisk menu.


  format> fdisk  

  1. Select the option 1, Create a partition.


  Selection: 1  

  1. Create a Solaris fdisk partition by selecting 1(=Solaris).


  Indicate the type of partition you want to create  
    (1=SOLARIS, 2=UNIX, 3=PCIXOS, 4=Other, 8=DOSBIG)  
    (5=DOS12, 6=DOS16, 7=DOSEXT, 0=Exit) ? 1  

  1. Activate a Solaris fdisk partition spanning the entire disk by specifying 100 at the prompt.


  Indicate the percentage of the disk you want this partition  
  to use (or enter "c" to specify in cylinders). 100  

  1. Activate a Solaris fdisk partition spanning the entire disk by specifying y at the prompt.


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

The Selection menu displays after the fdisk partition is created.
  1. Update the disk configuration and exit the fdisk menu from the selection menu.


  Selection: 4  

  1. Quit the format menu.


  format> quit  

Where to Go From Here

After you create a Solaris fdisk partition on the disk, you can create slices on the disk. Go to "x86: How to Create Disk Slices and Label a Disk" on page 487.

· x86: How to Create Disk Slices and Label a Disk

  1. Become root.

  2. Start the format utility.


  # format  

  1. Enter the number of the disk that you want to repartition from the list displayed on your screen.


  Specify disk (enter its number): disk-number  

At this prompt,
disk-number...Is the number of the disk that you want to repartition.
  1. Go into the partition menu (which lets you set up the slices).


  format> partition  

  1. Display the current partition (slice) table.


  partition> print  

  1. Start the modification process.


  partition> modify  

  1. Set the disk to all free hog.


  Choose base (enter number) [0]? 1  

See "Using the Free Hog Slice" on page 428 for more information about the free hog slice.
  1. Create a new partition table by answering yes when prompted to continue.


  Do you wish to continue creating a new partition  
  table based on above table[yes]? yes  

  1. Identify the free hog partition (slice) and the sizes of the slices when prompted.

    When adding a system disk, you must set up slices for:

  • root (slice 0), swap (slice 1) and/or
  • /usr (slice 6)
After you identify the slices, the new partition table is displayed.
  1. Make the displayed partition table the current partition table by answering yes when asked.


  Okay to make this the current partition table[yes]? yes  

If you don't want the current partition table and you want to change it, answer no and go to Step 6.
  1. Name the partition table.


  Enter table name (remember quotes): "partition-name"  

At this prompt,
partition-name..Is the name for the new partition table.
  1. Label the disk with the new partition table when you have finished allocating slices on the new disk.


  Ready to label disk, continue? yes  

  1. Quit the partition menu.


  partition> quit  

  1. Quit the format menu.


  format> quit  

Where to Go From Here

After you create disk slices and label the disk, you can create file systems on the disk. Go to "x86: How to Create File Systems" on page 490.

· x86: How to Create File Systems

  1. Become root.

  2. Create a file system for each slice with the newfs command.


  # newfs /dev/rdsk/cntndnsn  

In this command,
/dev/rdsk/cntndnsn Is the raw device for the file system to be created.
See Chapter 34, "Mounting and Unmounting File Systems," for more information about the newfs command.

Where to Go From Here

If You Are Adding A ...Then ...
System DiskYou need to restore the root (/) and /usr file systems on the disk. Go to Chapter 43, "Restoring Files and File Systems."
Secondary DiskYou may need to restore file systems on the new disk. Go to Chapter 43, "Restoring Files and File Systems."

If you are not restoring file systems on the new disk, you are finished adding a secondary disk. See Chapter 34, "Mounting and Unmounting File Systems" for information on making the file systems available to users.

· x86: How to Restore File Systems

To restore the root (/) and /usr file systems on a system disk or to restore other file systems on a secondary disk, see Chapter 43, "Restoring Files and File Systems."

Where to Go From Here

If you are adding a system disk, you must install a boot block on the disk. Go to "x86: How to Install a Boot Block on a System Disk" on page 492.

· x86: How to Install a Boot Block on a System Disk

  1. Become root.

  2. Type the following command:


  # /usr/sbin/installboot /usr/platform/'uname -i'/lib/fs/ufs/pboot  
  /usr/platform/'uname -i'/lib/fs/ufs/bootblk /dev/rdsk/cntndns2  

In this command:
/usr/platform/'uname -i'/ Is the partition boot file. lib/fs/ufs/pboot
/usr/platform/'uname -i'/ Is the boot block code. lib/fs/ufs/bootblk
/dev/rdsk/cntndns2.....Is the raw device name that represents the whole disk.
  1. Reboot the system to multi-user mode.

Example--Installing a Boot Block on a System Disk


  # /usr/sbin/installboot /usr/platform/'uname -i'/lib/fs/ufs/pboot /usr/platform/'uname -i'/  
  lib/fs/ufs/bootblk /dev/rdsk/cntndns2  

Verification--Installing a Boot Block on a System Disk

If the system boots to multi-user mode, the boot block has been installed correctly.