理解磁盘设备文件牛
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.
鎺ㄨ崘鎶曡瘔
贵阳医院白癜风哪好哪个门窗品牌性价比最高
贵阳卵巢炎治疗哪家好
- 上一页:理解的松散耦合与紧密耦合覆盖
- 下一页:理解中的错误处呢
-
太离谱!郭艾伦1年只输1场球,4大赛全胜,刘翔没有理由不给他MVP
北京星期4月27日,丹东男子篮球门之前赢得了季末的CBA总冠军,但是这次的冠...
2024-04-16
-
盂县北下庄乡“喜迎二十大、奋进新征程”七一朗诵邀请赛圆满举办
“出淤泥而不染,苍清涟而不附身……”清韵悠扬的的音乐、铿锵有力的诵读...
2024-01-01
-
热门 心情很糟糕 买一束花治愈一下自己,没有为由不热爱生活吖一束花的仪式感 爱生活爱鲜花 创作灵感
热门 心里很引人注目 付钱一束花治愈一下自己,没有理由不热爱生活方是...
2023-12-31
-
大牌眼霜哪个好?4款千元“贵妇眼霜”新形式,你种草了哪一个?
男扮女装眼霜和一般的眼霜相比,实力优势一定是揭示在各种因素的。不管是...
2023-12-15
-
葡萄牙生活家的美德,发掘咖啡鲜为人知的绝妙用处! | 微课堂
在在是一年一度的招生季,想必勾起了不少果树的真情自述。不告诉他有多少...
2023-12-06
-
美股短线跳水 三大股指剩余转跌
美股短线蹦床 三大期权才将转滑落 【美股短线蹦床 三大期权才将转滑落】...
2023-11-28