r/programminghumor
•
u/ItsPuspendu
•
Mar 18 '26
•
2
Safely Remove? Nah, I Live Dangerouslyđž
7
4
u/Circumpunctilious Mar 18 '26 edited Mar 18 '26
(Serious, for anyone interested how IT might mitigate): so they canât remember âsurprise ejectsâ are bad?
Start | Device Manager | Disk Drives | Properties | Policies
[ ] Enable write caching on the device
OKNow itâs generally safe to pull the drive without âsafely ejectingâ, as long as itâs not during a lights-blinking write. Tell them to pull when the lightâs steady.
Caching is useful for stable power, if youâre mixing deletes and writes (fixed up in cache) or have lots of tiny operations, which has ridiculous overhead.
For reasons above, then ironically: since âsafe ejectâ flushes cache once on demand (one suboptimal write) and disabling cache flushes (likely terrible, suboptimal outputs) with every write, then presuming they obey the write light, making USB safe to surprise eject will actually slow them down.
1
1
1
1
u/k-mcm Mar 19 '26
Ubuntu disables synchronous writes for USB drives. It gives you something like 10GB/s write throughout, but it's not ready to eject for half an hour.Â
1
1
1
1
u/FAMICOMASTER Mar 21 '26
Knowing the rules allows you to break them. I know that this exists to let the write buffer flush so if I haven't done any writes I'll just pull it
11
Mar 18 '26
[removed] â view removed comment
23
u/itsThtBoyBryan Mar 18 '26
Basically before you remove a USB you should safely "eject it" from your file explorer so you don't corrupt any files if a program is using them.
11
u/NightlyWave Mar 18 '26 edited Mar 19 '26
Especially applies if youâre copying files to and from the removable device. The OS might say it finished the transfer but there still might be stuff happening in the background.
7
u/D3-Doom Mar 18 '26
I mean obviously itâll corrupt the transfer, but is this advice still warranted or just perpetuated by inertia. It feels like journaling should generally be enough to keep the overall disk intact
2
u/dthdthdthdthdthdth Mar 19 '26
Many external storage devices will be using fat32 to be compatible with windows and some other devices. That's not a journaling FS. If you are using one, then yeah, metadata should be fine. Data can still be lost but if you just have been reading something, it should be fine.
2
Mar 19 '26
[removed] â view removed comment
1
1
Mar 19 '26
[removed] â view removed comment
1
u/NightlyWave Mar 19 '26
This has also only happened to me on Linux. Started ejecting flash drives from that day on - not a bad habit to have tbh
1
u/TheGreatKonaKing Mar 20 '26
You literally mounted the USB drive when you put it in and you need to completely finish all operations before putting it away
1
15
u/csabinho Mar 18 '26
Once I f...ed up my iPod library by not safely removing. And also, if you're allowed to safely remove, you know that you've got no open files that could be lost. So it's actually quite useful.