自己整理: SCO5+informix7 準(zhǔn)備數(shù)據(jù)庫空間(裸設(shè)備) 1.fdisk 劃分磁盤disk分區(qū) # 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 創(chuàng)建UNIX分區(qū),選擇“4”(Create UNIX Partition) 注意: start,end,size的數(shù)字單位是track 硬盤參數(shù)有柱面Cylinder、磁道Head、扇區(qū)Sector cylinder*head=track track*sector=block 1block=512b c*h*s*512=硬盤大小(b) /1024=硬盤大小(kb) /1024=硬盤大小(Mb) 柱面*柱頭*扇區(qū)=塊 1block=512b Partition大小(MB)= PartitionSize(tracks) * 硬盤總?cè)萘浚∕B)/ Total disk tracks 把硬盤想象成:一個從里到外層層鐵皮裹住的圓柱體,一層鐵皮就是1個柱面;再把鐵皮想象成一圈圈上下積壓在一起的小圓鐵絲環(huán),一圈鐵絲環(huán)就是1個磁道;再把鐵絲環(huán)想象成1節(jié)節(jié)焊在一起的鐵條,一小節(jié)鐵條就是1個扇區(qū) 開機(jī)信息:/var/adm/messages device address vector dma comment --------------------------------------------------------------------------- %disk 0x01F0-0x01F7 14 - type=W0 unit=0 cyls=9506 hds=255 secs=63 2.divvy劃分文件系統(tǒng)filesystem分區(qū) # divvy –V /dev/rhd02 注: rhd02——第一塊(0)硬盤(rhd)第二分區(qū)(2),對應(yīng)上面的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) 2 +-------------------+------------+--------+---+-------------+------------+ | 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分區(qū) 備注: (1)、通常采用的方式是Raw Device,也稱“裸設(shè)備”,就是在安裝Unix磁盤時,用divvy命令在磁盤分區(qū)中建立一塊Non FS分區(qū),對此分區(qū)的大小預(yù)先要估算好(7chunk*2,000,000k=14,000,000k)。Online系統(tǒng)對“裸設(shè)備”的管理比Unix文件系統(tǒng)的管理效率高很多。 (2)、為系統(tǒng)準(zhǔn)備磁盤空間時,必須首先設(shè)立正確的權(quán)限,并且建議為原始設(shè)備建立連接,并且每個chunk不得大于2G。在/dev目錄下,自動產(chǎn)生dbspace01-dbspace10; rdbspace01-rdbspace10 的10個區(qū)。 (3)、dbspace**修改權(quán)限、屬性 # chown –R informix:informix *dbspace* # chmod 660 *dbspace* 注:在/dev下 ,可以像文件一樣操作dbspace,如rm dbspace02 3.建立符號連接(symbolic links) PS:便于管理數(shù)據(jù)庫空間 不同于硬連接(只能在文件系統(tǒng)內(nèi)) 語法: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數(shù)據(jù)庫空間時,既可以使用“真實(shí)地址”如/dev/dbspace01,又可以使用“連接地址”如/dbspace/rootdbs [ 本帖最后由 xy-coordinate 于 2005-11-14 09:47 編輯 ] |