免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2941 | 回复: 8
打印 上一主题 下一主题

偶也来送分,先到先得(08):主次设备号 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-11-05 14:44 |只看该作者 |倒序浏览
20可用积分
# ls -l /devices/pci@0,0/pci1000,30@10/sd@0,0:c
brw-r-----   1 root     sys       54,  2 11Ô  5ÈÕ 14:06 /devices/pci@0,0/pci1000,30@10/sd@0,0:c
#

这个是我的一块硬盘的块设备文件

请问如果不知道这个是硬盘,

如何从它的主次设备号(54,2)或者设备文件名,得知它是哪个物理设备,又对应机器上的哪个位置呢?

最佳答案

查看完整内容

sun有个devicepath文档,俺就直接通过物理路径/devices/pci@0,0/pci1000,30@10/sd@0,0:c查

论坛徽章:
0
2 [报告]
发表于 2007-11-05 14:44 |只看该作者
sun有个devicepath文档,俺就直接通过物理路径/devices/pci@0,0/pci1000,30@10/sd@0,0:c查

论坛徽章:
0
3 [报告]
发表于 2007-11-05 17:32 |只看该作者
原帖由 zzsg 于 2007-11-5 16:50 发表
sun有个devicepath文档,俺就直接通过物理路径/devices/pci@0,0/pci1000,30@10/sd@0,0:c查



怎么找到这个文档?

论坛徽章:
0
4 [报告]
发表于 2007-11-05 17:37 |只看该作者
原帖由 yuhuohu 于 2007-11-5 17:32 发表



怎么找到这个文档?


sunsolve里面找到的
device-path.rar (18.79 KB, 下载次数: 110)

论坛徽章:
0
5 [报告]
发表于 2007-11-05 17:57 |只看该作者
The only command that shows the mapping of the instance name to the physical
device name is the dmesg command. For example, you can determine the mapping of an
instance name to a physical device name by looking at the dmesg output, as shown in the
following example from an Ultra system:
sd19 is /pci@1f,0/pci@1/scsi@1,1/sd@3,0
dad1 is /pci@1f,0/pci@1,1/ide@3/dad@0,0

论坛徽章:
0
6 [报告]
发表于 2007-11-06 21:56 |只看该作者
不知道对不对 sd是scsi disk的缩写

论坛徽章:
0
7 [报告]
发表于 2007-11-07 12:05 |只看该作者

回复 #6 ilinch 的帖子

on an Ultra system, dad0 represents the instance name of the
IDE disk drive, sd0 represents a SCSI disk, and hme0 is the instance name for the network interface.

论坛徽章:
0
8 [报告]
发表于 2009-09-08 09:27 |只看该作者
偶来迟了

论坛徽章:
0
9 [报告]
发表于 2009-09-08 14:26 |只看该作者
这可够老的。。。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP