JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
System Administration Guide: Devices and File Systems     Oracle Solaris 10 8/11 Information Library
search filter icon
search icon

Document Information

About This Book

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)

8.  Using USB Devices (Tasks)

9.  Using InfiniBand Devices (Overview/Tasks)

10.  Managing Disks (Overview)

11.  Administering Disks (Tasks)

12.  SPARC: Setting Up Disks (Tasks)

SPARC: Setting Up Disks for UFS File Systems (Task Map)

SPARC: Setting Up Disks for UFS File Systems

SPARC: How to Set Up a Disk for a UFS Root File System

SPARC: How to Set Up a Disk for a UFS File System

SPARC: How to Create Disk Slices for a UFS File System

SPARC: How to Create a UFS File System

SPARC: How to Install Boot Blocks for a UFS Root File System

SPARC: Setting up Disks for ZFS File Systems (Task Map)

SPARC: Setting Up Disks for ZFS File Systems

SPARC: How to Set Up a Disk for a ZFS Root File System

SPARC: Creating a Disk Slice for a ZFS Root File System

SPARC: How to Create a Disk Slice for a ZFS Root File System

SPARC: How to Install Boot Blocks for a ZFS Root File System

SPARC: How to Set Up a Disk for a ZFS File System

13.  x86: Setting Up Disks (Tasks)

14.  Configuring Oracle Solaris iSCSI Targets and Initiators (Tasks)

15.  The format Utility (Reference)

16.  Managing File Systems (Overview)

17.  Creating and Mounting File Systems (Tasks)

18.  Using The CacheFS File System (Tasks)

19.  Configuring Additional Swap Space (Tasks)

20.  Checking UFS File System Consistency (Tasks)

21.  UFS File System (Reference)

22.  Backing Up and Restoring UFS File Systems (Overview)

23.  Backing Up UFS Files and File Systems (Tasks)

24.  Using UFS Snapshots (Tasks)

25.  Restoring UFS Files and File Systems (Tasks)

26.  UFS Backup and Restore Commands (Reference)

27.  Copying Files and File Systems (Tasks)

28.  Managing Tape Drives (Tasks)

Index

SPARC: Setting Up Disks for UFS File Systems (Task Map)

The following task map identifies the procedures for setting up a disk for a UFS root file system or a disk for a UFS file system on a SPARC based system.

Task
Description
For Instructions
1. Connect the disk.
Disk for a UFS root file system

Connect the new disk and boot from a local or remote Oracle Solaris DVD.

Disk for a UFS file system

Connect the disk.

2. Create slices and label the disk for UFS file systems.
Create disk slices and label the disk.
3. Create UFS file systems.
Create UFS file systems on the disk slices by using the newfs command. You must re-create the root (/) or /usr file system, or both.
4. Restore UFS file systems.
Restore the UFS root (/) or /usr file system, or both. If necessary, restore file systems on other disks.
5. Install boot blocks for a UFS root file system.
Install the boot blocks on the root (/) file system so that the system can boot.

SPARC: Setting Up Disks for UFS File Systems

A disk can contain the UFS root (/) and /usr file systems, user or data file systems, or a combination of file systems. If the disk contains the UFS root (/) or /usr file systems, you have two ways to recover:

A disk that contains user or data file systems can be replaced and the file systems restored, if necessary, without having to reinstall or reboot the system.

SPARC: How to Set Up a Disk for a UFS Root File System

You can use this procedure to replace a disk that contained the UFS root or /usr file system. Refer to your hardware installation guide for information on replacing a disk.

  1. Disconnect the damaged system disk from the system, if necessary.
  2. Connect the replacement disk to the system and check the disk's physical connections.
  3. Follow the instructions in the following table, depending on whether you are booting from a local Oracle Solaris DVD or a remote Oracle Solaris DVD from the network.
    Boot Type
    Action
    From an Oracle Solaris DVD in a local drive
    1. Make sure the Oracle Solaris 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.

After You Set Up a Disk for a UFS Root File System ...

