科技行者

行者学院 转型私董会 科技行者专题报道 网红大战科技行者

知识库

知识库 安全导航

至顶网软件频道基础软件理解solaris磁盘设备文件

理解solaris磁盘设备文件

  • 扫一扫
    分享文章到微信

  • 扫一扫
    关注官方公众号
    至顶头条

Breaking Down c0t2d0s7  This section breaks down the different components of a disk device file. In this example, I will be using the disk device file: c0t2d0s7.

作者:blog.chinaunix.net 来源:blog.chinaunix.net 2007年9月8日

关键字: 磁盘 系统 Sun Solaris

  • 评论
  • 分享微博
  • 分享邮件

  Under Solaris, one of the most involved UNIX devices to understand is the disk device file. Here are several key points that may help:

  In many cases, a disk device file(i.e. /dev/dsk/c0t2d0s7) refers to a particular partition (aka "slice") of a disk, and not the entire physical device. There are several device files which refer to the entire physical device, but are rarely used.

  For every disk device, there are usually two device files - the block deviceand the character ("raw") device. In general:

  block devicesare generally stored under /dev/dskand used for filesystem type access (e.g mount)

  character devicesare generally stored under /dev/rdskused for everything else (e.g. fsck, newfs, etc..)

  Discs are generally attached to a controller (or a bus) which can handle multiple devices. IDE and SCSI are both common attach methods. This tends to make disk device filenamemore complex than other types of devices.

  /etc/vfstab

  To see the difference between the block deviceand character devicefor a device, consider the following. The /etc/vfstabcontains entries for a single filesystem on a Solaris server: /dev/dsk/c0t2d0s7 /dev/rdsk/c0t2d0s7 /opt ufs 3 yes - The first 2 fields in the above entry, list the same disk device as both a block device("dsk") and character device("rdsk"). The block device is used by mountwhen mounting the filesystem while the character deviceis used by fsckwhen checking the filesystem and newfswhen creating the filesystem.. Both fields must be present in /etc/vfstab.

  Breaking Down c0t2d0s7

  This section breaks down the different components of a disk device file. In this example, I will be using the disk device file: c0t2d0s7. The four components of the disk device file are: controller, target, LUN and slice/partition and further defined in the following table:

  c0 This device is attached to controller #0. On a SPARCstation this is usually the on-board SCSI or IDE controller. If this is a PC it usually refers to the first IDE controller on the motherboard.

  t2 The device is target #2 - (i.e. the second device on this controller.)On a SCSI controller this is the SCSI target ID and is usually set via a switch on any external enclosure or by jumpers on the disk itself. On an IDE controller target #2 refers to the second IDE disk. With IDE this is generally determined by the device's position on the IDE cable.

  d0 The device is Logical Unit / "LUN" #0 (the first) on this target. Under SCSI a single target can support up-to eight devices. This is rarely seen in practice, but some hardware raid controllers use LUNs.

  s7 Slice or Partition number 7. Under Solaris, this relates to the partition number as set when using the formatcommand.

  推荐投诉

    • 评论
    • 分享微博
    • 分享邮件
    邮件订阅

    如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。

    重磅专题
    往期文章
    最新文章