On Thu, Jun 15, 2017 at 3:37 PM, Mick <michaelkintz...@gmail.com> wrote: > On Thursday 15 Jun 2017 21:40:30 dan...@sonck.nl wrote: >> On Jun 15, 2017 9:28 PM, Mick <michaelkintz...@gmail.com> wrote: > >> This is the first time I heard about discharge damage while unplugging. I >> highly doubt that but for curiosity sake I like some document >> proving/explaining this. > > I'd like one too, but until one appears have a look at what's happening in > this video around 0:46min. > > https://www.youtube.com/watch?v=PdiJWQmSi0k > > The principle is similar. There is current flow and unplugging the conductors > apart causes an arc. Of course the voltages involved are much smaller and so > is the damage. >
You're comparing a 500kV breaker at a substation to a USB device? I'm very skeptical of the claim that any electrical effects associated with unplugging a device is going to cause issues with any USB device. They're basically designed to be hot swapped. Now, the filesystem is an entirely different matter - disconnecting a mounted filesystem can cause all kinds of issues. I think this is the most likely issue people are going to run into, and of course you should not have a mounted filesystem when removing a device. Some filesystems are more resilient to this sort of thing than others. I would think that something like a log-based filesystem like f2fs would be pretty impervious to loss of anything but uncommitted data. COW filesystems should also be pretty resilient. Filesystems set to journal data should be fine, but ones that overwrite data in-place might be left in a somewhat inconsistent state. I suspect this applies even when using ordered data mode on something like ext4 (your metadata is going to be fine, but if you were overwriting 15 blocks in-place I'd think that you could end up in a situation where half are updated and half are not). I'd be interested in somebody who knows better on this last point. Ideally you want the failure mode to be that the state of of the disk corresponds to what you would expect at the conclusion of a write system call (maybe not all the calls in the cache, but it should end on a boundary). I'd also buy the argument that some poorly designed USB drives could end up with data loss to something other than the block being immediately written, but honestly I'm skeptical that this is a widespread problem. -- Rich