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


Groups > linux.debian.user > #243055

Re: Filesystem and free space

From Jonathan Dowland <jon+debian-user@dow.land>
Newsgroups linux.debian.user
Subject Re: Filesystem and free space
Date 2021-12-13 13:20 +0100
Message-ID <DtStb-5b6-1@gated-at.bofh.it> (permalink)
References <DtCy5-3UD-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sun, Dec 12, 2021 at 02:13:19PM -0500, Polyna-Maude Racicot-Summerside wrote:
>I know there's quota but what I want to ensure is simply that no user
>can write to disk unless there's at least 2 GB left free on partition.
>Is this possible ?

As another has mentioned, there's reserved-blocks-percentage at
filesystem creation time, but it only distinguishes between superuser
and not-superuser. But you could set the % such that the reserved space
was 2GiB that way.

Personally, I leave the reserved block quota at the default (which means
I can always do some basic things as root) and for the filesystems which
need reserved space to operate, I create an empty non-sparse file of the
appropriate size:

▶ stat /mnt/emergencySpace 
   File: /mnt/emergencySpace
   Size: 1073741824      Blocks: 2097152    IO Block: 4096   regular file

If/when the filesystem fills up such that the operations that need space
fail, I can quickly remove the emergencySpace file, run those operations,
and then do a deeper clean-up (removed old backup increments, or whatever
has caused the fill-up).


-- 
Please do not CC me for listmail.

👱🏻	Jonathan Dowland
✎	 jmtd@debian.org
🔗	https://jmtd.net

Back to linux.debian.user | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Filesystem and free space Polyna-Maude Racicot-Summerside <debian@polynamaude.com> - 2021-12-12 20:20 +0100
  Re: Filesystem and free space Teemu Likonen <tlikonen@iki.fi> - 2021-12-12 20:30 +0100
    Re: Filesystem and free space Tom Dial <tddial@comcast.net> - 2021-12-13 09:20 +0100
      Re: Filesystem and free space Polyna-Maude Racicot-Summerside <debian@polynamaude.com> - 2021-12-13 20:20 +0100
  Re: Filesystem and free space Jonathan Dowland <jon+debian-user@dow.land> - 2021-12-13 13:20 +0100

csiph-web