今天翻倒一篇微软的存储优化的文档。有如下一段:
Depending on the hardware RAID configuration you use, plan for I/Openalties. In general, for each write request, hardware RAID generatesthe following I/O:
- RAID-0 = 1 write
- RAID-1 or RAID-10 = 2 writes
- RAID-5 = 4 writes
想请教下为什么RAID-0 =1 write,RAID-1是2个,而RAID5是4个。
另外还有一个windows下与磁道边界对齐的问题要请教。为什么会产生磁道边界不对齐的情况!

最新回复
第二个问题,不是磁道不磁道的问题,这是存储所管理的block与fs block方面的对齐问题。典型例子就是mbr使用一个sector,所以存储管理的时候要空出一个block来专门供mbr使用。
QUOTE:
不用惭愧,没有几个人有冬瓜头了解那么深的哇哈哈哈哈,我等只要知道raid0,1,5是大概怎么回事就行了
做技术的不详细了解原理,呵呵,。。。。。。。。。。。。。。
QUOTE:
很多东西的底层是怎么回事我们不知道,也没必要知道.这个不是当年用漆包线穿存储板的时代了,从那个学起估计要个10年才能学到现在的东西.哈哈.
RAID-0 = 1 write:只做条带,没有冗余,对一个数据单元的写操作只发生一次写入。
RAID-1 or RAID-10 = 2 writes:RAID-1是镜像,10再加条带,一个数据单元会发生两次写入,一次是主盘另一次是镜像盘,通俗点说。
RAID-5 = 4 writes:不太明白为什么会是四?写新数据、写校验数据。。。。。?
With a physical disk that maintains 64 sectors pertrack, Windows always creates the partition starting at the sixty-forth sector,therefore misaligning it with the underlying physical disk. To be certain ofdisk alignment, use Diskpart.exe, a disk partition tool.
不理解的地方有二个:
1、文档里说物理磁盘每磁道有64个扇区,但是我Google的大家都说是63个.是不是文档错误?
2、windows创建分区从64号扇区开始?按照它的说话,亦即是从0磁道最后一个扇区开始,为什么这样?
1。0-63
2。64就是第二道的第一个扇区
btw:没磁道64扇区,物理上不是这样的。外圈磁道比内圈的多。现代的磁盘内部都不知道是什么样了,但是外部提供的统一都是lba线性编址,chs编址已经都被映射到lba了。
现把文档内容贴出来:
How to Align Exchange I/O with Storage Track Boundaries
With a physical disk that maintains 64 sectors per track, Windows always creates the partition starting at the sixty-forth sector, therefore misaligning it with the underlying physical disk. To be certain of disk alignment, use Diskpart.exe, a disk partition tool. Diskpart.exe is a utility provided by Microsoft in the Windows Server 2003 Service Pack 1 Support Tools that can explicitly set the starting offset in the master boot record (MBR). By setting the starting offset, you can track alignment and improve disk performance. Exchange Server 2003 writes data in multiples of 4 KB I/O operations (4 KB for the databases and up to 32 KB for streaming files). Therefore, make sure that the starting offset is a multiple of 4 KB. Failure to do so may cause a single I/O operation spanning two tracks, causing performance degradation.
Before You Begin
Diskpart is a data destructive utility. When used against a disk, all data on the disk will be wiped out during the storage track boundary alignment process. Therefore, if the disk on which you will run Diskpart contains data, backup the disk before performing the following procedure.
Note:
Diskpart can only be used with basic disks. Diskpart cannot be used with dynamic disks. Diskpart supersedes the functionality previously found in Diskpar.exe. Diskpar and Diskpart should only be used if the drive is translated as 64 sectors per track.
Diskpart.exe is located in the following directory by default on systems running Windows Server 2003 : C:\WINDOWS\system32
Procedure
To align Exchange I/O with storage track boundaries using Diskpart.exe
1. If the disk you are aligning is already blank (raw), proceed to Step 3. If the disk contains data, backup the disk before proceeding.
2. Delete all partitions on the disk.
3. Open a command prompt, and execute Diskpart.exe.
4. At the Diskpart command prompt, type List Disk and press Enter. If the disk you want to align does not appear in the list make sure that it exists and is accessible using the Disk Management snap-in.
5. At the Diskpart command prompt, type Select Disk X, where X is the number of the disk as shown in the output of the List Disk command. Diskpart should return a message that indicates that Disk X is the selected disk.
6. At the Diskpart command prompt, type Create Partition Primary Align=X, where X is either 32 or 64, depending on the recommendation from your storage vendor. If your storage vendor does not have any specific recommendations, it is recommended that you use 64.
7. At the Diskpart command prompt, type Assign Letter=<DriveLetter>. For example, to assign letter Z to the disk, type Assign Letter=Z.
8. Once the drive letter is assigned, type exit to exit out of the Diskpart utility.
9. Use the Disk Management snap-in or the Windows Format command to format the partition as an NTFS-formatted partition.
[ 本帖最后由 旷野的呼唤 于 2008-8-2 14:04 编辑 ]
所以,如果分区是从64号磁道开始,也就是1磁道0扇区开始,则一个磁道64个扇区刚好可以默认有8个数据块,而IO是以数据块为单位的,则windows默认刚好不会发生IO跨磁道的情况,它何必另外提供工具?如果是说windows是默认从0磁道最后一个扇区开始,则第一个数据块刚好跨越两个磁道,这样就有必要修正,这样解释比较合理。
其次,我从网上查到的结果,分区是从柱面到柱面,这样子分区则一定是从某个磁道开始,不可能从某个扇区开始。
哪种说法正确?或是该怎么理解?
[ 本帖最后由 旷野的呼唤 于 2008-8-2 14:15 编辑 ]