On 2026-04-30 21:30:16, [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.
[snip]
> I'd welcome any other suggestions to make Debian less likely to cause
> data loss on external drives during shutdown.
>
Hello,
My way of doing such a thing:
a. always exit any directories (from file mangager or terminal)
located on the device to be unmounted.
b. perform one, two or even three "sync"
c. umount /dev/sda1 (if "sda1" is the partition mounted)
d. then, if the device is a HDD, force it to spin down:
sdparm -C stop -r /dev/sda (if "/dev/sda" is your external
device)
e. unplug the device
Hope it helps.
Rand