免费注册 查看新帖 |

Chinaunix

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

SCO上创建裸设备 [复制链接]

论坛徽章:
1
15-16赛季CBA联赛之北控
日期:2022-03-04 22:35:50
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-03-25 21:46 |只看该作者 |倒序浏览

作者:yblsy   
1.fdisk 划分磁盘disk分区
+--------------+----------+-----------+---------+---------+---------+
|Partition | Status | Type | Start | End | Size |
+--------------+----------+-----------+---------+---------+---------+
| 1 | Active | UNIX | 1 | 570000 | 570000 |
| 2 | Inactive | UNIX | 570001 | 855000 | 285000 |
| 3 | Inactive | UNIX | 855001 | 1139849 | 284849 |
+--------------+----------+-----------+---------+---------+---------+
Total disk size: 2424030 tracks (256 reserved for masterboot and diagnostics)
创建UNIX分区(Create UNIX Partition)
注意:
start,end,size的数字单位是track
硬盘参数有柱面Cylinder、磁道Head、扇区Sector
cylinder*head=track
track*sector=block
1block=512b
c*h*s*512=硬盘大小(b) /1024=硬盘大小(kb) /1024=硬盘大小(Mb)
柱面*柱头*扇区=块 1block=512b
把硬盘想象成:一个从里到外层层铁皮裹住的圆柱体,一层铁皮就是1个柱面;再把铁皮想象成一圈圈上下积压在一起的小圆铁丝环,一圈铁丝环就是1个磁道;再把铁丝环想象成1节节焊在一起的铁条,一小节铁条就是1个扇区
开机信息:/var/adm/messages
device address vector dma comment
---------------------------------------------------------------------------
%disk 0x01F0-0x01F7 14 - type=W0 unit=0 cyls=9506 hds=255 secs=63
2.divvy划分文件系统filesystem分区
# divvy –m /dev/rhd02
[color=red:1438e14bf8]/*** rhd02——第一块(0)硬盘(rhd)第二分区(2),对应上面的Partition2[/color:1438e14bf8]
Please enter the number of file systems you want this area
to be divided into, or press  to get the default of 17 file system(s)
2
+------------------+------------+--------+---+-------------+------------+
| Name | Type | New FS | # | First Block | Last Block |
+------------------+------------+--------+---+-------------+------------+
| dbspace01 | NON FS | no | 0 | 0| 1999999|
| dbspace02 | NON FS | no | 1 | 2000000| 3999999|
| dbspace03 | NON FS | no | 2 | 4000000| 5999999|
| dbspace04 | NON FS | no | 3 | 6000000| 7999999|
| dbspace05 | NON FS | no | 4 | 8000000| 9999999|
| | NOT USED | no | 5 | -| -|
| | NOT USED | no | 6 | -| -|
| hd02 | WHOLE DISK | no | 7 | 0| 10239999|
+------------------+------------+--------+---+-------------+------------+
10238992 1K blocks for divisions, 1008 1K blocks reserved for the system
[color=red:1438e14bf8]n[ame] Name or rename a division.
c[reate] Create a new file system on this division.
t[ype] Select or change filesystem type on new filesystems.
p[revent] Prevent a new file system from being created on this division.
s[tart] Start a division on a different block.
e[nd] End a division on a different block.
r[estore] Restore the original division table.[/color:1438e14bf8]
Enter your choice or q to quit:
------------------------
n:命名filesystem
s:开始block
e:结束block
t:更改类型
-------------------------
# divvy –m /dev/rhd03
+------------------+------------+--------+---+-------------+------------+
| Name | Type | New FS | # | First Block | Last Block |
+------------------+------------+--------+---+-------------+------------+
| dbspace06 | NON FS | no | 0 | 0| 1999999|
| dbspace07 | NON FS | no | 1 | 2000000| 3999999|
| dbspace08 | NON FS | no | 2 | 4000000| 5999999|
| dbspace09 | NON FS | no | 3 | 6000000| 7999999|
| dbspace10 | NON FS | no | 4 | 8000000| 8972741|
| | NOT USED | no | 5 | -| -|
| | NOT USED | no | 6 | -| -|
| hd03 | WHOLE DISK | no | 7 | 0| 8972742|
+------------------+------------+--------+---+-------------+------------+
备注:
(1)、通常采用的方式是Raw Device,也称“裸设备”,就是在安装Unix磁盘时,用divvy命令在磁盘分区中建立一块Non FS分区,对此分区的大小预先要估算好(7chunk*2,000,000k=14,000,000k)。Online系统对“裸设备”的管理比Unix文件系统的管理效率高很多。
(2)、为系统准备磁盘空间时,必须首先设立正确的权限,并且建议为原始设备建立连接,并且每个chunk不得大于2G。在/dev目录下,自动产生dbspace01-dbspace10; rdbspace01-rdbspace10 的10个区。
(3)、dbspace**修改权限、属性
# chown –R informix:informix *dbspace*
# chmod 660 *dbspace*
注:在/dev下 ,可以像文件一样操作dbspace,如rm dbspace02



本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/31/showart_508154.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP