27.2.2 Setting up the File System for the Containers


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, and create the /container mount point.

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

  2. Mount the /container file system.

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

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

    /dev/sdb      /container    btrfs    defaults   0 0