šŸ“œ ā¬†ļø ā¬‡ļø

Support for Advanced Format - optimal work with high-capacity disks

Advanced Format is a new hard disk layout format needed to address large amounts of disk space. All manufacturers of modern hard drives, including HGST, are switching to this format.
One of the main features of Advanced Format is an increase in the size of the sector from 512 to 4096 bytes. To maintain compatibility with programs designed for the old format, new disks have an emulation mode called ā€œ512eā€.
Most modern operating systems support Advanced Format. In order to achieve optimal I / O performance, it is necessary that the disk partitioning be carried out correctly, and that data is recorded in 4-kilobyte blocks by both the operating system and application programs. The latest operating systems by default fulfill all the conditions necessary for effective work with Advanced Format. When using older software, special utilities may be required to adjust the disk subsystem for optimal performance.

Advanced Format Device
In the middle of Figure 1, eight consecutive 512-byte sectors are depicted. In addition to user data, each sector contains service information: markup data and an error correction code. When replacing eight 512-byte sectors with one 4-kilobyte one, the amount of required overhead information is reduced (see the bottom of the figure). Thus, when working with large files (and the average file size has increased compared to the times when the 512-byte format was used, the disk space is used more efficiently). In addition, more space is allocated to the error correction code, which ensures better data integrity.


Fig. 1. Comparison of 512-byte and 4-kilobyte formats (1).

Compatibility
A significant part of the operating hardware and software are designed for a sector size of 512 bytes and expect data to be sent in 512-byte blocks. Emulation of this exchange is implemented in new disks at the interface level. When a request is made to read a block, the disk reads the entire sector (which does not take much time) and transfers only the necessary block to the program. If the program receives a request to write a block, the disk reads a whole sector, puts the received block into it and overwrites the entire sector (see Fig. 2). Time elapses between reading and writing, and the disk can complete several revolutions during this time.
')

Fig. 2. In emulation mode, when writing a 512-byte block, the disk first reads a sector, puts a block into it, and then writes a sector

Providing speed
To achieve the highest performance, it is necessary that the recording format on the disc matches the format of the disc. In the ideal case, the recording should be performed in 4-kilobyte blocks and each block should be written to one sector. This condition is satisfied if both the operating system and application programs are configured to work with 4-kilobyte blocks, and the disk partitioning is performed correctly.
Most modern operating systems use file systems in which disk space is allocated 4-kilobyte blocks, or clusters. The 4-kilobyte block corresponds to eight 512-byte sectors (see Fig. 3).


Fig. 3. Cluster correspondence to sector in emulation mode.

Alignment of section boundaries
When using operating systems that write data to 4-kilobyte clusters (most modern operating systems), it is important that their borders be aligned with the sector boundaries of the disk. In emulation mode, the 512e disk cannot prevent a partition from being placed from a block whose number is not a multiple of eight. If this happens, one cluster will be located in two sectors (see Fig. 4). Thus, when reading or writing a 4-kilobyte cluster, you will need to respectively read or write 8 kilobytes - twice as much. And if when reading the difference in speed is not large, then when writing, it will be noticeable.


Fig. 4. Placement of the cluster is not from the beginning of the sector.

Operating systems supporting Advanced Format
In the following operating systems, the cluster size is 4 KB, and during installation the disk partitioning is performed correctly:
• Microsoft Windows Vista SP1 and newer;
• Microsoft Windows 7;
• Microsoft Server 2008;
• Mac OS X 10.4 and newer;
• Linux Ubuntu 8.04+, SUSE, Linux kernel 2.6.34+ (you must use the Linux Partitioning Utility).

Operating systems that do not automatically match clusters to sectors:
• Microsoft Windows XP;
• Microsoft Server 2003;
• Microsoft Windows Home Server V1.

HGST Align Tool
You can use the HGST utility for Windows to correct the logical partitioning of disks that are not aligned with sector boundaries. You can download it at www.hgst.com/support/downloads .
In addition, Advanced Format is supported by a number of third-party disk utilities:

Disk partitioning tools
For Linux:
GPARTED 2.1+ (with the -a optimal or -a minimal options).
www.gnu.org/software/parted/manual/parted.html

For Windows:
Acronis Disk Director Home 11 or Paragon Partition Manager 11.

For Mac:
Disk Utility (bundled with Mac OS X 10.4+), creates a GPT partition (GUID Partition Table).

Additional information:
www.idema.org (documents on Advanced Format, including specifications)
en.wikipedia.org/wiki/Advanced_Format
www.t13.org , document: ATA8-ACS (ATA Command Set)
www.t10.org , document: SBC-3 (SCSI Block Commands)
Microsoft Windows 7 and Advanced Format Hotfix (KB981208):
support.microsoft.com/kb/982018
Intel Rapid Storage Technology (RST): www.intel.com/support/chipsets/imsm/sb/CS-031502.htm

(1) Hereinafter, the figures are taken from Hitachi Advanced Format Technology Brief - www.hgst.com/tech/techlib.nsf/techdocs/3D2E8D174ACEA749882577AE006F3F05 $ file / AFtechbrief.pdf

Source: https://habr.com/ru/post/190564/


All Articles