Chap02 Managing Local Disk Devices

Embed Size (px)

Citation preview

  • 7/30/2019 Chap02 Managing Local Disk Devices

    1/24

    1AITA\SWBU\SOLARIS\08

    Managing Local Disk Devices

  • 7/30/2019 Chap02 Managing Local Disk Devices

    2/24

    2AITA\SWBU\SOLARIS\08

    Basic Architecture of a Disk

    Physical Disk Structure

    Disk Platters

    Sector

    Track

    Cylinder

    Disk Slices (Disks are logically divided into individualpartitions known as disk slices)

  • 7/30/2019 Chap02 Managing Local Disk Devices

    3/24

    3AITA\SWBU\SOLARIS\08

    Disk slices and the different file systems they could hold

    0 / (The root directorys system files)

    1 swap (Swap area)

    2 (Entire disk)

    5 /opt (Optional Software)

    6 /usr (System executables and programs)

    7 /export/home (User files and directories)

  • 7/30/2019 Chap02 Managing Local Disk Devices

    4/24

    4AITA\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

  • 7/30/2019 Chap02 Managing Local Disk Devices

    5/24

    5AITA\SWBU\SOLARIS\08

    Disk number (d#)

    Also known as the logical unit number (LUN). This numberreflects the number of disks at the target number

    Slice number (s#)

    A slice number ranging from 0 to 7

  • 7/30/2019 Chap02 Managing Local Disk Devices

    6/24

    6AITA\SWBU\SOLARIS\08

    Device Naming Conventions

    Logical Device Names

    Physical Device Names Instance Names

  • 7/30/2019 Chap02 Managing Local Disk Devices

    7/24

    7AITA\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

  • 7/30/2019 Chap02 Managing Local Disk Devices

    8/24

    8AITA\SWBU\SOLARIS\08

    Physical Device Names

    Physical device names uniquely identify the physical location ofthe 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

  • 7/30/2019 Chap02 Managing Local Disk Devices

    9/24

    9AITA\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 devicename.

    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

  • 7/30/2019 Chap02 Managing Local Disk Devices

    10/24

    10AITA\SWBU\SOLARIS\08

    Listing a Systems Devices

    /etc/path_to_inst File

    For each device, the system records its physical name andinstance name in this file.

    This file is maintained by the kernel and is not advisable for

    the system administrator to change this file

  • 7/30/2019 Chap02 Managing Local Disk Devices

    11/24

    11AITA\SWBU\SOLARIS\08

    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

  • 7/30/2019 Chap02 Managing Local Disk Devices

    12/24

    12AITA\SWBU\SOLARIS\08

    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.

  • 7/30/2019 Chap02 Managing Local Disk Devices

    13/24

    13AITA\SWBU\SOLARIS\08

    Reconfiguring Devices

  • 7/30/2019 Chap02 Managing Local Disk Devices

    14/24

    14AITA\SWBU\SOLARIS\08

    Performing a Reconfiguration Boot

    1. Create the /reconfigure file using #touch /reconfigure

    2. Shutdown the system using #init 5

    3. Turn off the power to all external devices

    4. Install the peripheral device

    5. Turn on the power to all external devices

    6. Turn on the power to the system

    7. Verify that the peripheral device has been added by issuing

    either prtconf or format command

  • 7/30/2019 Chap02 Managing Local Disk Devices

    15/24

    15AITA\SWBU\SOLARIS\08

    Using the devfsadm command

    Syntax: #devfsadm -c device_class

    #devfsadm -i driver_name

  • 7/30/2019 Chap02 Managing Local Disk Devices

    16/24

    16AITA\SWBU\SOLARIS\08

    Usage #devfsadm -c disk

    #devfsadm -c disk -c tape -c audio

    #devfsadm -i dad #devfsadm -i sd

    #devfsadm -i st

  • 7/30/2019 Chap02 Managing Local Disk Devices

    17/24

    17AITA\SWBU\SOLARIS\08

    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

  • 7/30/2019 Chap02 Managing Local Disk Devices

    18/24

    18AITA\SWBU\SOLARIS\08

    Partitioning the Hard Disk

  • 7/30/2019 Chap02 Managing Local Disk Devices

    19/24

    19AITA\SWBU\SOLARIS\08

    Fundamentals of Disk Partitioning

    1. Identify the correct disk2. Plan the layout of the disk

    3. Use of the format utility to divide the disk into slices

    4. Label the disk with new slice information

  • 7/30/2019 Chap02 Managing Local Disk Devices

    20/24

    20AITA\SWBU\SOLARIS\08

    format utility

    Only the root user can use the format utility. If a regular

    users run the format utility error message appears.

  • 7/30/2019 Chap02 Managing Local Disk Devices

    21/24

    21AITA\SWBU\SOLARIS\08

    Disk Partition Tables

    As a root user, when you use the format utility and select adisk to partition, a copy of the disks partition table is read fromthe label on the disk into memory and is displayed as the currentdisk partition table.

    The format utility also works with a file called /etc/format.datwhich is read when the format utility is invoked.

    The /etc/format.dat file is a table of available disk types and aset of predefined partition tables that you can use to partition a

    disk quickly.

  • 7/30/2019 Chap02 Managing Local Disk Devices

    22/24

    22AITA\SWBU\SOLARIS\08

    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.

  • 7/30/2019 Chap02 Managing Local Disk Devices

    23/24

    23AITA\SWBU\SOLARIS\08

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

  • 7/30/2019 Chap02 Managing Local Disk Devices

    24/24

    24AITA\SWBU\SOLARIS\08

    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