Contenues dans
Trouver plus de documentation
Ressources d'assistance comprises
|
Chapter 33 SPARC: Adding a Disk (Tasks)
This chapter describes how to add a disk to a SPARC based
system.
For information on the procedures associated with adding a disk to a
SPARC based system, see SPARC: Adding a System Disk or a Secondary Disk (Task Map).
For overview information about disk management, see Chapter 31, Managing Disks (Overview).
For step-by-step instructions on adding a disk to an IA based system, see Chapter 34, x86: Adding a Disk (Tasks).
SPARC: Adding a System Disk or a Secondary Disk (Task Map)
The following task map identifies the procedures for adding a disk to
a SPARC based system.
SPARC: Adding a System Disk or a Secondary Disk
A system disk contains the root (/) or /usr file systems, or both. If the disk that contains either of
these file systems 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 does not contain the root (/)
and /usr file systems. A secondary disk 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.
SPARC: How to Connect a System Disk and Boot
This procedure
assumes that the system is shut down.
-
Disconnect the damaged system disk from the system.
-
Make sure that 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.
-
Connect the replacement system disk to the system and check the physical
connections.
Refer to the disk's hardware installation guide for installation details.
-
Follow the instructions in the following table, depending on whether
you are booting from a local Solaris CD or DVD or a remote Solaris CD or DVD
from the network.
|
Boot Type
|
Action
|
|
From a Solaris CD or DVD in a local drive
|
1. Make sure the CD or DVD is in the drive.
2. Boot
from the media to single-user mode:
ok boot cdrom -s
|
|
From the network
|
Boot from the network to single-user mode:
ok boot net -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 SPARC: How to Create Disk Slices and Label a Disk.
SPARC: How to Connect a Secondary Disk and Boot
-
Become superuser or assume an equivalent role.
-
If the disk type is unsupported by the Solaris software, add the device
driver for the disk by following the instructions included with the hardware.
For information on creating a format.dat entry
for the disk, see How to Create a format.dat Entry, if necessary.
-
Create the /reconfigure file that will be read
when the system is booted.
The /reconfigure file causes the SunOS software
to check for the presence of any newly installed peripheral devices when you
power on or boot your system later.
-
Shut down the system.
|
-i0
|
Changes to run level 0, the power-down
state.
|
|
-gn
|
Notifies
logged-in users that they have n seconds before
the system begins to shut down.
|
|
-y
|
Specifies that the command should run
without user intervention.
|
The ok prompt is displayed after the operating environment
is shut down.
-
Turn off the power to the system and all external peripheral devices.
-
Make sure that 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.
-
Connect the disk to the system and check the physical connections.
Refer to the disk's hardware installation guide for installation details.
-
Turn on the power to all external peripherals.
-
Turn on the power to the system.
The system boots and displays 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 SPARC: How to Create Disk Slices and Label a Disk.
SPARC: How to Create Disk Slices and Label a Disk
-
Become superuser or assume an equivalent role.
-
Invoke the format utility.
A list of available disks is displayed. For more information, see format(1M).
-
Type the number of the disk that you want to repartition from the list
displayed on your screen.
Specify disk (enter its number): disk-number
|
disk-number is the number of the disk that
you want to repartition.
-
Select the partition menu.
-
Display the current partition (slice) table.
-
Start the modification process.
-
Set the disk to all free hog.
Choose base (enter number) [0]? 1
|
For more information about the free hog slice, see Using the Free Hog Slice.
-
Create a new partition table by answering y when
prompted to continue.
Do you wish to continue creating a new partition table based on
above table[yes]? y
|
-
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:
After you identify the slices, the new partition table is displayed.
For an example of creating disk slices, see SPARC: Example—Creating Disk Slices and Labeling a System Disk.
-
Make the displayed partition table the current partition table by answering y when asked.
Okay to make this the current partition table[yes]? y
|
If you do not want the current partition table and you want to change
it, answer no and go to Step 6.
-
Name the partition table.
Enter table name (remember quotes): "partition-name"
|
partition-name is the name for the new partition
table.
-
Label the disk with the new partition table after you have finished
allocating slices on the new disk.
Ready to label disk, continue? yes
|
-
Quit the partition menu.
-
Verify the disk label.
-
Exit the format menu.
SPARC: Example—Creating Disk Slices and Labeling a System Disk
The following example shows the format utility being
used to divide a 1-Gbyte disk into three slices: one slice for the root (/) file system, one slice for the swap area, and one slice for
the /usr file system.
# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t1d0 <SUN1.05 cyl 2036 alt 2 hd 14 sec 72>
/iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@1,0
1. c0t3d0 <SUN1.05 cyl 2036 alt 2 hd 14 sec 72>
/iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@3,0
Specify disk (enter its number): 0
selecting c0t1d0
[disk formatted]
format> partition
partition> print
partition> modify
Select partitioning base:
0. Current partition table (original)
1. All Free Hog
Choose base (enter number) [0]? 1
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 - 2035 1002.09MB (2036/0/0) 2052288
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
Do you wish to continue creating a new partition
table based on above table[yes]? yes
Free Hog partition[6]? 6
Enter size of partition `0' [0b, 0c, 0.00mb]: 200mb
Enter size of partition `1' [0b, 0c, 0.00mb]: 200mb
Enter size of partition `3' [0b, 0c, 0.00mb]:
Enter size of partition `4' [0b, 0c, 0.00mb]:
Enter size of partition `6' [0b, 0c, 0.00mb]:
Enter size of partition `7' [0b, 0c, 0.00mb]:
Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 406 200.32MB (407/0/0) 410256
1 swap wu 407 - 813 200.32MB (407/0/0) 410256
2 backup wu 0 - 2035 1002.09MB (2036/0/0) 2052288
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 814 - 2035 601.45MB (1222/0/0) 1231776
7 unassigned wm 0 0 (0/0/0) 0
Okay to make this the current partition table[yes]? yes
Enter table name (remember quotes): "disk0"
Ready to label disk, continue? yes
partition> quit
format> verify
format> quit
|
SPARC: Example—Creating Disk Slices and Labeling a Secondary Disk
The following example shows the format utility being
used to divide a 1-Gbyte disk into one slice for the /export/home file system.
# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t1d0 <SUN1.05 cyl 2036 alt 2 hd 14 sec 72>
/iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@1,0
1. c0t3d0 <SUN1.05 cyl 2036 alt 2 hd 14 sec 72>
/iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@3,0
Specify disk (enter its number): 0
selecting c0t1d0
[disk formatted]
format> partition
partition> print
partition> modify
Select partitioning base:
0. Current partition table (original)
1. All Free Hog
Choose base (enter number) [0]? 1
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 - 2035 1002.09MB (2036/0/0) 2052288
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
Do you wish to continue creating a new partition
table based on above table[yes]? y
Free Hog partition[6]? 7
Enter size of partition '0' [0b, 0c, 0.00mb, 0.00gb]:
Enter size of partition '1' [0b, 0c, 0.00mb, 0.00gb]:
Enter size of partition '3' [0b, 0c, 0.00mb, 0.00gb]:
Enter size of partition '4' [0b, 0c, 0.00mb, 0.00gb]:
Enter size of partition '5' [0b, 0c, 0.00mb, 0.00gb]:
Enter size of partition '6' [0b, 0c, 0.00mb, 0.00gb]:
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 - 2035 1002.09MB (2036/0/0) 2052288
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 - 2035 1002.09MB (2036/0/0) 2052288
Okay to make this the current partition table[yes]? yes
Enter table name (remember quotes): "home"
Ready to label disk, continue? y
partition> q
format> verify
format> q
#
|
Where to Go From Here
After you create disk slices and label the disk, you can create file
systems on the disk. Go to SPARC: How to Create File Systems.
SPARC: How to Create File Systems
-
Become superuser or assume an equivalent role.
-
Create a file system for each slice.
# newfs /dev/rdsk/cwtxdysz
|
/dev/rdsk/cwtxdysx
is the raw device for the file system to be created.
For more information about the newfs command, see Chapter 38, Creating File Systems (Tasks) or newfs(1M).
-
Verify the new file system by mounting.
# mount /dev/dsk/cwtxdysz /mnt
# lslost+found
|
SPARC: Where to Go From Here
SPARC: How to Install a Boot Block on a System Disk
-
Become superuser or assume an equivalent role.
-
Install a boot block on the system disk.
# installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/cwtxdys0
|
|
/usr/platform/`uname
-i`/lib/fs /ufs/bootblk
|
Is the boot block code.
|
|
/dev/rdsk/cwtxdys0
|
Is the raw device of the root (/)
file system.
|
For more information, see installboot(1M).
-
Verify that the boot blocks are installed by rebooting the system to
run level 3.
SPARC: Example—Installing a Boot Block on a System Disk
The following example shows how to install the boot block on a SPARCstation
10.
# installboot /usr/platform/sun4m/lib/fs/ufs/bootblk /dev/rdsk/c0t0d0s0
|
|