Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #286461

Making shutdowns safer for external drives

From coffeeforblood.pardon117@slmail.me
Newsgroups linux.debian.user
Subject Making shutdowns safer for external drives
Date 2026-04-30 21:40 +0200
Message-ID <MPFoR-1AYP-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Since then I've learned of the existence of 'lsof', but at the time my experience of Windows and macOS suggested that, under these kinds of circumstances, performing a shutdown will clear the holds on the drives and cleanly eject them during the process. So as I didn't know what else to do I shut down Debian using the menu.

The last thing I saw before the laptop powered off was a series of messages reporting that both external drives had failed to unmount cleanly, and this was confirmed by the nasty clunking noise from the drives indicating sudden parking of the drive heads when the USB power was unexpectedly removed. Following this incident I've had to recover some several GBs of files from each drive.

Obviously this wasn't a very pleasant experience, so I'd like to know what steps I can take to make Debian act more responsibly in future.

IM(H)O part of the problem was that the first thing to get torn down during the shutdown was the GUI, which meant that there was no way for a user to intervene if there was a problem with ejecting the drives cleanly. Windows and macOS will prompt the user using the GUI if there's a problem that means a drive can't be automatically ejected cleanly during a shutdown, giving users an opportunity to abort. Can I modify the Debian shutdown sequence to keep the GUI available until all drives are safely ejected?

I'd welcome any other suggestions to make Debian less likely to cause data loss on external drives during shutdown.

Back to linux.debian.user | Previous | NextNext in thread | Find similar


Thread

Making shutdowns safer for external drives coffeeforblood.pardon117@slmail.me - 2026-04-30 21:40 +0200
  Re: Making shutdowns safer for external drives "Alexander V. Makartsev" <avbetev@gmail.com> - 2026-04-30 22:30 +0200
    Re: Making shutdowns safer for external drives debian-user@howorth.org.uk - 2026-04-30 22:40 +0200
      Re: Making shutdowns safer for external drives "Alexander V. Makartsev" <avbetev@gmail.com> - 2026-04-30 23:40 +0200
        Re: Making shutdowns safer for external drives Charles Curley <charlescurley@charlescurley.com> - 2026-05-01 00:00 +0200
          Re: Making shutdowns safer for external drives Jan Claeys <lists@janc.be> - 2026-05-02 15:30 +0200
        Re: Making shutdowns safer for external drives Dan Ritter <dsr@randomstring.org> - 2026-05-01 15:10 +0200
    Re: Making shutdowns safer for external drives <tomas@tuxteam.de> - 2026-05-01 08:30 +0200
  Re: Making shutdowns safer for external drives Stefan Monnier <monnier@iro.umontreal.ca> - 2026-05-01 04:50 +0200
    Re: Making shutdowns safer for external drives ghe2001 <ghe2001@protonmail.com> - 2026-05-01 05:40 +0200
      Re: Making shutdowns safer for external drives Charles Curley <charlescurley@charlescurley.com> - 2026-05-01 07:20 +0200

csiph-web