Quota management in Debian

Kernels & Hardware, configuring network, installing services

Quota management in Debian

Postby Danielsan » 2021-01-13 14:46

Hi Guys,

I have to setup a new computer for my brother, the other times I always created separated partitions but recently I am not using it anymore. Personally I am using BTRFS and subvolumes but in case of my brother, since I verified that even him is unable to break Debian -- he did just once because the root partition was filled by old deb archive in /var but "apt clean" fixed the issue", my idea is to install everything in one EXT4 partition (Windows style), use a swap file, but limiting the amount of quota for its user in order to have enough space for the system. It is not like a partition but with this method I should avoid to have issues with the regular tasks of the system.

In that regard I found this tutorial on Digital Ocean and I would like to know you opinions over it and if you want also in my main general idea:
https://www.digitalocean.com/community/ ... n-debian-9

Thanks in advance,

D.
User avatar
Danielsan
 
Posts: 610
Joined: 2010-10-10 22:36

Re: Quota management in Debian

Postby NFT5 » 2021-01-13 18:50

A full installation of Debian, with DE and all the fruit is going to run 10-12GB. So, one partition of 20GB for /root.

Another partition for swap, size at RAM +10%.

All the rest for /home.

Quotas are for multiple user situations. For a single user the above is simple and easy as well as having the advantage of keeping system and data files separate while the size of /root is limited by a fairly generous partition size.

I hope you're setting up a partition or drive for automated backups.
User avatar
NFT5
 
Posts: 410
Joined: 2014-10-10 11:38
Location: Canberra, Australia

Re: Quota management in Debian

Postby Head_on_a_Stick » 2021-01-13 19:29

NFT5 wrote:one partition of 20GB for /root

Why would root's home directory need 20GiB? Or do you mean "/" (the root partition)?

NFT5 wrote:Another partition for swap, size at RAM +10%.

I don't think you need more swap than RAM, even for hibernation. But I agree with using a partition rather than a swapfile.

@OP: the quota system you describe would not stop the system from filling the drive with .deb archives. If you use unattended-upgrades then see the comments at the top of /usr/lib/apt/apt.systemd.daily
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 13062
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Quota management in Debian

Postby Danielsan » 2021-01-13 21:30

For my cases and observing my brother behavior we need something between 40 / 50 GB of "/" partition...

And thanks for the hints I'll check the comments out and I'll use some "cron" task to clean up the apt cache weekly, but I saw (or maybe I just imagined it) that you liked the idea! :mrgreen:
User avatar
Danielsan
 
Posts: 610
Joined: 2010-10-10 22:36

Re: Quota management in Debian

Postby CwF » 2021-01-13 23:38

Why bother, single partition works fine.

Synaptic can manage the apt cache by itself.
CwF
 
Posts: 881
Joined: 2018-06-20 15:16

Re: Quota management in Debian

Postby NFT5 » 2021-01-14 01:21

Head_on_a_Stick wrote:Or do you mean "/" (the root partition)?


Errr, yes. :oops:

Danielsan wrote:For my cases and observing my brother behavior we need something between 40 / 50 GB of "/" partition...


Wow! Biggest installation I have is Debian 10 with Plasma and ticked every box for other software. It's only 12.5GB. Multiple DEs?
User avatar
NFT5
 
Posts: 410
Joined: 2014-10-10 11:38
Location: Canberra, Australia

Re: Quota management in Debian

Postby Danielsan » 2021-01-14 04:29

NFT5 wrote:Wow! Biggest installation I have is Debian 10 with Plasma and ticked every box for other software. It's only 12.5GB. Multiple DEs?


Well we also use Flatpak for some application like Zoom and other closed garbage, we also use a swap file, sometimes I noticed that for certain operation like compiling or ripping a DVD you need a lot of space in /tmp, I also use a lot VMs that I leave in /VAR by default. There were moment that I almost filling 50GB of / partition for various reasons that I forgot... :oops:
User avatar
Danielsan
 
Posts: 610
Joined: 2010-10-10 22:36

Re: Quota management in Debian

Postby NFT5 » 2021-01-14 10:02

Fair enough.

Just my opinion but I think a separate partition for swap works better. I consider VMs as data, not operating system, so keep them in their own folder in /home. Flatpacks are different so you'd need to allow for those, of course. I've run systems where the / partition is barely bigger than the space used and never had an issue copying DVDs. These days, nothing less than 8GB RAM in notebooks and 16GB minimum in desktops means I have 30GB to play with before even going near the HDD.
User avatar
NFT5
 
Posts: 410
Joined: 2014-10-10 11:38
Location: Canberra, Australia


Return to System configuration

Who is online

Users browsing this forum: No registered users and 12 guests

fashionable