Obsolete:Toolserver/Manage individual disks under Solaris

From Wikitech

Naming

Disks under Solaris are named:

ccontrollerttargetdlun (e.g. c0t0d0)
for a SCSI/SAS/FC disk
ccontrollerddisk (e.g. c0d0)
for an IDE disk

A slice is sslice, e.g. c0t0d0s0. Slice s2 represents the entire disk (only with Sun labels, not EFI). This is called the backup slice.

Disk block devices are /dev/dsk/name, and raw devices are /dev/rdsk/name.

Rescan SCSI bus

If you add or remove disks, you need to rescan the SCSI bus by running devfsadm as root.

Formatting a new disk

Before a disk can be labelled (sliced), it must be formatted and an fdisk partition added. Run format:

# format
Searching for disks...done

AVAILABLE DISK SELECTIONS:
       0. c0t0d0 <DEFAULT cyl 51938 alt 2 hd 255 sec 63>
          /pci@0,0/pci1022,7450@a/pci17c2,20@4/sd@0,0
       1. c2t0d0 <IFT-A12U-G2421-342N-372.36GB>
          /pci@1d,0/pci1022,7450@4/pci1000,1010@1,1/sd@0,0
Specify disk (enter its number):

Type the number of the disk you want. At the format> prompt, type 'fdisk'. Accept the default proposal of creating a SOLARIS2 partition on 100% of the disk. The disk is now formatted for Solaris.

Slicing a disk

Slices are what Solaris called partitions. These are also configured from format; type 'part' at the prompt. At the partition> prompt, type 'print' to see the current layout. Type a slice number to change that slice. When done, type 'label', then 'quit'.

Or, you can slice a disk based on an identical existing disk:

 prtvtoc -s /dev/rdsk/old-device | fmthard /dev/rdsk/new-device