Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quota & Setquota #7

Merged
merged 15 commits into from
May 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
"rutorrent",
"sabnzbd",
"scgi",
"setdisk",
"setquota",
"sharedserver",
"shellinabox",
"sickchill",
Expand Down
28 changes: 28 additions & 0 deletions docs/applications/quota.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
id: quota
title: Quota
sidebar_label: Quota
---
This application installs the necessary dependencies to use the Quota system.

An administrator can use this utility to restrict how much disk space can each user fill, using a soft and a hard limit.

## Installation

You can install the quota application by running the following command.

```bash
box install quota
```

## Setup

As part of the installation you will be asked which drive to use fo the quota functionality. This is due to the fact that quota works on a per-disk basis.

If you are unsure which partition to use, please refer to the help printed into the terminal during the installation.

## Management

The quotas can be managed either using the (Webmin application)[webmin.md], or through the command line using the (setquota)[setquota.md] script.

All users can see their quota standing by running `quota -s`.
7 changes: 5 additions & 2 deletions docs/getting-started/faqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,17 @@ sudo tune2fs -m 1 /dev/sda3

Will reserve 1% instead.

It's unlikely that the partiton on *your* server is sda3, so you'll need to use the command `lsblk` to determine which partition exactly to modify.
It's unlikely that the partition on *your* server is sda3, so you'll need to use the command `lsblk` to determine which partition exactly to modify.

## The dashboard states I have 0 out of 0 remaining disk space. What's going on?

Did you install the `quota` package? You need to use the command `setquota` to define the limits per user. The default is undefined.
Did you install the `quota` package? You need to use the [`setquota`](setquota) script to define the limits per user. The default quota is undefined, which is the source of this error.

If you just installed every package just because and you don't actually need quotas, feel free to remove the package with `box remove quota`

## RuTorrent says I have no space left on my disk

Please see the chapter above.

## Application XYZ is not running! Everything is broken! What do I do?
Please consult the [Troubleshooting](/guides/troubleshooting) guide for more information.
Expand Down
38 changes: 38 additions & 0 deletions docs/scripts/setquota.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
id: setquota
title: setquota
sidebar_label: setquota
---

This script helps setting quotas to users in an easy manner.

It is run during the `box adduser` command as well.

By default, the master user does not have a quota set which can result in odd UI behavior. You can use this command to rectify such issues. Please consider if you truly need the quota functionality if you are the sole user of a machine.

## Format for the size.

You can specify the format in one of the following formats:
- Specific size
- Available units are MBs, GBs and TBs.
- This format does not allow for decimals, therefore only `12GB`, `123456MB` or etc. will work; not `12.3GB`, `1.45TB` etc.
- Maximum
- This will retrieve the disk that quotas are set on, and set the maximum.
- **Please note the following caveats**:
- This size can be slightly larger than what the disk can actually store due to how partitioning works.
- The "Available" is purely a subtraction of the user's used space minus the quota, therefore it does not take into account space used by anything else other than the user.

## Running interactively

You can run `sudo setquota` and specify the user and size interactively on the command line.

## Running with parameters

`setquota` also runs non-interactively. You can set the user as the first argument, and the size as described above as an optional second argument.

```bash
#Set size interactively
sudo setdisk user1
#Set size as parameter
sudo setdisk user1 20GB
```
121 changes: 62 additions & 59 deletions website/sidebars.json
Original file line number Diff line number Diff line change
@@ -1,61 +1,64 @@
{
"docs": {
"Getting Started": [
"installation",
"getting-started/how-do-i-connect",
"getting-started/box-basics",
"getting-started/faqs"
],
"Applications": [
"applications/autodl",
"applications/bazarr",
"applications/btsync",
"applications/couchpotato",
"applications/csf",
"applications/deluge",
"applications/emby",
"applications/ffmpeg",
"applications/flood",
"applications/headphones",
"applications/jackett",
"applications/letsencrypt",
"applications/lidarr",
"applications/lounge",
"applications/medusa",
"applications/netdata",
"applications/nextcloud",
"applications/nginx",
"applications/nzbget",
"applications/nzbhydra",
"applications/ombi",
"applications/panel",
"applications/plex",
"applications/pyload",
"applications/quassel",
"applications/quota",
"applications/radarr",
"applications/rapidleech",
"applications/rclone",
"applications/rtorrent",
"applications/rutorrent",
"applications/sabnzbd",
"applications/shellinabox",
"applications/sickchill",
"applications/sickgear",
"applications/sonarr",
"applications/subsonic",
"applications/syncthing",
"applications/tautulli",
"applications/transmission",
"applications/vsftpd",
"applications/wireguard",
"applications/x2go",
"applications/xmr-stak",
"applications/znc"
],
"Guides": [
"guides/dist-upgrade",
"guides/troubleshooting"
]
}
"docs": {
"Getting Started": [
"installation",
"getting-started/how-do-i-connect",
"getting-started/box-basics",
"getting-started/faqs"
],
"Applications": [
"applications/autodl",
"applications/bazarr",
"applications/btsync",
"applications/couchpotato",
"applications/csf",
"applications/deluge",
"applications/emby",
"applications/ffmpeg",
"applications/flood",
"applications/headphones",
"applications/jackett",
"applications/letsencrypt",
"applications/lidarr",
"applications/lounge",
"applications/medusa",
"applications/netdata",
"applications/nextcloud",
"applications/nginx",
"applications/nzbget",
"applications/nzbhydra",
"applications/ombi",
"applications/panel",
"applications/plex",
"applications/pyload",
"applications/quassel",
"applications/quota",
"applications/radarr",
"applications/rapidleech",
"applications/rclone",
"applications/rtorrent",
"applications/rutorrent",
"applications/sabnzbd",
"applications/shellinabox",
"applications/sickchill",
"applications/sickgear",
"applications/sonarr",
"applications/subsonic",
"applications/syncthing",
"applications/tautulli",
"applications/transmission",
"applications/vsftpd",
"applications/wireguard",
"applications/x2go",
"applications/xmr-stak",
"applications/znc"
],
"Guides": [
"guides/dist-upgrade",
"guides/troubleshooting"
],
"Helper Scripts": [
"scripts/setquota"
]
}
}