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


Groups > linux.debian.user > #286472

Re: Making shutdowns safer for external drives

From Dan Ritter <dsr@randomstring.org>
Newsgroups linux.debian.user
Subject Re: Making shutdowns safer for external drives
Date 2026-05-01 15:10 +0200
Message-ID <MPVMZ-1MlK-5@gated-at.bofh.it> (permalink)
References <MPFoR-1AYP-1@gated-at.bofh.it> <MPGbf-1Byw-1@gated-at.bofh.it> <MPGkW-1BC6-39@gated-at.bofh.it> <MPHgZ-1CeN-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Alexander V. Makartsev wrote: 
> I'm guessing "umount" command is just as good to safely unmount filesystems
> during shutdown, but the actual process (systemd units?) that does it could
> be getting interrupted by timeout.
> IIRC 1 minute 30 seconds is the default timeout for systemd units.
> If a slow USB storage device has a few gigabytes of cached writes it won't
> make it in time.
> SATA\M.2 connected storage devices are not affected because they are many
> times faster and the connection is more robust.
> I've never actually tested this and never tried to shutdown a PC with a few
> terabytes of pending writes to the root filesystem.

You would need to have terabytes of RAM in order to do that...
which is possible, but very expensive.

Also, the kernel tries to flush the write buffers whenever enough time has
gone by:

/proc/sys/vm/dirty_writeback_centisecs = 500
	(every 5 seconds)

/proc/sys/vm/dirty_ratio = 20
	(or when 20% of memory is writable buffers)

If you set these to lower values, the disks will be written to
more often; larger values will space writes further apart.

Unfortunately, these are system-wide values. Whatever is optimal
for primary storage is usually not quite right for relatively slow
USB-connected storage.

-dsr-

Back to linux.debian.user | Previous | NextPrevious in thread | Next 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