On Fri, May 01, 2026 at 01:24:09AM +0500, Alexander V. Makartsev wrote: > On 5/1/26 00:30, [email protected] wrote: > > I have some USB-attached HDDs connected to a laptop running Debian 12. > > Recently I had a problem ejecting them using the file manager and the Disks > > app, something on the drives was still "in use" even when I had closed > > every open application.
[...] > > I'd welcome any other suggestions to make Debian less likely to cause data > > loss on external drives during shutdown. > It is a good habit to issue "sync" command, before disconnecting any USB > storage devices. > Some storage devices have very slow write speeds, so you have to wait for > the "sync" command to finish syncing cached writes. > When it finishes you can run it again, just to be sure it worked and it > should finish in an instant. > Now you can safely unmount and then physically disconnect USB storage > devices. I think this is the most plausible explanation. Some application "sitting on" a disk should be long gone when trying to unmount: we are in shutdown, aren't we? To get more data, you could just try (while in normal operation) to issue a "sync" and see how long it takes (for some USB sticks, for me it takes minutes: as Alexander says, USB is slow). If the shutdown process loses patience, the scenario you describe could very well happen. Cheers -- t
signature.asc
Description: PGP signature

