了解硬盘扇区大小(Understanding Hard Disk Sector Size)

我目前正在开发一个与原始磁盘操作交互的内核模式驱动程序。

我希望更多地了解行业规模的概念。 在制造HDD时,每个物理驱动器的扇区大小是否为恒定值?

或者它是由在磁盘上格式化的文件系统定义的? 如果是这样,他们可以是2扇区大小? 一个用于物理磁盘,一个用于文件系统?

我知道例如NTFS在其BIOS参数块中有一个名为“扇区大小”的DWORD,这是NTFS FS扇区大小吗? 或者它是物理HDD扇区大小?

非常感谢迈克尔

I'm currently developing a kernel mode driver that interacts with raw disk operations.

I wish to understand more about the concept of Sector Size. Is a sector size a constant value per physical drive that was set when the HDD was manufactured ?

Or is it defined by the file system that is formatted on the Disk ? If so can they be 2 Sector Size ? One for the physical disk and one for the File System ?

I know for example that NTFS has in its BIOS Parameter Block a DWORD called "sector size", is this the NTFS FS sector size ? Or is it the Physical HDD sector size ?

Thanks a lot Michael

原文:https://stackoverflow.com/questions/17533474

更新时间:2021-03-07 07:03

最满意答案

Yes, the sector size is established by the drive manufacture.

According to wikipedia:

The standard sector size of 512 bytes for magnetic disks was established with the inception of the hard disk drive in 1956 http://en.wikipedia.org/wiki/Disk_sector

Hard drives have typically been shipped with 512 byte sectors. That was until January 2011, when hard drive manufactures unanimously switched to 4k sectors.

As all hard drive manufacturers have agreed to transition to the Advanced Format sector design by January 2011 http://www.seagate.com/tech-insights/advanced-format-4k-sector-hard-drives-master-ti/

Querying the device for its sector size is not reliable. It is not uncommon for drives report the wrong sector size.

Unfortunately, some HDD manufacturers do not properly respond to the device inquiry sizes. ... The problem is that some HDDs misrepresent 4KB sector disks as having a physical sector size of 512 bytes. http://wiki.illumos.org/plugins/viewsource/viewpagesrc.action?pageId=1147716

相关问答

你想要fsutil。 确保您以管理员身份运行命令提示符。 C:\Windows\system32>fsutil fsinfo ntfsinfo c:

NTFS Volume Serial Number : 0xf4ca5d7cca5d3c54

Version : 3.1

Number Sectors : 0x00000000378fd7ff

Total Clusters :

...

由于您在谈论物理磁盘而不是分区,请查看DeviceIoControl 。 从那里的示例,其中包括在wmain计算总磁盘大小: #include

#include

#include

BOOL GetDriveGeometry(LPWSTR wszPath, DISK_GEOMETRY *pdg)

