Quota support is one of the most important features of LXC. When you want to give multiple users access to a LXC container and control disk space then quota's will be used. You can also use quota's to manage disk space for web hosting servers.
In this post, we will shows you, how to use quota's on lxc container using qemu nbd with a qcow image file on Debian 8.
A server running Debian-8 operating system.
A Non-root user account with sudo privilege set up on your server.
Installing Required Packages
First, you will need to install the lxc and qemu utilities. You can simply install it by running the following command:
sudo apt-get install lxc qemu-utils
Once the package is installed, you need to check whether the kernel loop module is loaded or not with the following command:
sudo lsmod | grep '^loop'
If you don't see any output, you can enable the module by running the following command:
sudo modprobe loop
Creating a Virtual Machine
Now, let's start by creating a virtual machine. In this example, we will use Debian Jessie for both the host and the container. But, you can also use any other distro as you wish.
The -t arguement specifies the main template. The -r specifies name of the release you want to use. The --fssize arguement specifies the size of the had disk and the -n arguement define the nama of the virtual machine.
Also, you need to convert the disk image to the qemu qcow2 format with the following command:
# Common configuration
lxc.include = /usr/share/lxc/config/debian.common.conf
# only if bridge is set up (or use other method)
lxc.network.type = veth
lxc.network.name = veth0
lxc.network.flags = up
lxc.network.link = br0
lxc.network.ipv4 = 192.168.1.100/24
lxc.network.ipv4.gateway = 0.0.0.0
If you find your cPanel disk space filling up, or an email address has hit its disk space quota, cPanel has a helpful built in Email Disk Usage tool. This will provide you with a simple to understand breakdown of how much disk space each folder for a particular email...
Although WHM will normally automatically keep itself up to date, you may want to manually check for server updates / push through an update that is pending, or it may be that you have automatic updates switched off on your cPanel server. In this guide we will show you how...
You may sometimes need to manually adjust the PHP settings on your cPanel server – for example if a site is hitting the PHP memory, or file size upload limit. WHM allows you to quickly change the settings of any PHP version installed on the server when needed, using the...