Book Image

Containerization with LXC

By : Konstantin Ivanov
Book Image

Containerization with LXC

By: Konstantin Ivanov

Overview of this book

In recent years, containers have gained wide adoption by businesses running a variety of application loads. This became possible largely due to the advent of kernel namespaces and better resource management with control groups (cgroups). Linux containers (LXC) are a direct implementation of those kernel features that provide operating system level virtualization without the overhead of a hypervisor layer. This book starts by introducing the foundational concepts behind the implementation of LXC, then moves into the practical aspects of installing and configuring LXC containers. Moving on, you will explore container networking, security, and backups. You will also learn how to deploy LXC with technologies like Open Stack and Vagrant. By the end of the book, you will have a solid grasp of how LXC is implemented and how to run production applications in a highly available and scalable way.
Table of Contents (17 chapters)
Containerization with LXC
About the Author
About the Reviewer
Customer Feedback

Using the Btrfs backing store

The B-tree filesystem (Btrfs) is a COW filesystem that provides modern features such as dynamic inode allocation, compression, and online filesystem defragmentation - and most importantly for the purposes of this book, writable and read-only snapshots.

Without going into much detail about the design of Btrfs, the following diagram shows the main components of the filesystem:

Each Btrfs filesystem consists of a Btrfs Root Tree, which records the root block for the Extent Tree and Subvolume Tree. The root block pointers are updated with each transaction, to point to the new roots created by the transaction. The Extent Tree shown in the preceding diagram manages disk space and contains information about the blocks on the device. The Subvolume Tree record snapshots, which are subvolumes.

Note that subvolumes are different than the LVs in the LVM, in the sense that the Btrfs subvolume is not an actual block device.

Let's look at a few examples on how to use the Btrfs...