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
Truth be told, it’s difficult for a web application that doesn’t have some kind of identification, even if you don’t see it as a security measure in and of itself. The Internet is a kind of lawless land, and even on free services like Google’s, authentication ensures that abuses will...
Although data persistence is almost always a fundamental element of applications, Node.js has no native integration with databases. Everything is delegated to third-party libraries to be included manually, in addition to the standard APIs. Although MongoDB and other non-relational databases are the most common choice with Node because if you...