0

While creating an image of a (mostly empty) 1TB spinning hard disk, I was expecting a read speed of around 120 MB/s, and on the first blocks it was like that, but after that, most of the time it was reading at 320 MB/s, which I think it would be impossible for an HDD.

It's a Seagate 2.5" HD, connected to a USB3 port on the PC with a USB-SATA adapter, and I tested it on Linux.

I would say that the higher speed started when it finished reading the used blocks. Is it that the unused/zeroed space is "marked" as empty and the disk controller sends the zeroed-data without physically reading it from the disk surface?

If so, can this be marked by hand with some system command to improve things on a disk that is mostly empty?

EDIT:

This is how I'm creating the image: pv /dev/sdb > my1TBdisk.img

golimar
  • 1,522
  • 1
  • 17
  • 35
  • 2
    Sparse files is a concept that only exists at the filesystem level. The actual storage medium is completely unaware whether a file is "sparse" or not. The storage device does not handle the read or write of a zeroed-out block in any special way. HDDs have no concept of unused sectors/LBAs, whereas SSD can because of its FTL and TRIM command. An explanation for what you think you observed lies somewhere else. – sawdust Apr 07 '23 at 06:55
  • @BlindSpots Get 320 MB/s instead of 120 MB/S – golimar Apr 07 '23 at 08:00
  • @sawdust Where else? ;) – golimar Apr 07 '23 at 08:01
  • 1
    @sawdust It depends on how the so-called "image" is done. Some cloning tools are file-system aware and can take advantage of sparse files. Since OP didn't say how they are imaging the disk or partition, we can only try guessing. – PierU Apr 08 '23 at 09:51
  • 3
    @sawdust: Generally yes but SMR HDDs _do_ have a translation layer (even going as far as to implement TRIM in some cases), although I would be surprised if a 1TB HDD was SMR... – u1686_grawity Apr 08 '23 at 09:57
  • 1
    @user1686 - this. translator 'knows' it's reading virgin space, can return zeros without ever reading the drive similar to indeed SSD reading 'unmapped' LBA's. – Joep van Steen Apr 08 '23 at 10:19
  • @user1686 There exist 1TB drives that are SMR, including Seagate ones: https://www.seagate.com/products/cmr-smr-list/ – PierU Apr 08 '23 at 10:22
  • 1
    Seagate in particular even implements the TRIM operation for their SMR HDDs. I don't know whether they implement DRAT/DZAT though, but that could very well be the answer. (I have a pair of 2TB 3.5in SMR HDDs from Seagate, didn't realize they felt the need to use it even for 1TB ones.) – u1686_grawity Apr 08 '23 at 10:29
  • @user1686 - Obviously I'm not keeping up with technology. This related answer is now 4-years old: [What does TRIM on an HDD mean?](https://superuser.com/questions/1407990/what-does-trim-on-an-hdd-mean) – sawdust Apr 08 '23 at 19:34
  • @PierU I edited the question to show how I'm imaging the disk – golimar Apr 09 '23 at 16:49
  • Please provide the exact model number of the HDD in question. – Daniel B Apr 09 '23 at 17:57
  • @DanielB Seagate Mobile HDD 1TB 1RK172-021 ST1000LM035 – golimar Apr 10 '23 at 05:32
  • It is referenced as a SMR drive on many sites. Anyway, most of "consumer-grade" drives nowadays are SMR. – PierU Apr 10 '23 at 07:16

0 Answers0