DEV Community

Cover image for How to Recover Lost Data From 4Kn Disks
Michael Mirosnichenko
Michael Mirosnichenko

Posted on

How to Recover Lost Data From 4Kn Disks

With the fast development of hard drive industry, the companies producing them started the transition from the traditional sector size of 512 bytes to the larger and more effective 4K sector (holding 4096 bytes). However, there are plenty of people around who are still using 512 byte drives and haven’t seen a 4K drive yet. Talking of data recovery, not all recovery tools are capable of handling this specific drive type. In today’s article, we’ll try to find out what kind of hard disk drive is that and what advantages it has to offer for an average user.

Hard disk structure

As we know, when data is written to a hard disk drive, it is saved to its sectors. Traditionally, a hard disk drive sector is 512 bytes in size, which is also known as 512n (where n stands for native). The sectors are not really adjacent, but they do have narrow gaps between them.

YouTube:

Structure of a hard disk sector:

  • It begins with a gap – the space between the sectors.
  • This is followed by Sync Mark which signals the beginning of the sector and allows to synchronize the way a hard disk works.
  • After that, there is an Address Mark containing data to identify the number and location of the sector. It also holds the information about the sector status.
  • This one is followed by Data Field
  • The closing element of the sector is ECC – Error Correction Code, which is obviously meant to detect and correct errors on the fly (if possible).

Image description

Looking at this picture, you may guess there is a plenty of space between the sectors with the conventional 512 bytes size. The more capacity a hard disk drive has, the more sectors it contains, and therefore, it has more gaps. Evidently, quite a lot of space seems to be wasted.

The main downside about 512-bytes HDDs is that they have to check every 512 bytes for availability of the error correction code. This way, for every 512 bytes one bit of ECC is created to inform the operating system that the data was written properly. Also, it means that such disk needs more space for data because every 512 bytes would be followed by a special bit between sectors containing the ECC bit. Again, it results in heavy fragmentation when very large files are written to the hard disk, because they will be scattered in pieces of 512 bytes each all over different tracks of the disk.

Actually, 4K drives were developed to tackle this issue. A 4K hard disk drive is a storage device with sectors 4096 bytes (i.e. 4 KB) in size.

Hard disks with 4 KB sectors have the same physical structure, but instead of wielding data in 512 bytes’ portions, operating systems will have to read and write by 4 KB in one go. Not only will this save time, but also reduce file fragmentation. What is more, hard disk sectors will need ECC (Error Correction Code) bits only once for every 4 KB.

This disk structure reduces the gaps between sectors and makes using the disk space way more efficient.

It is presented in the picture below.

Image description

Compared with conventional hard disks, 4K drives waste less space on having those gaps between the sectors.

In the new standard known as Advanced Format, the sector size is 4 KB, that is, eight conventional 512-bytes sectors are united into a single sector of 4 KB.

Although the new developments increase the disk space usage rate significantly, it’s next to impossible to switch to the 4K standard immediately, because of Windows compatibility issues.

To help solve this problem, emulated disks were introduced, marked as 512e. This is a kind of hard disk having physical sectors of 4096 bytes, which are divided logically into pieces of 512 bytes each. To make the transition from 512n to 4K allocation easier, most disks use an emulation technology allowing 4K drives to emulate 512n type, by providing an emulated sector size of 512 bytes.

This approach allows the new disks to be used with operating systems that do not support 4K sectors yet.

The new disk format has the same space allocated for gaps, sync mark, and address mark as in conventional HDDS, but the space for Error Correction Code has been increased to 100 bytes.

The table below compares 512n, 512e and 4Kn disks.

Image description

Advantages of 4K drives

The main advantage of 4K sector technology is using the storage device surface more efficiently by combining data. The information that would be written into eight sectors 512 bytes each is now fitted into one 4 KB sector.

The basic elements of a conventional 512 bytes sector – the identification and synchronization marks at the beginning, and the ECC area at the end of the sector are still there.

Between the sector header and ECC areas, eight 512-byte sectors are combined into one, which eliminates the need for redundant header areas between each individual chunk of 512-byte data. This way, 4K hard disk structure improves greatly the disk space usage rate.

Image description

In addition, larger sectors strengthen the integration of error correction algorithms, which can help to maintain data integrity at higher storage densities.

In 4 KB sectors, the space allocated for ECC (Error Correction Code) has been expanded from 50 to 100 bytes to provide the long-awaited increase in error correction effectiveness and resilience to surface defects.

All in all, the combined profit from a more effective new format and improved error correction makes the transition to 4 KB sectors quite feasible. Now the main task for hard disk manufacturers is to make sure that the transition allows users to gain more performance with as little side effects as possible.

If you are looking for 4K drives to buy, check Seagate and HGST (which, by the way, stands for Hitachi Global Storage Technologies). One of the largest hard disk manufacturer, Western Digital Corp., purchased Hitachi’s subsidiary enterprise, Global Storage Technologies (Hitachi GST), back in 2011.

In Seagate lineup, this is Exos Enterprise series,

Image description

and in Western Digital (HGST) model range – Ultrastar series.

Image description

4K hard disks in Windows

If you are using Windows 10 or Windows 8, and you bought a 4K hard disk from either brand, there is no problem to use it at all. You can even have the 4K disk to be your system drive, as both Windows 10 and Windows 8 (or 8.1) support booting from 4K hard disks. For Windows 7, though, the operating system will create logical blocks of 512 bytes to let you use 4K drives in your system.

Hard disk compatibility with Windows

Image description

Also, it should be noted that some utilities that you may wish to use to create system images are not ready to work with 4K drives yet. That is why it is worth checking if your favorite system image tool is up to the task, and if it’s not but you still want a 4K drive in your PC, find a utility that supports the new disk type.

How to recover data from 4K disks

As to recovery of lost data from 4K disks, some specialized utilities don’t support this disk type.

However, our product, Hetman Partition Recovery is always among the best picks, and it can handle lost data on 4K drives easily. It will scan the hard disk or external storage device, find the lost data and help you recover it in a simple and efficient way.

Here is what you do to get your data back:

Step 1. Connect your disk to another computer with a Windows operating system. Download, install and run Hetman Partition Recovery.

Image description

Top comments (0)