Create slices for the UFS root and /usr file systems and a disk label on the disk. Go to SPARC: How to Create Disk Slices for a UFS File System.

SPARC: How to Set Up a Disk for a UFS File System

If you are adding a disk with an EFI disk label, see EFI Disk Label for more information.

Generally, most modern bus types support hot-plugging. This means you can insert a disk in an empty slot and the system recognizes it. For more information about hot-plugging devices, see Chapter 6, Dynamically Configuring Devices (Tasks).

  1. Become superuser or assume an equivalent role.
  2. (Optional) 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.
  3. Connect the disk to the system and check the disk's physical connections.

    Refer to the disk's hardware installation guide for details.

  4. Use the format utility to confirm that the new disk is recognized.
After You Connect a Disk for a UFS File System ...

After the disk is connected, create slices and a disk label on the disk. Go to SPARC: How to Create Disk Slices for a UFS File System.

SPARC: How to Create Disk Slices for a UFS File System

  1. Become superuser or assume an equivalent role.
  2. Invoke the format utility.
    # format

    A numbered list of available disks is displayed.

  3. Select the number of the disk that you want to repartition.
    Specify disk (enter its number): disk-number

    disk-number is the number of the disk that you want to repartition.

  4. Select the partition menu.
    format> partition
  5. Display the current partition (slice) table.
    partition> print
  6. Start the modification process.
    partition> modify
  7. 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.

  8. 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
  9. 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) and swap (slice 1)

    • /usr (slice 6)

    After you identify the slices, the new partition table is displayed.

    For an example of creating disk slices, see Example 12-1.

  10. Make the displayed partition table the current partition table by answering y when prompted.
    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.

  11. Name the partition table.
    Enter table name (remember quotes): "partition-name"

    where partition-name is the name for the new partition table.

  12. Label the disk with the new partition table after you have finished allocating slices on the new disk.
    Ready to label disk, continue? yes
  13. Quit the partition menu.
    partition> q
  14. Verify the disk label.
    format> verify
  15. Exit the format utility.
    format> q

Example 12-1 SPARC: Creating Disk Slices for a UFS Root File System

The following example shows the format utility being used to divide a 18-GB 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
AVAILABLE DISK SELECTIONS:
       0. /dev/rdsk/c1t0d0s0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>
          /sbus@2,0/QLGC,isp@2,10000/sd@0,0
       1. /dev/rdsk/c1t1d0s0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>
          /sbus@2,0/QLGC,isp@2,10000/sd@1,0
       2. /dev/rdsk/c1t8d0s0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>
          /sbus@2,0/QLGC,isp@2,10000/sd@8,0
       3. /dev/rdsk/c1t9d0s0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>
          /sbus@2,0/QLGC,isp@2,10000/sd@9,0
Specify disk (enter its number): 0
selecting c1t0d0
[disk formatted]
format> partition
partition> print
partition> modify
Select partitioning base:
    0. Current partition table (original)
    1. All Free Hog
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 - 7505       16.86GB    (7506/0/0) 35368272
  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

Choose base (enter number) [0]? 1
table based on above table[yes]? yes
Free Hog partition[6]? 6
Enter size of partition '0' [0b, 0c, 0.00mb, 0.00gb]: 4gb
Enter size of partition '1' [0b, 0c, 0.00mb, 0.00gb]: 4gb
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 '7' [0b, 0c, 0.00mb, 0.00gb]: 
Part      Tag    Flag     Cylinders        Size            Blocks
  0       root    wm       0 - 1780        4.00GB    (1781/0/0)  8392072
  1       swap    wu    1781 - 3561        4.00GB    (1781/0/0)  8392072
  2     backup    wu       0 - 7505       16.86GB    (7506/0/0) 35368272
  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    3562 - 7505        8.86GB    (3944/0/0) 18584128
  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

Example 12-2 SPARC: Creating Disk Slices for a UFS File System

The following example shows the format utility being used to divide a 18-GB disk into one slice for the /export/home file system.

# format /dev/rdsk/c1*
AVAILABLE DISK SELECTIONS:
       0. /dev/rdsk/c1t0d0s0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>
          /sbus@2,0/QLGC,isp@2,10000/sd@0,0
       1. /dev/rdsk/c1t1d0s0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>
          /sbus@2,0/QLGC,isp@2,10000/sd@1,0
       2. /dev/rdsk/c1t8d0s0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>
          /sbus@2,0/QLGC,isp@2,10000/sd@8,0
       3. /dev/rdsk/c1t9d0s0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>
          /sbus@2,0/QLGC,isp@2,10000/sd@9,0
Specify disk (enter its number): 1
selecting c1t1d0
[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 - 7505       16.86GB    (7506/0/0) 35368272
  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 - 7505       16.86GB    (7506/0/0) 35368272
  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 - 7505       16.86GB    (7506/0/0) 35368272
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
# 

The following example shows how to use the format utility to divide a 1.15 terabyte disk with an EFI label into three slices.

# format
.
.
.
partition> modify
Select partitioning base:
        0. Current partition table (original)
        1. All Free Hog
Choose base (enter number) [0]? 1
Part      Tag    Flag     First Sector          Size          Last Sector
  0       root    wm                 0            0                0    
  1        usr    wm                 0            0                0    
  2 unassigned    wm                 0            0                0    
  3 unassigned    wm                 0            0                0    
  4 unassigned    wm                 0            0                0    
  5 unassigned    wm                 0            0                0    
  6        usr    wm                 0            0                0    
  8   reserved    wm        2576924638         8.00MB           2576941021
Do you wish to continue creating a new partition
table based on above table[yes]? y
Free Hog partition[6]? 4
Enter size of partition 0 [0b, 34e, 0mb, 0gb, 0tb]: 
Enter size of partition 1 [0b, 34e, 0mb, 0gb, 0tb]: 
Enter size of partition 2 [0b, 34e, 0mb, 0gb, 0tb]: 400gb
Enter size of partition 3 [0b, 838860834e, 0mb, 0gb, 0tb]: 400gb
Enter size of partition 5 [0b, 1677721634e, 0mb, 0gb, 0tb]: 
Enter size of partition 6 [0b, 1677721634e, 0mb, 0gb, 0tb]: 
Part      Tag    Flag     First Sector          Size          Last Sector
  0 unassigned    wm                 0            0                0    
  1 unassigned    wm                 0            0                0    
  2        usr    wm                34       400.00GB           838860833
  3        usr    wm         838860834       400.00GB           1677721633
  4        usr    wm        1677721634       428.77GB           2576924637
  5 unassigned    wm                 0            0                0    
  6 unassigned    wm                 0            0                0    
  8   reserved    wm        2576924638         8.00MB           2576941021
Ready to label disk, continue? yes

partition> q
After You Create Disk Slices and Label a Disk for UFS File Systems ...

After you create disk slices and label the disk, you can create file systems on the disk. Go to SPARC: How to Create a UFS File System.

SPARC: How to Create a UFS File System

  1. Become superuser or assume an equivalent role.
  2. Create a file system for each slice.
    # newfs /dev/rdsk/cwtxdysz

    where /dev/rdsk/cwtxdysx is the raw device for the file system to be created.

    For more information about the newfs command, see Chapter 17, Creating and Mounting File Systems (Tasks) or newfs(1M).

  3. Verify the new file system by mounting it.
    # mount /dev/dsk/cwtxdysz /mnt
    # ls 
    lost+found
After Creating a UFS File System ...

SPARC: How to Install Boot Blocks for a UFS Root File System

  1. Become superuser or assume an equivalent role.
  2. Install a boot block for a UFS root file system.
    # installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk
    /dev/rdsk/cwtxdys0

    For more information, see installboot(1M).

  3. Verify that the boot blocks are installed by rebooting the system to run level 3.
    # init 6

Example 12-3 SPARC: Installing a Boot Block for a UFS Root File System

The following example shows how to install the boot block on a UFS root file system.

# installboot /usr/platform/sun4u/lib/fs/ufs/bootblk
/dev/rdsk/c0t0d0s0