If one unmounts a disk, is that disk still available for write and can the following sync do anything?

[Solved]

    • WasPentalive@lemmy.oneOP
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      2
      ·
      edit-2
      1 month ago

      One only relies on ChatGPT for 1) imagining science fiction story lines and devices 2) Only where one knows the correct answer already. This instance is kind of a one-off. Spicy autocomplete - lol : ^ )

  • Routhinator@startrek.website
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    1
    ·
    1 month ago

    Uhm, been a while since I had to think of this but pretty sure you used to need to do that the other way around. Sync before unmount, else things may still be being written to disk.

      • Routhinator@startrek.website
        link
        fedilink
        English
        arrow-up
        1
        ·
        29 days ago

        Yeah I’m thinking about fuse filesystems and hotplugged USB keys though. There was a time when the feedback about devices being ready to unplug was bad for users.

        This answer suffered the fog of time. Never needed it with the unmount command.

  • Last@reddthat.com
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    30 days ago

    I was under the impression that the sync command makes device removal safer somehow. Even though the device was unmounted, there may be cached data that wasn’t written yet. Could be wrong about that, but it seems harmless to include.

    Edit: looked it up, and umount calls sync, so there’s no need to include it. And if you do include it, sync before umount, like you said.