- 论坛徽章:
- 0
|
ASE 1192 for Unixware 7.1 安装指南
在/dev/dsk目录下做 l c*,可以看到一下信息:
brw------- 1 root sys 7679, 0 May 20 12:47 c0b0t0d0s0
brw------- 1 root sys 7679, 1 May 20 12:47 c0b0t0d0s1
brw------- 1 root sys 7679, 2 May 20 12:47 c0b0t0d0s2
brw------- 1 root sys 7679, 3 May 20 12:47 c0b0t0d0s3
brw------- 1 root sys 7679, 4 May 20 12:47 c0b0t0d0s4
brw------- 1 root sys 7679, 5 May 20 12:47 c0b0t0d0s5
brw------- 1 root sys 7679, 6 May 20 12:47 c0b0t0d0s6
brw------- 1 root sys 7679, 7 May 20 12:47 c0b0t0d0s7
brw------- 1 root sys 7679, 8 May 20 12:47 c0b0t0d0s8
brw------- 1 root sys 7679, 9 May 20 12:47 c0b0t0d0s9
brw------- 1 root sys 7679, 10 May 20 12:47 c0b0t0d0sa
。。。。。。
这些在/dev/dsk下的文件被成为块设备(block device),/dev/rdsk下的被称为裸设备(raw device),c0b0t0d0表示某一块硬盘,s0~s*表示硬盘上的片(slice),如c0b0t0d0s1的nod号即为7679, 1。也可以称做主(major)、从(minor)设备号。mknod就是通过主、从设备号创建文件映射的!
常规的做法是这样的:
比如要创建一块裸设备给数据库使用,名称为db_dev1,slice为c0b0t0d0s9,则通过以下命令创建:
mknod db_dev1 c 7679 9
以下是unixware 的man关于mknod的说明:
mknod -- make a special file
Synopsis
mknod name b | c major minor
mknod name p
Description
mknod makes a directory entry for a special file.
name is the special file to be created. The second argument is either b, to indicate a block-type special file, or c, to indicate a character-type. The last two arguments are numbers specifying the major and minor device numbers; these may be either decimal or octal. The assignment of major device numbers is specific to each system. You must be a privileged user to use this form of the command.
The second case is used to create a FIFO (named pipe). |
|