Skip Navigation Links | |
Exit Print View | |
System Administration Guide: Devices and File Systems Oracle Solaris 11 Express 11/10 |
1. Managing Removable Media (Overview)
2. Managing Removable Media (Tasks)
3. Accessing Removable Media (Tasks)
4. Writing CDs and DVDs (Tasks)
5. Managing Devices (Overview/Tasks)
6. Dynamically Configuring Devices (Tasks)
7. Using USB Devices (Overview)
9. Using InfiniBand Devices (Overview/Tasks)
11. Administering Disks (Tasks)
12. SPARC: Adding a Disk (Tasks)
13. x86: Adding a Disk (Tasks)
x86: Adding a System Disk or a Secondary Disk (Task Map)
x86: Adding a System Disk or a Secondary Disk
x86: How to Connect a System Disk
Changing the fdisk Partition Identifier
How to Change the Solaris fdisk Identifier
x86: How to Connect a Secondary Disk and Boot
x86: Guidelines for Creating an fdisk Partition
x86: How to Create a Solaris fdisk Partition
x86: How to Create Disk Slices and Label a Disk
14. Configuring iSCSI Storage Devices With COMSTAR
15. Configuring and Managing the Solaris Internet Storage Name Service (iSNS)
17. The format Utility (Reference)
18. Managing File Systems (Overview)
19. Creating ZFS, UFS, TMPFS, and LOFS File Systems (Tasks)
20. Mounting and Unmounting File Systems (Tasks)
21. Configuring Additional Swap Space (Tasks)
22. Copying Files and File Systems (Tasks)
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 Oracle Solaris OS.
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. 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.
This procedure assumes that the operating system is shutdown.
Typically, a small switch is located at the back of the disk for this purpose.
Refer to the disk's hardware installation guide for details.
This procedure assumes that you are booting from GRUB's Solaris failsafe boot option.
The GRUB menu is displayed after a few minutes.
The root prompt (#) is displayed.
Note - You must reboot the system when you want to exit Solaris failsafe boot mode. You cannot reboot the system to multiuser mode until the system disk is successfully added, the data is restored, and the bootblocks are installed.
You can create an fdisk partition if the disk is less than 1 terabyte size. Go to x86: How to Create a Solaris fdisk Partition.
The Solaris fdisk partition identifier on x86 systems has been changed from 130 (0x82) to 191 (0xbf). All Solaris commands, utilities, and drivers have been updated to work with either fdisk identifier. There is no change in fdisk functionality.
A new fdisk menu option enables you to switch back and forth between the new and old identifier. The fdisk identifier can be changed even when the file system that is contained in the partition is mounted.
Two type values in the fdisk menu reflect the old and new identifiers as follows:
Solaris identifies 0x82
Solaris2 identifies 0xbf
For example:
Total disk size is 39890 cylinders Cylinder size is 4032 (512 byte) blocks Cylinders Partition Status Type Start End Length % ========= ====== ============ ===== === ====== === 1 Active x86 Boot 1 6 6 0 2 Solaris2 7 39889 39883 100
SELECT ONE OF THE FOLLOWING: 1. Create a partition 2. Specify the active partition 3. Delete a partition 4. Change between Solaris and Solaris2 Partition IDs 5. Exit (update disk configuration and exit) 6. Cancel (exit without updating disk configuration) Enter Selection: 4
For example:
Total disk size is 39890 cylinders Cylinder size is 4032 (512 byte) blocks Cylinders Partition Status Type Start End Length % ========= ====== ============ ===== === ====== === 1 Active x86 Boot 1 6 6 0 2 Solaris 7 39889 39883 100 SELECT ONE OF THE FOLLOWING: 1. Create a partition 2. Specify the active partition 3. Delete a partition 4. Change between Solaris and Solaris2 Partition IDs 5. Exit (update disk configuration and exit) 6. Cancel (exit without updating disk configuration) Enter Selection: 4
If you are adding a disk with an EFI disk label on an x64 system, see EFI Disk Label for more information.
For more information about hot-plugging devices, see Chapter 6, Dynamically Configuring Devices (Tasks).
For more information, see How to Obtain Administrative Rights in System Administration Guide: Security Services.
# shutdown -i0 -gn -y
Brings the system down to run level 0, the power-down state.
Notifies logged-in users that they have n seconds before the system begins to shut down.
Specifies that the command should run without user intervention.
The Press any key to reboot prompt is displayed.
Typically, a small switch is located at the back of the disk for this purpose.
Refer to the disk's hardware installation guide for details.
The system boots and displays the login prompt.
After the system is booted, you can create an fdisk partition if the disk is less than 1 terabyte in size. Go to x86: How to Create a Solaris fdisk Partition.
Follow these guidelines when you set up one or more fdisk partitions.
The fdisk command cannot be used on disks with an EFI label that are greater than 1 terabyte in size.
The disk can be divided into a maximum of four fdisk partitions. One of partitions must be a Solaris partition.
The Solaris partition must be made the active partition on the disk. The active partition is partition whose operating system will be booted by default at system startup.
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 might 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 sufficient space is available) to create a new partition.
x86 only - Solaris slices are also called partitions. Certain interfaces might refer to a slice as a partition.
fdisk partitions are supported only on x86 based systems. To avoid confusion, Solaris documentation tries to distinguish between fdisk partitions and the entities within the Solaris fdisk partition. These entities might be called slices or partitions.
If you need information about fdisk partitions, see x86: Guidelines for Creating an fdisk Partition.
For more information, see How to Obtain Administrative Rights in System Administration Guide: Security Services.
# format
A numbered list of disks is displayed.
For more information, see format(1M).
Specify disk (enter its number): disk-number
where disk-number is the number of the disk on which you want to create a Solaris fdisk partition.
format> fdisk
The fdisk menu that is displayed depends upon whether the disk has existing fdisk partitions. Determine the next step by using the following table.
|
No fdisk table exists. The default partition for the disk is: a 100% "SOLARIS System" partition Type "y" to accept the default partition, otherwise type "n" to edit the partition table. y
Type "y" to accept the default partition, otherwise type "n" to edit the partition table. n Total disk size is 3498 cylinders Cylinder size is 1199 (512 byte) blocks Cylinders Partition Status Type Start End Length % ========= ====== ======== ===== === ====== === SELECT ONE OF THE FOLLOWING: 1. Create a partition 2. Specify the active partition 3. Delete a partition 4. Change between Solaris and Solaris2 Partition IDs 5. Exit (update disk configuration and exit) 6. Cancel (exit without updating disk configuration) Enter Selection:
Enter Selection: 1
Indicate the type of partition you want to create 1=SOLARIS2 2=UNIX 3=PCIXOS 4=Other 5=DOS12 6=DOS16 7=DOSEXT 8=DOSBIG 9=DOS16LBA A=x86 Boot B=Diagnostic C=FAT32 D=FAT32LBA E=DOSEXTLBA F=EFI 0=Exit? 1
Specify the percentage of disk to use for this partition (or type "c" to specify the size in cylinders). nn
Should this to become the active partition? If yes, it will be activated each time the computer is reset or turned on. Please type "y" or "n". y
The Enter Selection prompt is displayed after the fdisk partition is activated.
See steps 8–10 for instructions on creating an fdisk partition.
Selection: 5
format> label Ready to label disk, continue? yes format>
format> quit
Example 13-1 x86: Creating a Solaris fdisk Partition That Spans the Entire Drive
The following example uses the format utility's fdisk option to create a Solaris fdisk partition that spans the entire drive.
# format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c0d0 <DEFAULT cyl 2466 alt 2 hd 16 sec 63> /pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0 1. c0d1 <DEFAULT cyl 522 alt 2 hd 32 sec 63> /pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0 2. c1d0 <DEFAULT cyl 13102 alt 2 hd 16 sec 63> /pci@0,0/pci-ide@7,1/ide@1/cmdk@0,0 Specify disk (enter its number): 0 selecting c0d0 Controller working list found [disk formatted] format> fdisk No fdisk table exists. The default partitioning for your disk is: a 100% "SOLARIS System" partition. Type "y" to accept the default partition, otherwise type "n" to edit the partition table. y format> label Ready to label disk, continue? yes format> quit
Example 13-2 x86: Creating a Solaris fdisk Partition While Preserving an Existing fdisk Partition
The following example shows how to create a Solaris fdisk partition on a disk that has an existing DOS-BIG fdisk partition.
format> fdisk Total disk size is 3498 cylinders Cylinder size is 1199 (512 byte) blocks Cylinders Partition Status Type Start End Length % ========= ====== ============ ===== === ====== === 1 Active DOS-BIG 1 699 699 20 SELECT ONE OF THE FOLLOWING: 1. Create a partition 2. Specify the active partition 3. Delete a partition 4. Change between Solaris and Solaris2 Partition IDs 5. Exit (update disk configuration and exit) 6. Cancel (exit without updating disk configuration) Enter Selection: 1 Indicate the type of partition you want to create 1=SOLARIS2 2=UNIX 3=PCIXOS 4=Other 5=DOS12 6=DOS16 7=DOSEXT 8=DOSBIG 9=DOS16LBA A=x86 Boot B=Diagnostic C=FAT32 D=FAT32LBA E=DOSEXTLBA F=EFI 0=Exit?1 Indicate the percentage of the disk you want this partition to use (or enter "c" to specify in cylinders). 80 Should this become the active partition? If yes, it will be activated each time the computer is or turned on. Please type "y" or "n". y Total disk size is 3498 cylinders Cylinder size is 1199 (512 byte) blocks Cylinders Partition Status Type Start End Length % ========= ====== ============ ===== === ====== === 1 DOS-BIG 1 699 699 20 2 Active Solaris2 700 3497 2798 80 SELECT ONE OF THE FOLLOWING: 1. Create a partition 2. Specify the active partition 3. Delete a partition 4. Change between Solaris and Solaris2 Partition IDs 5. Exit (update disk configuration and exit) 6. Cancel (exit without updating disk configuration) Enter Selection:5 Partition 2 is now the active partition format> label Ready to label disk, continue? yes format> q
Example 13-3 x86: Creating a Solaris fdisk Partition and an Additional fdisk Partition
This following example shows how to create a Solaris fdisk partition and a DOSBIG fdisk partition.
format> fdisk No fdisk table exists. The default partitioning for your disk is: a 100% "SOLARIS System" partition. Type "y" to accept the default partition, otherwise type "n" to edit the partition table. n Total disk size is 3498 cylinders Cylinder size is 1199 (512 byte) blocks Cylinders Partition Status Type Start End Length % ========= ====== ============ ===== === ====== === SELECT ONE OF THE FOLLOWING: 1. Create a partition 2. Specify the active partition 3. Delete a partition 4. Change between Solaris and Solaris2 Partition IDs 5. Exit (update disk configuration and exit) 6. Cancel (exit without updating disk configuration) Enter Selection: 1 Indicate the type of partition you want to create 1=SOLARIS2 2=UNIX 3=PCIXOS 4=Other 5=DOS12 6=DOS16 7=DOSEXT 8=DOSBIG 9=DOS16LBA A=x86 Boot B=Diagnostic C=FAT32 D=FAT32LBA E=DOSEXTLBA F=EFI 0=Exit? 8 Specify the percentage of disk to use for this partition (or type "c" to specify the size in cylinders)20 Should this to become the Active partition? If yes, it will be activated each time the computer is reset or turned on. again. Please type "y" or "n". n Total disk size is 3498 cylinders Cylinder size is 1199 (512 byte) blocks Cylinders Partition Status Type Start End Length % ========= ====== ============ ===== === ====== === 1 DOS-BIG 1 699 699 20 SELECT ONE OF THE FOLLOWING: 1. Create a partition 2. Specify the active partition 3. Delete a partition 4. Change between Solaris and Solaris2 Partition IDs 5. Exit (update disk configuration and exit) 6. Cancel (exit without updating disk configuration) Enter Selection: 1 Indicate the type of partition you want to create 1=SOLARIS2 2=UNIX 3=PCIXOS 4=Other 5=DOS12 6=DOS16 7=DOSEXT 8=DOSBIG 9=DOS16LBA A=x86 Boot B=Diagnostic C=FAT32 D=FAT32LBA E=DOSEXTLBA F=EFI 0=Exit? 1 Indicate the percentage of the disk you want this partition to use (or enter "c" to specify in cylinders). 80 Should this become the active partition? If yes, it will be activated each time the computer is reset or turned on. Please type "y" or "n". y Total disk size is 3498 cylinders Cylinder size is 1199 (512 byte) blocks Cylinders Partition Status Type Start End Length % ========= ====== ============ ===== === ====== === 1 DOS-BIG 1 699 699 20 2 Active Solaris2 700 3497 2798 80 SELECT ONE OF THE FOLLOWING: 1. Create a partition 2. Specify the active partition 3. Delete a partition 4. Change between Solaris and Solaris2 Partition IDs 5. Exit (update disk configuration and exit) 6. Cancel (exit without updating disk configuration) Enter Selection: 5 Partition 2 is now the Active partition format> q
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.
# format
A numbered list of disks is displayed.
Specify disk (enter its number): disk-number
where disk-number is the number of the disk that you want to repartition.
format> partition
partition> print
partition> modify
Choose base (enter number) [0]? 1
For more information about the free hog slice, see Using the Free Hog Slice.
Do you wish to continue creating a new partition table based on above table[yes]? yes
When adding a system disk, you must set up slices for the following:
root (slice 0) and swap (slice 1) and/or
/usr (slice 6)
After you identify the slices, the new partition table is displayed.
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.
Enter table name (remember quotes): "partition-name"
where partition-name is the name for the new partition table.
Ready to label disk, continue? yes
partition> quit
format> verify
format> quit
After you create disk slices and label the disk, you can create file systems on the disk. Go to x86: How to Create a UFS File System.
# newfs /dev/rdsk/cwtxdysz
where /dev/rdsk/cwtxdysz is the raw device for the file system to be created.
For more information about the newfs command, see Chapter 19, Creating ZFS, UFS, TMPFS, and LOFS File Systems (Tasks) or newfs(1M).
# mount /dev/dsk/cwtxdysz /mnt # ls /mnt lost+found
System Disk – You need to restore the root (/) and /usr file systems on the disk.
After the root (/) and /usr file systems are restored, install the boot block. Go to x86: How to Install a Boot Block on a System Disk.
Secondary Disk – You might need to restore file systems on the new disk. Go to Chapter 26, Restoring UFS Files and File Systems (Tasks), in System Administration Guide: Devices and File Systems. If you are not restoring file systems on the new disk, you are finished adding a secondary disk.
For information on making the file systems available to users, see Chapter 20, Mounting and Unmounting File Systems (Tasks).
# /sbin/installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/cwtxdysz
Is the partition boot file.
Is the boot block code.
Is the raw device name that represents the location of the GRUB menu, /boot/grub/menu.lst on the Solaris root slice.
For more information, see installgrub(1M).
# init 6
Example 13-4 x86: Installing a Boot Block on a System Disk
The following example shows how to install the boot blocks on an x86 system.
# /sbin/installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c1d0s0 stage1 written to partition 0 sector 0 (abs 2016) stage2 written to to partition 0, 227 sectors starting 50 (abs 2066)