From fe154a4fa363429b275be49d71dac954767030e6 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Sat, 7 May 2016 14:15:22 +0200 Subject: [PATCH] pct: add auto-generated mount point docs --- Makefile | 3 ++- gen-pct-mountpoint-opts.pl | 23 +++++++++++++++++++++++ pct-mountpoint-opts.adoc | 32 ++++++++++++++++++++++++++++++++ pct.adoc | 11 +++++++++++ pve-doc-generator.mk | 1 + 5 files changed, 69 insertions(+), 1 deletion(-) create mode 100755 gen-pct-mountpoint-opts.pl create mode 100644 pct-mountpoint-opts.adoc diff --git a/Makefile b/Makefile index f876cd9..4dbb2e0 100644 --- a/Makefile +++ b/Makefile @@ -87,6 +87,7 @@ GEN_SCRIPTS= \ gen-datacenter.cfg.5-opts.pl \ gen-pct.conf.5-opts.pl \ gen-pct-network-opts.pl \ + gen-pct-mountpoint-opts.pl \ gen-qm.conf.5-opts.pl \ gen-vzdump.conf.5-opts.pl \ gen-pve-firewall-cluster-opts.pl \ @@ -271,7 +272,7 @@ upload: ${GEN_DEB} ${DOC_DEB} update: clean rm -f *.5-opts.adoc *.1-synopsis.adoc *.8-synopsis.adoc rm -f api-viewer/apidata.js - rm -f pve-firewall-macros.adoc pct-network-opts.adoc + rm -f pve-firewall-macros.adoc pct-network-opts.adoc pct-mountpoint-opts.adoc make all clean: diff --git a/gen-pct-mountpoint-opts.pl b/gen-pct-mountpoint-opts.pl new file mode 100755 index 0000000..4fd6964 --- /dev/null +++ b/gen-pct-mountpoint-opts.pl @@ -0,0 +1,23 @@ +#!/usr/bin/perl + +use lib '.'; +use strict; +use warnings; +use PVE::RESTHandler; +use PVE::LXC::Config; + +my $prop = PVE::LXC::Config->json_config_properties(); + +my $rootfs_prop = $prop->{rootfs}; + +my $mp_prop = $prop->{mp0}; + +my $typetext = PVE::PodParser::schema_get_type_text($rootfs_prop); + +print "`rootfs`: `$typetext`\n\n"; + +$typetext = PVE::PodParser::schema_get_type_text($mp_prop); + +print "`mp[n]`: `$typetext`\n\n"; + +print PVE::RESTHandler::dump_properties($mp_prop->{format}); diff --git a/pct-mountpoint-opts.adoc b/pct-mountpoint-opts.adoc new file mode 100644 index 0000000..45bd0ba --- /dev/null +++ b/pct-mountpoint-opts.adoc @@ -0,0 +1,32 @@ +`rootfs`: `[volume=] [,acl=] [,backup=<[1|0]>] [,quota=<[0|1]>] [,ro=] [,size=]` + +`mp[n]`: `mp=, [volume=] [,acl=] [,backup=<[1|0]>] [,quota=<[0|1]>] [,ro=] [,size=]` + +`acl`: `` :: + +Explicitly enable or disable ACL support. + +`backup`: `<[1|0]>` :: + +Whether to include the mountpoint in backups. + +`mp`: `` :: + +Path to the mountpoint as seen from inside the container. + +`quota`: `<[0|1]>` :: + +Enable user quotas inside the container (not supported with zfs subvolumes) + +`ro`: `` :: + +Read-only mountpoint (not supported with bind mounts) + +`size`: `` :: + +Volume size (read only value). + +`volume`: `` :: + +Volume, device or directory to mount into the container. + diff --git a/pct.adoc b/pct.adoc index 0b69db1..21dc018 100644 --- a/pct.adoc +++ b/pct.adoc @@ -357,6 +357,17 @@ mounting mechanisms or storage technologies, it is possible to establish the FUSE mount on the Proxmox host and use a bind mountpoint to make it accessible inside the container. +The root mountpoint is configured with the 'rootfs' property, and you can +configure up to 10 additional mount points. The corresponding options +are called 'mp0' to 'mp9', and they can contain the following setting: + +include::pct-mountpoint-opts.adoc[] + +.Typical Container 'rootfs' configuration +---- +rootfs: thin1:base-100-disk-1,size=8G +---- + Using quotas inside containers ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/pve-doc-generator.mk b/pve-doc-generator.mk index 98bf3e7..a8a7d4d 100644 --- a/pve-doc-generator.mk +++ b/pve-doc-generator.mk @@ -58,6 +58,7 @@ PCT_MAN1_SOURCES= \ pct.adoc \ pct.1-synopsis.adoc \ pct-network-opts.adoc \ + pct-mountpoint-opts.adoc \ ${PVE_COMMON_DOC_SOURCES} PCT_CONF_MAN5_SOURCES= \ -- 2.39.2