- 論壇徽章:
- 1
|
作者:yblsy
1.fdisk 劃分磁盤disk分區(qū)
+--------------+----------+-----------+---------+---------+---------+
|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)
創(chuàng)建UNIX分區(qū)(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
把硬盤想象成:一個從里到外層層鐵皮裹住的圓柱體,一層鐵皮就是1個柱面;再把鐵皮想象成一圈圈上下積壓在一起的小圓鐵絲環(huán),一圈鐵絲環(huán)就是1個磁道;再把鐵絲環(huán)想象成1節(jié)節(jié)焊在一起的鐵條,一小節(jié)鐵條就是1個扇區(qū)
開機信息:/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 –m /dev/rhd02
[color=red:1438e14bf8]/*** rhd02——第一塊(0)硬盤(rhd)第二分區(qū)(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命令在磁盤分區(qū)中建立一塊Non FS分區(qū),對此分區(qū)的大小預先要估算好(7chunk*2,000,000k=14,000,000k)。Online系統(tǒng)對“裸設備”的管理比Unix文件系統(tǒng)的管理效率高很多。
(2)、為系統(tǒng)準備磁盤空間時,必須首先設立正確的權限,并且建議為原始設備建立連接,并且每個chunk不得大于2G。在/dev目錄下,自動產(chǎn)生dbspace01-dbspace10; rdbspace01-rdbspace10 的10個區(qū)。
(3)、dbspace**修改權限、屬性
# chown –R informix:informix *dbspace*
# chmod 660 *dbspace*
注:在/dev下 ,可以像文件一樣操作dbspace,如rm dbspace02
本文來自ChinaUnix博客,如果查看原文請點:http://blog.chinaunix.net/u/31/showart_508154.html |
|