Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Quota management in Debian

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
User avatar
Danielsan
Posts: 659
Joined: 2010-10-10 22:36
Has thanked: 5 times

Quota management in Debian

#1 Post by Danielsan »

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
NFT5
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 598
Joined: 2014-10-10 11:38
Location: Canberra, Australia
Has thanked: 10 times
Been thanked: 43 times

Re: Quota management in Debian

#2 Post by NFT5 »

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
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Quota management in Debian

#3 Post by Head_on_a_Stick »

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
deadbang

User avatar
Danielsan
Posts: 659
Joined: 2010-10-10 22:36
Has thanked: 5 times

Re: Quota management in Debian

#4 Post by Danielsan »

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:

CwF
Global Moderator
Global Moderator
Posts: 2685
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 196 times

Re: Quota management in Debian

#5 Post by CwF »

Why bother, single partition works fine.

Synaptic can manage the apt cache by itself.

User avatar
NFT5
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 598
Joined: 2014-10-10 11:38
Location: Canberra, Australia
Has thanked: 10 times
Been thanked: 43 times

Re: Quota management in Debian

#6 Post by NFT5 »

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
Danielsan
Posts: 659
Joined: 2010-10-10 22:36
Has thanked: 5 times

Re: Quota management in Debian

#7 Post by Danielsan »

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
NFT5
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 598
Joined: 2014-10-10 11:38
Location: Canberra, Australia
Has thanked: 10 times
Been thanked: 43 times

Re: Quota management in Debian

#8 Post by NFT5 »

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.

Post Reply