|
|
SCO5+informix7
准备数据库空间(裸设备)
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
Partition大小(MB)= PartitionSize(tracks) * 硬盘总容量(MB)/ Total disk tracks
把硬盘想象成:一个从里到外层层铁皮裹住的圆柱体,一层铁皮就是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 –V /dev/rhd02 /*** rhd02——第一块(0)硬盘(rhd)第二分区(2),对应上面的Partition2
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 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. Enter your choice or q to quit:
# divvy –m /dev/rhd03 同理第1块硬盘第3分区
备注: (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
3.建立符号连接(symbolic links) PS:便于管理数据库空间 不同于硬连接(只能在文件系统内)
语法:ln [ -s ] [ -f ] sourcefile ... targetdirectory -s create symbolic links -f existing,unlinked targetfile # mkdir /dbspace # cd dbspace # ln –s /dev/dbspace01 rootdbs # ln –s /dev/dbspace02 tempdbs # ln –s /dev/dbspace03 logdbs # ln –s /dev/dbspace04 chunk01 ……
| | |
阅读(363) | 评论(0) | 转发(0) |