]> git.proxmox.com Git - pve-docs.git/blame - pmxcfs.adoc
pmxcfs: fix wrong information now covered in pvecm
[pve-docs.git] / pmxcfs.adoc
CommitLineData
bd88f9d9 1ifdef::manvolnum[]
b2f242ab
DM
2pmxcfs(8)
3=========
bd88f9d9 4include::attributes.txt[]
5f09af76
DM
5:pve-toplevel:
6
bd88f9d9
DM
7NAME
8----
9
10pmxcfs - Proxmox Cluster File System
11
49a5e11c 12SYNOPSIS
bd88f9d9
DM
13--------
14
54079101 15include::pmxcfs.8-synopsis.adoc[]
bd88f9d9
DM
16
17DESCRIPTION
18-----------
19endif::manvolnum[]
20
21ifndef::manvolnum[]
22Proxmox Cluster File System (pmxcfs)
ac1e3896 23====================================
bd88f9d9 24include::attributes.txt[]
5f09af76 25:pve-toplevel:
194d2f29 26endif::manvolnum[]
5f09af76 27
8c1189b6 28The Proxmox Cluster file system (``pmxcfs'') is a database-driven file
ac1e3896 29system for storing configuration files, replicated in real time to all
8c1189b6 30cluster nodes using `corosync`. We use this to store all PVE related
ac1e3896
DM
31configuration files.
32
33Although the file system stores all data inside a persistent database
34on disk, a copy of the data resides in RAM. That imposes restriction
5eba0743 35on the maximum size, which is currently 30MB. This is still enough to
ac1e3896
DM
36store the configuration of several thousand virtual machines.
37
960f6344 38This system provides the following advantages:
ac1e3896
DM
39
40* seamless replication of all configuration to all nodes in real time
41* provides strong consistency checks to avoid duplicate VM IDs
a8e99754 42* read-only when a node loses quorum
ac1e3896
DM
43* automatic updates of the corosync cluster configuration to all nodes
44* includes a distributed locking mechanism
45
5eba0743 46
ac1e3896 47POSIX Compatibility
960f6344 48-------------------
ac1e3896
DM
49
50The file system is based on FUSE, so the behavior is POSIX like. But
51some feature are simply not implemented, because we do not need them:
52
53* you can just generate normal files and directories, but no symbolic
54 links, ...
55
56* you can't rename non-empty directories (because this makes it easier
57 to guarantee that VMIDs are unique).
58
59* you can't change file permissions (permissions are based on path)
60
61* `O_EXCL` creates were not atomic (like old NFS)
62
63* `O_TRUNC` creates are not atomic (FUSE restriction)
64
65
5eba0743 66File Access Rights
960f6344 67------------------
ac1e3896 68
8c1189b6
FG
69All files and directories are owned by user `root` and have group
70`www-data`. Only root has write permissions, but group `www-data` can
ac1e3896
DM
71read most files. Files below the following paths:
72
73 /etc/pve/priv/
74 /etc/pve/nodes/${NAME}/priv/
75
76are only accessible by root.
77
960f6344 78
ac1e3896
DM
79Technology
80----------
81
82We use the http://www.corosync.org[Corosync Cluster Engine] for
83cluster communication, and http://www.sqlite.org[SQlite] for the
5eba0743 84database file. The file system is implemented in user space using
ac1e3896
DM
85http://fuse.sourceforge.net[FUSE].
86
5eba0743 87File System Layout
ac1e3896
DM
88------------------
89
90The file system is mounted at:
91
92 /etc/pve
93
94Files
95~~~~~
96
97[width="100%",cols="m,d"]
98|=======
8c1189b6
FG
99|`corosync.conf` | Corosync cluster configuration file (previous to {pve} 4.x this file was called cluster.conf)
100|`storage.cfg` | {pve} storage configuration
101|`datacenter.cfg` | {pve} datacenter wide configuration (keyboard layout, proxy, ...)
102|`user.cfg` | {pve} access control configuration (users/groups/...)
103|`domains.cfg` | {pve} authentication domains
104|`authkey.pub` | Public key used by ticket system
105|`pve-root-ca.pem` | Public certificate of cluster CA
106|`priv/shadow.cfg` | Shadow password file
107|`priv/authkey.key` | Private key used by ticket system
108|`priv/pve-root-ca.key` | Private key of cluster CA
109|`nodes/<NAME>/pve-ssl.pem` | Public SSL certificate for web server (signed by cluster CA)
110|`nodes/<NAME>/pve-ssl.key` | Private SSL key for `pve-ssl.pem`
111|`nodes/<NAME>/pveproxy-ssl.pem` | Public SSL certificate (chain) for web server (optional override for `pve-ssl.pem`)
112|`nodes/<NAME>/pveproxy-ssl.key` | Private SSL key for `pveproxy-ssl.pem` (optional)
113|`nodes/<NAME>/qemu-server/<VMID>.conf` | VM configuration data for KVM VMs
114|`nodes/<NAME>/lxc/<VMID>.conf` | VM configuration data for LXC containers
115|`firewall/cluster.fw` | Firewall configuration applied to all nodes
116|`firewall/<NAME>.fw` | Firewall configuration for individual nodes
117|`firewall/<VMID>.fw` | Firewall configuration for VMs and Containers
ac1e3896
DM
118|=======
119
5eba0743 120
ac1e3896
DM
121Symbolic links
122~~~~~~~~~~~~~~
123
124[width="100%",cols="m,m"]
125|=======
8c1189b6
FG
126|`local` | `nodes/<LOCAL_HOST_NAME>`
127|`qemu-server` | `nodes/<LOCAL_HOST_NAME>/qemu-server/`
128|`lxc` | `nodes/<LOCAL_HOST_NAME>/lxc/`
ac1e3896
DM
129|=======
130
5eba0743 131
ac1e3896
DM
132Special status files for debugging (JSON)
133~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
134
135[width="100%",cols="m,d"]
136|=======
8c1189b6
FG
137|`.version` |File versions (to detect file modifications)
138|`.members` |Info about cluster members
139|`.vmlist` |List of all VMs
140|`.clusterlog` |Cluster log (last 50 entries)
141|`.rrd` |RRD data (most recent entries)
ac1e3896
DM
142|=======
143
5eba0743 144
ac1e3896
DM
145Enable/Disable debugging
146~~~~~~~~~~~~~~~~~~~~~~~~
147
148You can enable verbose syslog messages with:
149
150 echo "1" >/etc/pve/.debug
151
152And disable verbose syslog messages with:
153
154 echo "0" >/etc/pve/.debug
155
156
157Recovery
158--------
159
160If you have major problems with your Proxmox VE host, e.g. hardware
161issues, it could be helpful to just copy the pmxcfs database file
8c1189b6 162`/var/lib/pve-cluster/config.db` and move it to a new Proxmox VE
ac1e3896 163host. On the new host (with nothing running), you need to stop the
8c1189b6
FG
164`pve-cluster` service and replace the `config.db` file (needed permissions
165`0600`). Second, adapt `/etc/hostname` and `/etc/hosts` according to the
166lost Proxmox VE host, then reboot and check. (And don't forget your
ac1e3896
DM
167VM/CT data)
168
5eba0743 169
ac1e3896
DM
170Remove Cluster configuration
171~~~~~~~~~~~~~~~~~~~~~~~~~~~~
172
173The recommended way is to reinstall the node after you removed it from
174your cluster. This makes sure that all secret cluster/ssh keys and any
175shared configuration data is destroyed.
176
38ae8db3
TL
177In some cases, you might prefer to put a node back to local mode without
178reinstall, which is described in
179<<pvecm_separate_node_without_reinstall,Separate A Node Without Reinstalling>>
bd88f9d9
DM
180
181ifdef::manvolnum[]
182include::pve-copyright.adoc[]
183endif::manvolnum[]