Vous êtes sur la page 1sur 24

Managing Local Disk Devices

AITA\SWBU\SOLARIS\08

Basic Architecture of a Disk


Physical Disk Structure Disk Platters Sector Track Cylinder Disk Slices (Disks are logically divided into individual partitions known as disk slices)

AITA\SWBU\SOLARIS\08

Disk slices and the different file systems they could hold
0 1 2 5 6 / swap /opt /usr (The root directorys system files) (Swap area) (Entire disk) (Optional Software) (System executables and programs) (User files and directories)

/export/home

AITA\SWBU\SOLARIS\08

Disk Slice Naming Convention


An 8 character string typically represents the full name of a slice (c#t#d#s#) Controller number (c#) Identifies the host bus adapter (HBA), which controls communications between the system and disk unit Target number (t#) Corresponding to a unique hardware address that is assigned to each disk, tape or CD-ROM

AITA\SWBU\SOLARIS\08

Disk number (d#) Also known as the logical unit number (LUN). This number reflects the number of disks at the target number Slice number (s#) A slice number ranging from 0 to 7

AITA\SWBU\SOLARIS\08

Device Naming Conventions


Logical Device Names Physical Device Names Instance Names

AITA\SWBU\SOLARIS\08

Logical Device Names


Logical disk device names are symbolic links to the physical device names kept in the /devices directory. All logical device names are kept in the /dev directory Example: c0t0d0s0

AITA\SWBU\SOLARIS\08

Physical Device Names


Physical device names uniquely identify the physical location of the hardware devices on the system and are maintained in the directory A physical device name contains the hardware information, represented as a series of node names, separated by slashes, that indicate the path to the device. Example: /pci@1f,0/pci@1,1/ide@3/dad@0,0:a

AITA\SWBU\SOLARIS\08

Instance Names
Instance names are abbreviated names assigned by the kernel for each device on the system. An instance name is a shortened name for the physical device name. Example sdn - where sd is the disk name and n is the number, such as sd0 for the first SCSI disk device dadn - where dad is the diskname and n is the number, such as dad0 for the first IDE disk device

AITA\SWBU\SOLARIS\08

Listing a Systems Devices


/etc/path_to_inst File For each device, the system records its physical name and instance name in this file. This file is maintained by the kernel and is not advisable for the system administrator to change this file

AITA\SWBU\SOLARIS\08

10

Using the prtconf command To display the systems configuration information, including the total amount of memory installed and the configuration of system peripherals, which is formatted as a device tree. Lists all possible instances of devices

AITA\SWBU\SOLARIS\08

11

Using the format command To display both logical and physical device names for all currently available disks. To view the logical and physical devices for currently available disks.

AITA\SWBU\SOLARIS\08

12

Reconfiguring Devices

AITA\SWBU\SOLARIS\08

13

Performing a Reconfiguration Boot


1. 2. 3. 4. 5. 6. 7.

Create the /reconfigure file using #touch /reconfigure Shutdown the system using #init 5 Turn off the power to all external devices Install the peripheral device Turn on the power to all external devices Turn on the power to the system Verify that the peripheral device has been added by issuing either prtconf or format command

AITA\SWBU\SOLARIS\08

14

Using the devfsadm command


Syntax: #devfsadm -c device_class #devfsadm -i driver_name

AITA\SWBU\SOLARIS\08

15

Usage #devfsadm -c disk #devfsadm -c disk -c tape -c audio #devfsadm -i dad #devfsadm -i sd #devfsadm -i st

AITA\SWBU\SOLARIS\08

16

To print the changes made by the devfsadm command to the /dev and /devices directories #devfsadm -v To invoke cleanup routines that remove unreferenced symbolic links for devices #devfsadm -C

AITA\SWBU\SOLARIS\08

17

Partitioning the Hard Disk

AITA\SWBU\SOLARIS\08

18

Fundamentals of Disk Partitioning


1. 2. 3. 4.

Identify the correct disk Plan the layout of the disk Use of the format utility to divide the disk into slices Label the disk with new slice information

AITA\SWBU\SOLARIS\08

19

format utility
Only the root user can use the format utility. If a regular users run the format utility error message appears.

AITA\SWBU\SOLARIS\08

20

Disk Partition Tables


As a root user, when you use the format utility and select a disk to partition, a copy of the disks partition table is read from the label on the disk into memory and is displayed as the current disk partition table. The format utility also works with a file called /etc/format.dat which is read when the format utility is invoked. The /etc/format.dat file is a table of available disk types and a set of predefined partition tables that you can use to partition a disk quickly.

AITA\SWBU\SOLARIS\08

21

Disk Labels
The disks label is the area set aside for storing information about the disks controller, geometry, and slices. Another term used to describe a disk label is the volume table of contents (VTOC). To label a disk means to write slice information onto the disk. If failed to label the disk after defining slices, the slice information is lost.

AITA\SWBU\SOLARIS\08

22

An important part of the disk label is the partition table, which identifies a disks slices, the slice boundaries in cylinders, and the total size of the slices.

AITA\SWBU\SOLARIS\08

23

DEMO
Partitioning a Disk Saving a Partition Table to the /etc/format.dat file Using the Customized Partition Table Viewing the Disk VTOC Reading a Disks VTOC using the prtvtoc command

AITA\SWBU\SOLARIS\08

24

Vous aimerez peut-être aussi