From b0df9949dc61097766f1f1558910b913c352b20f Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Fri, 14 Feb 2020 17:55:02 +0100 Subject: [PATCH] pct: move "CT storage" below "guest OS" Signed-off-by: Thomas Lamprecht --- pct.adoc | 212 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 107 insertions(+), 105 deletions(-) diff --git a/pct.adoc b/pct.adoc index 3b3f5f5..aaa100b 100644 --- a/pct.adoc +++ b/pct.adoc @@ -168,111 +168,6 @@ delete that image later with: # pveam remove local:vztmpl/debian-10.0-standard_10.0-1_amd64.tar.gz ---- -[[pct_container_storage]] -Container Storage ------------------ - -The {pve} LXC container storage model is more flexible than traditional -container storage models. A container can have multiple mount points. This -makes it possible to use the best suited storage for each application. - -For example the root file system of the container can be on slow and cheap -storage while the database can be on fast and distributed storage via a second -mount point. See section <> for further -details. - -Any storage type supported by the {pve} storage library can be used. This means -that containers can be stored on local (for example `lvm`, `zfs` or directory), -shared external (like `iSCSI`, `NFS`) or even distributed storage systems like -Ceph. Advanced storage features like snapshots or clones can be used if the -underlying storage supports them. The `vzdump` backup tool can use snapshots to -provide consistent container backups. - -Furthermore, local devices or local directories can be mounted directly using -'bind mounts'. This gives access to local resources inside a container with -practically zero overhead. Bind mounts can be used as an easy way to share data -between containers. - - -FUSE Mounts -~~~~~~~~~~~ - -WARNING: Because of existing issues in the Linux kernel's freezer subsystem the -usage of FUSE mounts inside a container is strongly advised against, as -containers need to be frozen for suspend or snapshot mode backups. - -If FUSE mounts cannot be replaced by other mounting mechanisms or storage -technologies, it is possible to establish the FUSE mount on the Proxmox host -and use a bind mount point to make it accessible inside the container. - - -Using Quotas Inside Containers -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Quotas allow to set limits inside a container for the amount of disk space that -each user can use. - -NOTE: This only works on ext4 image based storage types and currently only -works with privileged containers. - -Activating the `quota` option causes the following mount options to be used for -a mount point: -`usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0` - -This allows quotas to be used like on any other system. You can initialize the -`/aquota.user` and `/aquota.group` files by running: - ----- -# quotacheck -cmug / -# quotaon / ----- - -Then edit the quotas using the `edquota` command. Refer to the documentation of -the distribution running inside the container for details. - -NOTE: You need to run the above commands for every mount point by passing the -mount point's path instead of just `/`. - - -Using ACLs Inside Containers -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The standard Posix **A**ccess **C**ontrol **L**ists are also available inside -containers. ACLs allow you to set more detailed file ownership than the -traditional user/group/others model. - - -Backup of Container mount points -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -To include a mount point in backups, enable the `backup` option for it in the -container configuration. For an existing mount point `mp0` - ----- -mp0: guests:subvol-100-disk-1,mp=/root/files,size=8G ----- - -add `backup=1` to enable it. - ----- -mp0: guests:subvol-100-disk-1,mp=/root/files,size=8G,backup=1 ----- - -NOTE: When creating a new mount point in the GUI, this option is enabled by -default. - -To disable backups for a mount point, add `backup=0` in the way described -above, or uncheck the *Backup* checkbox on the GUI. - -Replication of Containers mount points -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -By default, additional mount points are replicated when the Root Disk is -replicated. If you want the {pve} storage replication mechanism to skip a mount -point, you can set the *Skip replication* option for that mount point. -As of {pve} 5.0, replication requires a storage of type `zfspool`. Adding a -mount point to a different type of storage when the container has replication -configured requires to have *Skip replication* enabled for that mount point. [[pct_settings]] Container Settings @@ -655,6 +550,113 @@ NOTE: Container start fails if the configured `ostype` differs from the auto detected type. +[[pct_container_storage]] +Container Storage +----------------- + +The {pve} LXC container storage model is more flexible than traditional +container storage models. A container can have multiple mount points. This +makes it possible to use the best suited storage for each application. + +For example the root file system of the container can be on slow and cheap +storage while the database can be on fast and distributed storage via a second +mount point. See section <> for further +details. + +Any storage type supported by the {pve} storage library can be used. This means +that containers can be stored on local (for example `lvm`, `zfs` or directory), +shared external (like `iSCSI`, `NFS`) or even distributed storage systems like +Ceph. Advanced storage features like snapshots or clones can be used if the +underlying storage supports them. The `vzdump` backup tool can use snapshots to +provide consistent container backups. + +Furthermore, local devices or local directories can be mounted directly using +'bind mounts'. This gives access to local resources inside a container with +practically zero overhead. Bind mounts can be used as an easy way to share data +between containers. + + +FUSE Mounts +~~~~~~~~~~~ + +WARNING: Because of existing issues in the Linux kernel's freezer subsystem the +usage of FUSE mounts inside a container is strongly advised against, as +containers need to be frozen for suspend or snapshot mode backups. + +If FUSE mounts cannot be replaced by other mounting mechanisms or storage +technologies, it is possible to establish the FUSE mount on the Proxmox host +and use a bind mount point to make it accessible inside the container. + + +Using Quotas Inside Containers +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Quotas allow to set limits inside a container for the amount of disk space that +each user can use. + +NOTE: This only works on ext4 image based storage types and currently only +works with privileged containers. + +Activating the `quota` option causes the following mount options to be used for +a mount point: +`usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0` + +This allows quotas to be used like on any other system. You can initialize the +`/aquota.user` and `/aquota.group` files by running: + +---- +# quotacheck -cmug / +# quotaon / +---- + +Then edit the quotas using the `edquota` command. Refer to the documentation of +the distribution running inside the container for details. + +NOTE: You need to run the above commands for every mount point by passing the +mount point's path instead of just `/`. + + +Using ACLs Inside Containers +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The standard Posix **A**ccess **C**ontrol **L**ists are also available inside +containers. ACLs allow you to set more detailed file ownership than the +traditional user/group/others model. + + +Backup of Container mount points +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To include a mount point in backups, enable the `backup` option for it in the +container configuration. For an existing mount point `mp0` + +---- +mp0: guests:subvol-100-disk-1,mp=/root/files,size=8G +---- + +add `backup=1` to enable it. + +---- +mp0: guests:subvol-100-disk-1,mp=/root/files,size=8G,backup=1 +---- + +NOTE: When creating a new mount point in the GUI, this option is enabled by +default. + +To disable backups for a mount point, add `backup=0` in the way described +above, or uncheck the *Backup* checkbox on the GUI. + +Replication of Containers mount points +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +By default, additional mount points are replicated when the Root Disk is +replicated. If you want the {pve} storage replication mechanism to skip a mount +point, you can set the *Skip replication* option for that mount point. +As of {pve} 5.0, replication requires a storage of type `zfspool`. Adding a +mount point to a different type of storage when the container has replication +configured requires to have *Skip replication* enabled for that mount point. + + Backup and Restore ------------------ -- 2.39.2