28.2.2 Setting up the File System for the Containers

Note

The LXC template scripts assume that containers are created in /container. You must edit the script if your system's configuration differs from this assumption.

To set up the /container file system:

  1. Create a btrfs file system on a suitably sized device such as /dev/sdb.

    [root@host ~]# mkfs.btrfs /dev/sdb

  2. Mount the /container file system. The /container directory is created automatically when you install LXC.

    [root@host ~]# mount /dev/sdb /container

  3. Add an entry for /container to the /etc/fstab file.

    /dev/sdb      /container    btrfs    defaults   0 0

For more information, see Section 21.2, “About the Btrfs File System”.