I just lost 44 GB of data that I downloaded in the past two hours. My PC started to get laggy and it got stuck so I just shut it down believing that all will be well since the data has already been written to disk…

  • kaitco@lemmy.world
    link
    fedilink
    English
    arrow-up
    51
    arrow-down
    2
    ·
    1 year ago

    That’s not how PCs work. Once you’ve downloaded the data, it’s on your hard drive, not the RAM. This sounds very much like you’ve experienced hard drive failure.

    • AProfessional@lemmy.world
      link
      fedilink
      English
      arrow-up
      19
      arrow-down
      1
      ·
      1 year ago

      This is incorrect too. The OS buffers writes to drives for performance, a portion is kept in memory and flushed to disk when possible. A sudden power loss can easily result in a partial write.

      That said a drive failure is also possible.

      The filesystems journal will be the source of truth.

      • kaitco@lemmy.world
        link
        fedilink
        English
        arrow-up
        19
        ·
        1 year ago

        44 GB over two hours, though? If it were the last couple GBs in the last maybe 10 ten minutes, but unless the OP is running a PC from 2002, the data should have already moved from RAM to disk in that time.

        But yeah, the filesystem journal will explain what happened there.

      • Yendor@reddthat.com
        link
        fedilink
        English
        arrow-up
        9
        ·
        1 year ago

        The buffer is flushed every 6 seconds. OP was pulling down 44GB/7200sec = 6MB/s. OP would have only lost 36MB to disk caching.

        If it was a single 44GB file and OP turned off less than 6 seconds after it finished, then it could have been caching. But that’s very unlikely.

    • Swordman5@lemmy.world
      link
      fedilink
      English
      arrow-up
      17
      ·
      edit-2
      1 year ago

      Well, depending on the drive and if this 40gb of loss was one file and how quickly he shut down after saving the data, it actually is possible. Some drives will use write cache to speed up the perception of the write speeds of a drive where new data is very quickly written to a faster cache, then is transferred a little more slowly to permanent storage. But this write cache isn’t always power loss protected. If you do a normal shut down, the computer waits until any data on the write cache gets transferred to permanent storage before it fully shuts down. If you just nix the power though, that data could be gone, and if it was part of a larger file, it would corrupt that file.

      Edit: Here’s a source to back up my info. Though, it looks like it may actually be an os feature instead of a drive feature. https://www.iolosystem.com/resources/disk-write-caching.html

    • Duckman@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      ·
      1 year ago

      Mem cache is definitely still a thing. Non-volatile storage has gotten faster in recent years but it’s still not as fast as RAM. Depending how his system is configured, data loss is definitely possible.

      That being said, unless it was one big file and he lost critical data that made the file readable (say an MBR on a disk image) there’s no way he should have lost 44GB.

    • sourcepie@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      arrow-down
      1
      ·
      edit-2
      1 year ago

      It actually might be, because now a magic file appeared on my hard drive (a file that was once deleted) that I can’t delete. When I try to delete it, even with admin rights, it says No such file or directory