{

HANDLE hDevice = INVALID_HANDLE_VALUE; // handle to the drive

...

我从另一个主题得到答案。 基本上,我们正在创建Microsoft VHD(虚拟硬盘)并使用RoboCopy填充文件并运送VHD。 请参阅: 解压缩太慢,无法传输许多文件 I got the answer from a different thread. Basically, we are creating a Microsoft VHD (virtual Hard Disk) and filling in the files with RoboCopy and shipping the VHD.

...

“块大小为4096”并不是特别需要,并且您没有提到任何会破坏内核内置缓存机制的访问模式。 读取和写入数据的最有效方法是使用文件。 "Blocks in size of 4096" is not a special need, and you have not mentioned any access patterns that would break the kernel's built-in caching mechanisms. The most efficient way to read a

...

原来我的代码没问题,确实改变了Michael Petch提出的一些事情,但实际的加载没有问题。 问题是当我使用linux的“dd”程序复制引导扇区时,它将截断整个文件。 我通过启用标志来防止截断来解决这个问题。 Turns out my code is fine, did change a few things that Michael Petch proposed but the actual loading was fine. The problem was that when I was u

...

是的,扇区大小由驱动器制造商确定。 根据维基百科: 磁盘的标准扇区大小为512字节是在1956年硬盘驱动器启动时建立的http://en.wikipedia.org/wiki/Disk_sector 硬盘驱动器通常附带512字节扇区。 直到2011年1月,硬盘制造商一致转向4k扇区。 由于所有硬盘制造商已同意在2011年1月之前过渡到高级格式部门设计http://www.seagate.com/tech-insights/advanced-format-4k-sector-hard-drives-

...

我在我的机器上运行它(Python 3.4): import shutil

total, used, free = shutil.disk_usage("\\")

print("Total: %d GB" % (total // (2**30)))

print("Used: %d GB" % (used // (2**30)))

print("Free: %d GB" % (free // (2**30)))

输出: Total: 931 GB

Used: 29 GB

Free: 902 G

...

最后两个字节是引导签名。 在从扇区0加载引导代码之前,BIOS应该检查这些字节是否具有值0x55然后是0xAA,因此这不是Linux问题。 https://support.microsoft.com/en-us/kb/149877 The last two bytes are the boot signature. The BIOS is supposed to check that these bytes have values 0x55 and then 0xAA before loading

...

你需要乘以柱面,头部和扇区的数量,所以你会得到块的数量,乘以它的512,你就得到了答案,我认为就是这样。 You need to multiplier the number of cylinders, heads and sectors, so you'll get the number of blocks, multiplier it for 512 and you got the answer, I think that is it...

好的,您正在尝试安装整个磁盘而不是单个分区,这就是您收到错误的原因。 简而言之,您需要的命令是: mount /dev/sdb1 /mnt/usb

文件/dev/sdb将整个磁盘引用为块文件。 这包括开始时的分区表,这就是它无法找到文件系统的原因。 文件/dev/sdb1引用第一个分区,这是您的文件系统所在的分区。 从您的fdisk输出的外观来看,这不是一个ntfs分区,因为这是一个Windows文件系统,并且该分区被标记为Linux(除非您专门设置不同的东西,否则很可能会有ext4)。 要添加

...

计算机硬盘的扇区大小,了解硬盘扇区大小(Understanding Hard Disk Sector Size)相关推荐

  1. linux硬盘扇区大小,磁盘的块大小(Block Size)和扇区大小(Sector Size)

    Logical Block Size:A "block", a contiguous number of bytes, is the minimum unit of memory ...

  2. 硬盘检测 Victoria教程:每个扇区512byte(现在新的硬盘每个扇区有4K)一个块是4K(4096)扇区,1个块由连续的8个扇区组成。Victoria扫描常选块由2048扇区每扇区512字节

    一.注意事项 1. 下载完成后不要在压缩包内运行软件直接使用,先解压: 2. 如果软件无法正常打开,请右键使用管理员模式运行. 3. 为确保检测结果准确 (避免卡深灰块),运行 Victoria 检测 ...

  3. DS系列服务器硬盘扇区,硬盘基本知识(磁道、扇区、柱面、磁头数、簇、MBR、DBR)...

    硬盘的DOS管理结构 1.磁道,扇区,柱面和磁头数 硬盘最基本的组成部分是由坚硬金属材料制成的涂以磁性介质的盘片,不同容量硬盘的盘片数不等.每个盘片有两面,都可记录信息.盘片被分成许多扇形的区域,每个 ...

  4. linux 硬盘扇区错误,Linux系统扇区错乱的问题

    在开机的过程中最容易遇到的问题就是硬盘可能有坏轨或扇区错乱(数据损毁)的情况, 这种情况虽然不 容易发生在稳定的 Linux 系统下,不过由于不当的开关机 还是可能会造成的,原因可能有: 最可能发生的 ...

  5. 硬盘基本术语(磁道、扇区、柱面、磁头数、簇)

    磁盘结构 硬盘的物理结构一般由磁头与盘片.电动机.主控芯片与排线等部件组成:当主电动机带动盘片旋转时,副电动机带动一组(磁头)到相对应的盘片上并确定读取正面还是反面的碟面,磁头悬浮在碟面上画出一个与盘 ...

  6. 硬盘柱面损坏怎么办_硬盘扇区损坏怎么办

    硬盘扇区损坏怎么办 对电脑硬盘进行检查,发现存在许多的坏扇区,但是使用修复工具又无法修复.那么该如何解决?今天小编就较大家一个小技巧.电脑硬盘存在坏扇区,许多人可能就会马上建议使用系统自带.和下载的磁 ...

  7. 硬盘基本知识(磁道、扇区、柱面、磁头数、簇、MBR、DBR)

    近来,仔细研究了发挥U盘的极限速度--磁盘扇区数精确调节! 一文,并向hfsp 进行了请教,感觉对 磁道.扇区.柱面.磁头数.簇.MBR.DBR等磁盘基本知识不是很了解,于是找到下面一篇文章,和朋友们 ...

  8. 计算机硬盘容量分盘计算,硬盘怎么规划分区大小才算科学合理? | 我爱分享网...

    硬盘怎么规划分区大小才算科学合理?这个问题通常电脑小白都会问,虽然有些非小白可能知道怎么分,但是下面有些内容你也不一定知道哦!我们常见硬盘大小为120G.500G.1T,下面就以这三种来介绍硬盘分区大 ...

  9. 大容量硬盘的应用是计算机的,5大软件伤硬盘

    本词条缺少概述图,补充相关内容使词条更完整,还能快速升级,赶紧来编辑吧! 硬盘是计算机中最重要的存储介质,关于硬盘的维护保养,相信每个电脑用户都有所了解.不过,以前的很多文章都是针对拨号时代的单机用户 ...

最新文章

  1. ubuntu下关于 undefined reference to 'pcap_flex'错误 以及 无法导入/找到libpcap.so.1错误...
  2. 澳洲留学征文活动获奖情况公布
  3. 新手站长们如何利用10分钟的时间内多写高质量的原创量?
  4. Explore Optimization
  5. 对高并发流量控制的一点思考
  6. Windows保护模式学习笔记(十四)—— 阶段测试
  7. mysql出现Access denied for user ‘root‘@‘%‘ to database ‘xxx‘ 解决办法
  8. oracle技术之检查点及SCN号(一)
  9. Bootstrap3 带悬停效果的表格样式
  10. Android 系统(160)---Android 32/64 bits 升级准则
  11. NUnit单元测试笔记
  12. groovy常用语法及实战
  13. SPSS问卷信度分析
  14. Python爬虫:浅谈【破解某易云音乐加密-JS逆向】
  15. 网络工程师项目管理关键路径和松弛时间计算
  16. The Apostle's Creed
  17. BOF和EOF的区别
  18. SylixOS的来龙去脉
  19. 我用 python 做了款可开淘宝店赚钱的工具
  20. 求助做过笔记本ec的大佬

热门文章

  1. 基于51单片机3208LED点阵电子钟C程序工程全套资料,毕业设计参考资料
  2. java 单例 dcl_DCL单例到底需不需要volatile修饰
  3. 7-162 罚抄英语单词
  4. SpringMVC源码解析HandlerMethod
  5. wordpress检索分类法函数:get_terms
  6. 计算机上的网络打不开怎么办理,电脑连不上网怎么办 突然间打不开网页是怎么回事【详解】...
  7. scss 是什么?在 Vue.cli 中的安装使用步骤是?有哪几大特性?(gxcw)
  8. 近200个公共场所上线“场安码”,区块链助力公共卫生防疫
  9. 在单页应用中使用WebWork
  10. 【19考研】如何选择研究生导师?