注:此文转自两篇文章,如有版权纠纷,请及时联系,谢谢。
原文链接如下:
https://www.dataclinic.co.uk/hard-drive-defects-table/
https://blog.csdn.net/zaki_Huster/article/details/50039533
Defects Table – What are the PList and GList ?
The defects table in a hard disk drive consists of two lists: the PList and the GList. They contain records of all the defective (or ”bad”) sectors in the hard disk & provide in-built data error prevention measures.
Bad sectors fall into two categories; those created during the manufacturing process and those which develop when the drive is in operation. Hard drives are designed to identify and contain bad sectors by the use of two defect tables.
The P-list Table
Bad sectors encountered during post-manufacture testing are contained within a defect table known as the P-list (“permanent” or “primary” defect table). P-list sectors have no effect on drive access speed as they are automatically omitted by the drive electronics.
The G-list table
The G-list or “growth” defect table contains sectors which have become corrupted while the drive is in use. Although data operations are automatically redirected to uncorrupted sectors, the G-list table does reduce drive access speed and it may become necessary to replace the drive.
硬盘的数据密度很大,在生产过程中不可避免地会产生缺陷,同时在使用过程中,那些不稳定的扇区也会逐渐老化而产生数据读写错误,这些缺陷和不稳定扇区会严重威胁硬盘数据的安全,为此,硬盘设计了两个坏道表来处理这些有缺陷的扇区,他们就是P-list和G-list.,它们用于记录硬盘的缺陷扇区的情况,使硬盘工作时不会在缺陷扇区里读写数据,防止数据损坏。
坏道的产生可以分为两种情况:一是生产过程中产生的缺陷扇区,二是使用过程的产生的缺陷扇区,硬盘设计两个坏道表就是用于分别识别和处理硬盘的两种不同的坏道的。
我们一般称P-list为工厂坏道表,严格来说应该称为永久坏道表或原始坏道表,它是用于记录工厂生产过程中产生的坏道的,坏道加入P-list不会影响硬盘的读写性能。 称P-list为增长坏道表,用于记录硬盘使用过程中由于磁介质性能变弱而引起的坏道,并将坏扇区重定向到好扇区,坏道加入G-list对该扇区的读写速度是有影响的。
下图是硬盘的扇区分配情况,硬盘的全部扇区可以划分为三个方面,固件区、工作区和保留扇区;其中固件区和保留扇区普通用户是没办法操作的,硬盘的实际扇区数比我们看到的硬盘标签上标定的要大,其中一部份用于存储硬盘的固件,一部分是用户存储数据的区域(工作区),也就是硬盘标定容量的扇区,剩下的就是保留区,实际上硬盘上并不会物理划出一个保留区域,只是在工厂生产时标定了全部的有效扇区,而硬盘的容量是小于其实际扇区总数的,在固件里定义了硬盘的容量,超过硬盘容量的那些扇区我们就姑且把它称为保留扇区。
上图中蓝色为固件区,白色为工作区,绿色为保留扇区,红色为坏扇区,图示表示的是坏扇区还没有加入P-list和G-list的情况。大家可以看到,工作区的LBA是从固件区后的LBA0一直连续标定到硬盘的最大工作扇区LBAmax,LBAmax以后的扇区就是保留扇区。下图是坏扇区被加入P-list的情况:
从图中可以看出,坏道被加入P-list后,硬盘不会再读写该扇区,而是在将原读写该扇区的操作顺延到度写坏扇区的下一个扇区,该扇区以后的所有扇区的LBA值都发生了改变,原来保留扇区的一个扇区成为了硬盘的LBAmax,所以坏道被加入P-list后,硬盘需要进行一次厂家低格。下图是坏道加入G-list的情况:
从图中可以看出,坏道加入G-list后,当硬盘需要读坏道所在的扇区时,会被重定位到保留扇区中的一个扇区,硬盘工作区的其它扇区不会受影响,由于保留扇区在硬盘的内道,读写速度慢,同时由于该扇区会导致硬盘的数据存储从物理上来说不连续了,当磁头读取该扇区的数据时需要移动较远的距离,代替坏扇区后,该LBA的读写速度会慢一些,所以我们说坏道加入G-list后会影响硬盘的读写速度。
————————————————
版权声明:本文为CSDN博主「zaki_Huster」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/zaki_Huster/article/details/50039533