本人有一台hp-DL380G3server,(scsi)72.8G*6(raid5)(smart array 5i),
分了4个unix区,其中两个区的tracks大小一样(均非主引导区),
sco5.06系统安装完毕后,将这两个相同大小的区准备用divvy分片,
但居然两个区在divvy中显示的大小不一,这是怎么回事?
好像单个硬盘应该不会出现此问题,问题应该是阵列导致的,
请问阵列的磁头,柱面,磁道,扇区等是如何计算的?
谢谢!
CNL 回复于:2004-10-01 10:34:23 |
SCO的逻辑分区大小由于需要边界对齐的原因(很多操作系统都有此要求)
每个分区的实际大小都和fdisk出来的有一定的差别,但差别不应很大。 把你的fdisk和divvy的内容以及对应设备名贴一下看是否有其他的原因。 |
june_cai 回复于:2004-10-01 11:22:14 |
查下资料,会不会需要打补丁,官方的此类机型宣称是不支持SCO 5.0.6的。不过我安装的时候倒是没有注意这个问题。好像没有什么问题。 |
kongkuan 回复于:2004-10-01 17:01:23 |
谢谢各位,以下是fdisk和divvy详情,其中3,4分区大小一致,
divvy/dev/hd03总大小为14672511 1K blocks divvy/dev/hd04总大小为14675377 1K blocks 而且他们的reserved blocks 亦不相同,这是为何? # 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 | 572166 | 572166 | | 2 | Inactive | UNIX | 572167 |10357662 | 9785496 | | 3 | Inactive | UNIX |10357663 |10823638 | 465976 | | 4 | Inactive | UNIX |10823639 |11289614 | 465976 | +-------------+----------+-----------+---------+---------+---------+ Total disk size: 11289870 tracks (256 reserved for masterboot and diagnostics) Press <Return> to continue ####################################################以下是divvy -m /dev/hd03 names of the filesystems or swap area before they are created on the hard disk? (y/n) y +-------------------+------------+--------+---+-------------+------------+ | Name | Type | New FS | # | First Block | Last Block | +-------------------+------------+--------+---+-------------+------------+ | d1030 | HTFS | yes | 0 | 0| 2096072| | d1031 | HTFS | yes | 1 | 2096073| 4192145| | d1032 | HTFS | yes | 2 | 4192146| 6288218| | d1033 | HTFS | yes | 3 | 6288219| 8384291| | d1034 | HTFS | yes | 4 | 8384292| 10480364| | d1035 | HTFS | yes | 5 | 10480365| 12576437| | d1036 | HTFS | yes | 6 | 12576438| 14672510| | d1037all | WHOLE DISK | no | 7 | 0| 14678243| +-------------------+------------+--------+---+-------------+------------+ 14672511 1K blocks for divisions, 5733 1K blocks reserved for the system n[ame] Name or rename a division. c[reate] Create a new file system on this division. d[elete] Delete a 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/hd04 names of the filesystems or swap area before they are created on the hard disk? (y/n) y +-------------------+------------+--------+---+-------------+------------+ | Name | Type | New FS | # | First Block | Last Block | +-------------------+------------+--------+---+-------------+------------+ | d1040 | HTFS | yes | 0 | 0| 2096481| | d1041 | HTFS | yes | 1 | 2096482| 4192963| | d1042 | HTFS | yes | 2 | 4192964| 6289445| | d1043 | HTFS | yes | 3 | 6289446| 8385927| | d1044 | HTFS | yes | 4 | 8385928| 10482409| | d1045 | HTFS | yes | 5 | 10482410| 12578891| | d1046 | HTFS | yes | 6 | 12578892| 14675373| | d1047all | WHOLE DISK | no | 7 | 0| 14678242| +-------------------+------------+--------+---+-------------+------------+ 14675377 1K blocks for divisions, 2866 1K blocks reserved for the system n[ame] Name or rename a division. c[reate] Create a new file system on this division. d[elete] Delete a 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: |
CNL 回复于:2004-10-05 15:57:01 |
你这个属于正常偏差之内的范围,
原因就是每个分区的边界对齐造成的,所谓的reserved blocks就是为了页面地址对齐导致的空闲块, 由于不同的分区起始位置、大小等差异,每个分区的reserved blocks的多少也会有差异。 SCSI硬盘也可使用dparam /dev/rhd00 (第1块硬盘,/dev/rhd10第2...) 看cyls、heads、sectors等3项参数,你可自己换算一下边界地址 |
kongkuan 回复于:2004-10-05 20:02:27 |
谢谢斑竹,请问何谓边界对齐?分区时已经是以track为单位了,应该是对齐了边界了吧?另外,为何两个分区的总大小相差一个block如下,
d1037all | WHOLE DISK | no | 7 | 0| 14678243| d1047all | WHOLE DISK | no | 7 | 0| 14678242| 另外如何计算使得边界队齐并让其reserlve block自动一致? |
CNL 回复于:2004-10-05 20:48:43 |
分区一般都是以柱面为边界的。
1、分区大小的计算方法: tracks/cylinder(每柱面的磁道数)乘上sectors/cylinder(每柱面的扇区数) 再乘上实际分配的柱面数 扇区数*磁道数*柱面数=分区大小 2、分区起始位置偏移量offset的计算方法: 上一个分区的大小加上一个分区的偏移量offset 本分区Size+本分区起始起始位置Offset=下个分区的Offset |
kongkuan 回复于:2004-10-07 10:38:11 |
谢谢斑竹,在您回复之前我已误出了这道理,分区是以柱面为单位,在此例中
应该以255的倍数为单位来分区,在sco的帮助文档中,第一track作为引导用, 最后一个柱面(即255个tracks)作为系统的reserve使用,因此有256个作为 masterboot and reserve,详细请各位朋友见man fdisk帮助文档, 再次谢过版主! |
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/