打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
SCO5+informix7准备数据库裸设备空间



自己整理:

SCO5+informix7

准备数据库空间(裸设备)
 
1.fdisk 划分磁盘disk分区
# fdisk

       1. Display Partition Table
       2. Use Entire Disk for UNIX
       3. Use Rest of Disk for UNIX
       4. Create UNIX Partition
       5. Activate Partition
       6. Delete Partition
       7. Create Partition

Enter your choice or 'q' to quit: 1

Current Hard Disk Drive: /dev/rhd00

       +-----------+----------+----------+---------+---------+---------+
       | Partition    | Status     | Type      |     Start |        End |     Size |
       +-----------+----------+----------+---------+---------+---------+
       | 1             | Active      | UNIX      |          1 |   130031 |  130031 |
       | 2             | Inactive    | UNIX      |  130032 |   166001 |   35970 |
       +-----------+----------+----------+---------+---------+---------+

Total disk size: 166260 tracks (256 reserved for masterboot and diagnostics)

Press <Return> to continue

创建UNIX分区,选择“4”(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 <Return> to get the default of 17 file system(s)

+-------------------+------------+--------+---+-------------+------------+
| Name                  | Type          | New FS | # |    First Block |   Last Block |
+-------------------+------------+-----  -+---+-------------+------------+
| dbspace01           | NON FS         |  no    | 0 |                 0|        199999|
| dbspace02           | NON FS         |  no    | 1 |         200000|        399999|
| dbspace03           | NON FS         |  no    | 2 |         400000|        599999|
| dbspace04           | NON FS         |  no    | 3 |         600000|        799999|
| dbspace05           | NON FS         |  no    | 4 |         800000|        999999|
|                           | NOT USED     |  no    | 5 |                 -|                -|
|                           | NOT USED     |  no    | 6 |                 -|                -|
| d1027all              | WHOLE DISK   |  no    | 7 |                 0|       1133054|
+-------------------+------------+------  +---+-------------+------------+
1132488 1K blocks for divisions, 567 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
……

配置informix数据库空间时,既可以使用“真实地址”如/dev/dbspace01,又可以使用“连接地址”如/dbspace/rootdbs

[ 本帖最后由 xy-coordinate 于 2005-11-14 09:47 编辑 ]



本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
几个常用的 Informix 命令
Formatting an External Hard Disk with Ext4 | Borap Blag
Informix on aix手册
Mac上制作Centos7系统U盘安装盘
linux系统GHOST备份方案
CentOS下fdisk分区、格式化、挂载新硬盘
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服