pct: add auto-generated mount point docs
authorDietmar Maurer <dietmar@proxmox.com>
Sat, 7 May 2016 12:15:22 +0000 (14:15 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Sat, 7 May 2016 12:15:22 +0000 (14:15 +0200)
Makefile
gen-pct-mountpoint-opts.pl [new file with mode: 0755]
pct-mountpoint-opts.adoc [new file with mode: 0644]
pct.adoc
pve-doc-generator.mk

index f876cd9..4dbb2e0 100644 (file)
--- 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 (executable)
index 0000000..4fd6964
--- /dev/null
@@ -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 (file)
index 0000000..45bd0ba
--- /dev/null
@@ -0,0 +1,32 @@
+`rootfs`: `[volume=]<volume> [,acl=<acl>] [,backup=<[1|0]>] [,quota=<[0|1]>] [,ro=<ro>] [,size=<DiskSize>]`
+
+`mp[n]`: `mp=<Path>, [volume=]<volume> [,acl=<acl>] [,backup=<[1|0]>] [,quota=<[0|1]>] [,ro=<ro>] [,size=<DiskSize>]`
+
+`acl`: `<acl>` ::
+
+Explicitly enable or disable ACL support.
+
+`backup`: `<[1|0]>` ::
+
+Whether to include the mountpoint in backups.
+
+`mp`: `<Path>` ::
+
+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`: `<ro>` ::
+
+Read-only mountpoint (not supported with bind mounts)
+
+`size`: `<DiskSize>` ::
+
+Volume size (read only value).
+
+`volume`: `<volume>` ::
+
+Volume, device or directory to mount into the container.
+
index 0b69db1..21dc018 100644 (file)
--- 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
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
index 98bf3e7..a8a7d4d 100644 (file)
@@ -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=                 \