I start: the most important thing is not the desktop, it’s the package manager.

  • guillermohs9@lemmy.ml
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    On Windows, I often simply took out the USB drive without “safely removing” it. The data was there 99% of the time. On Linux, if I’m not mistaken, unmounting the drive before disconnecting is what actually writes data to it.

    • patatahooligan@lemmy.world
      link
      fedilink
      arrow-up
      7
      ·
      1 year ago

      I don’t think Linux literally waits for you to unmount the drive before it decides to write to it. It looks like that because the buffering is completely hidden from the user.

      For example say you want to transfer a few GB from your SSD to a slow USB drive. Let’s say:

      • it takes about half a minute to read the data from the SSD
      • it takes ten minutes to write it to the USB
      • the data fits in the spare room you have in RAM at the moment

      In this scenario, the kernel will take half a minute to read the data into the RAM and then report that the file transfer is complete. Whatever program is being used will also report to the user that the transfer is complete. The kernel should have already started writing to the drive as soon as the data started being read into the RAM, so it should take another nine and a half minutes to complete the transfer in the background.

      So if you unmount at that point, you will have to wait nine and a half minutes. But if you leave it running and try to unmount ten minutes later it should be close to instant. That’s because the kernel kept on writing in the background and was not waiting for you to unmount the drive in order to commit the writes.

      I’m not sure but I think on Windows the file manager is aware of the buffering so this doesn’t happen, at least not for so long. But I think you can still end up with corrupted files if you don’t safely remove it.

    • TheAnonymouseJoker@lemmy.ml
      link
      fedilink
      arrow-up
      2
      arrow-down
      3
      ·
      1 year ago

      I do not think this is the case. You can disable on GNOME Disks active disk write caching for removable storages, exactly the same way as on Windows.

      Also, Thunar File Manager has an option to partially write files when copying/moving and when moving, only remove the file from source directory when the copy is successful. I find it remarkable against data corruption for large file transfers.

      • guillermohs9@lemmy.ml
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        Yeah, but you just describe 2 features on specific apps that don’t need to be enabled by default.

        • TheAnonymouseJoker@lemmy.ml
          link
          fedilink
          arrow-up
          1
          arrow-down
          2
          ·
          1 year ago

          I mean, even the SATA over UAS is a pain with Linux, since the new implementation sacrifices SMART data for faster RW speeds on Linux, and you have to fallback manually on the old driver to read SMART data on external HDDs. On Windows, you just use CrystalDiskMark and it works.

          Linux needs you to do a little work here and there for such things. I do not really eject everything safely on Linux. The feature on Thunar is handy.