A moment ago I unmounted my 1TB HDD with 400GB of content and I partition it into two different partitions, obviously keeping the space that was already occupied. I did because I don’t care if the content get corrupted, but after I did it everything is still working perfectly, when I thought everything would be corrupted.

I am possibly a complete ignorant on this subject, but due to the nature of the HDD and how it writes and reads data I expected it to corrupt everything, why didn’t it happen? On an SSD on the other hand I would not consider that possible because it is not even a mechanical part where the information is stored.

  • ∟⊔⊤∦∣≶@lemmy.nz
    link
    fedilink
    arrow-up
    7
    ·
    edit-2
    9 months ago

    Well, hard to say that everything is not corrupted unless you verify each bit. What file system are you using?

    Partitioning I believe (if you don’t format anything) is just rewriting drive headers and creating a new header at some new point on the disk for the next partition.

    Obviously we aren’t in the days of sequential files, so files are spread physically over the disk with space in between. I’m not up with the exact specifics on whatever the latest windows FS is and how it works, or how EXT works at that level, but it would seem you partitioned it at a point after the data ended.

    That, or you haven’t corrupted the inodes/pointers, so it appears that all the files are there, until you try to actually access that place on the disk. If the files existed in the space that the new partition is, then you’re going to get errors. I suspect this is more likely, because inodes will exist in the first sequential bytes on the disk, while the actual file location could be anywhere.

    Correct me if I’m wrong on any of the details here.

    • Xirup@lemmy.dbzer0.comOP
      link
      fedilink
      arrow-up
      5
      ·
      edit-2
      9 months ago

      I’m using ext4 and the contents of the HDD are basically virtual machines, and I was able to access most of them (who use dynamic virtual hard drives) and they seem to work without problem, so I assumed that nothing got corrupted.

      Actually I was surprised because a long ago I tried to do the same with BFTRS and all my data get corrupted that time.

      And it’s interesting, thanks for the info. I didn’t know that it worked like that.