this post was submitted on 22 Nov 2024
1 points (54.5% liked)

Debian operating system

2746 readers
11 users here now

Debian is a free operating system (OS) for your computer. An operating system is the set of basic programs and utilities that make your computer run. Debian provides more than a pure OS: it comes with over 59000 packages, precompiled software bundled up in a nice format for easy installation on your machine.

founded 4 years ago
MODERATORS
 

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

top 7 comments
sorted by: hot top controversial new old
[–] [email protected] 9 points 1 day ago (1 children)

Some people follow their GPS into the drink, and other people ask spicy autocomplete how to admin their computer.

[–] [email protected] 0 points 1 day ago* (last edited 1 day 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 : ^ )

[–] [email protected] 5 points 1 day ago (1 children)

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.

[–] [email protected] 3 points 1 day ago (1 children)

Surely an unmount forces a sync.

[–] [email protected] 1 points 1 day 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.

[–] [email protected] 4 points 2 days ago* (last edited 1 day 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.

[–] [email protected] 2 points 1 day ago

Yes to the first question. I could be wrong, but I think you have to run umount on the directory sdx is mounted on, not sdx itself.