.\" Automatically generated by Pandoc 2.9.2.1 .\" .TH "" "" "2023-05-26" "PMDK - " "PMDK Programmer's Manual" .hy .\" SPDX-License-Identifier: BSD-3-Clause .\" Copyright 2017-2022, Intel Corporation .SH NAME .PP poolset - persistent memory pool configuration file format .SH SYNOPSIS .IP .nf \f[C] mypool.set \f[R] .fi .SH DESCRIPTION .PP Depending on the configuration of the system, the available non-volatile memory space may be divided into multiple memory devices. In such case, the maximum size of the transactional object store could be limited by the capacity of a single memory device. Therefore, \f[B]libpmemobj\f[R](7), \f[B]libpmemblk\f[R](7) and \f[B]libpmemlog\f[R](7) allow building object stores spanning multiple memory devices by creation of persistent memory pools consisting of multiple files, where each part of such a \f[I]pool set\f[R] may be stored on a different pmem-aware filesystem. .PP To improve reliability and eliminate single point of failure, \f[B]libpmemobj\f[R](7) also allows all the data written to a persistent memory pool to be copied to local pool \f[I]replicas\f[R], thereby providing backup for the persistent memory pool by producing a \f[I]mirrored pool set\f[R]. In practice, the pool replicas may be considered as binary copies of the \[lq]master\[rq] pool set. Data replication is not supported in \f[B]libpmemblk\f[R](7) and \f[B]libpmemlog\f[R](7). .PP The \f[I]set\f[R] file for each type of pool is a plain text file. Lines in the file are formatted as follows: .IP \[bu] 2 The first line of the file must be the literal string \[lq]PMEMPOOLSET\[rq] .IP \[bu] 2 The pool parts are specified, one per line, in the format: .RS 2 .PP \f[I]size\f[R] \f[I]pathname\f[R] .RE .IP \[bu] 2 \f[I]Replica\f[R] sections, if any, start with the literal string \[lq]REPLICA\[rq]. See \f[B]REPLICAS\f[R], below, for further details. .IP \[bu] 2 Pool set options, if any, start with literal string \f[I]OPTION\f[R]. See \f[B]POOL SET OPTIONS\f[R] below for details. .IP \[bu] 2 Lines starting with \[lq]#\[rq] are considered comments and are ignored. .PP The \f[I]size\f[R] must be compliant with the format specified in IEC 80000-13, IEEE 1541 or the Metric Interchange Format. These standards accept SI units with obligatory B - kB, MB, GB, \&... (multiplier by 1000) suffixes, and IEC units with optional \[lq]iB\[rq] - KiB, MiB, GiB, \&..., K, M, G, \&... - (multiplier by 1024) suffixes. .PP \f[I]pathname\f[R] must be an absolute pathname. .PP The \f[I]pathname\f[R] of a part can point to a Device DAX. Device DAX is the device-centric analogue of Filesystem DAX. It allows memory ranges to be allocated and mapped without need of an intervening file system. .PP Pools created on Device DAX have additional options and restrictions: .IP \[bu] 2 The \f[I]size\f[R] may be set to \[lq]AUTO\[rq], in which case the size of the device will be automatically resolved at pool creation time. .IP \[bu] 2 To concatenate more than one Device DAX device into a single pool set, the configured internal alignment of the devices must be 4KiB, unless the \f[I]SINGLEHDR\f[R] or \f[I]NOHDRS\f[R] option is used in the pool set file. See \f[B]POOL SET OPTIONS\f[R] below for details. .PP Please see \f[B]ndctl-create-namespace\f[R](1) for more information on Device DAX, including how to configure desired alignment. .PP The minimum file size of each part of the pool set is defined as follows: .IP \[bu] 2 For block pools, as \f[B]PMEMBLK_MIN_PART\f[R] in \f[B]\f[R] .IP \[bu] 2 For object pools, as \f[B]PMEMOBJ_MIN_PART\f[R] in \f[B]\f[R] .IP \[bu] 2 For log pools, as \f[B]PMEMLOG_MIN_PART\f[R] in \f[B]\f[R] .PP The net pool size of the pool set is equal to: .IP .nf \f[C] net_pool_size = sum_over_all_parts(page_aligned_part_size - 4KiB) + 4KiB \f[R] .fi .PP where .IP .nf \f[C] page_aligned_part_size = part_size & \[ti](page_size - 1) \f[R] .fi .PP Note that page size is OS specific. For more information please see \f[B]sysconf\f[R](3). .PP The minimum net pool size of a pool set is defined as follows: .IP \[bu] 2 For block pools, as \f[B]PMEMBLK_MIN_POOL\f[R] in \f[B]\f[R] .IP \[bu] 2 For object pools, as \f[B]PMEMOBJ_MIN_POOL\f[R] in \f[B]\f[R] .IP \[bu] 2 For log pools, as \f[B]PMEMLOG_MIN_POOL\f[R] in \f[B]\f[R] .PP Here is an example \[lq]mypool.set\[rq] file: .IP .nf \f[C] PMEMPOOLSET OPTION NOHDRS 100G /mountpoint0/myfile.part0 200G /mountpoint1/myfile.part1 400G /mountpoint2/myfile.part2 \f[R] .fi .PP The files in the set may be created by running one of the following commands. To create a block pool: .IP .nf \f[C] $ pmempool create blk mypool.set \f[R] .fi .PP To create a log pool: .IP .nf \f[C] $ pmempool create log mypool.set \f[R] .fi .SH REPLICAS .PP Sections defining replica sets are optional. There may be multiple replica sections. .PP Replica sections begin with a line containing only the literal string \[lq]REPLICA\[rq], followed by one or more pool part lines as described above. .PP Here is an example \[lq]myobjpool.set\[rq] file with replicas: .IP .nf \f[C] PMEMPOOLSET 100G /mountpoint0/myfile.part0 200G /mountpoint1/myfile.part1 400G /mountpoint2/myfile.part2 # local replica REPLICA 500G /mountpoint3/mymirror.part0 200G /mountpoint4/mymirror.part1 \f[R] .fi .PP The files in the object pool set may be created by running the following command: .IP .nf \f[C] $ pmempool create --layout=\[dq]mylayout\[dq] obj myobjpool.set \f[R] .fi .SH POOL SET OPTIONS .PP Pool set options can appear anywhere after the line with \f[I]PMEMPOOLSET\f[R] string. Pool set file can contain several pool set options. The following options are supported: .IP \[bu] 2 \f[I]SINGLEHDR\f[R] .PP If the \f[I]SINGLEHDR\f[R] option is used, only the first part in each replica contains the pool part internal metadata. In that case the effective size of a replica is the sum of sizes of all its part files decreased once by 4096 bytes. .PP When using the \f[I]SINGLEHDR\f[R] option, one can concatenate more than one Device DAX devices with any internal alignments in one replica. .PP Using the \f[I]SINGLEHDR\f[R] option has important implications for data integrity checking and recoverability in case of a pool set damage. See \f[B]pmempool_sync\f[R]() API for more information about pool set recovery. .SH DIRECTORIES .PP Providing a directory as a part\[cq]s \f[I]pathname\f[R] allows the pool to dynamically create files and consequently removes the user-imposed limit on the size of the pool. .PP The \f[I]size\f[R] argument of a part in a directory poolset becomes the size of the address space reservation required for the pool. In other words, the size argument is the maximum theoretical size of the mapping. This value can be freely increased between instances of the application, but decreasing it below the real required space will result in an error when attempting to open the pool. .PP The directory must NOT contain user created files with extension \f[I].pmem\f[R], otherwise the behavior is undefined. If a file created by the library within the directory is in any way altered (resized, renamed) the behavior is undefined. .PP A directory poolset must exclusively use directories to specify paths - combining files and directories will result in an error. A single replica can consist of one or more directories. If there are multiple directories, the address space reservation is equal to the sum of the sizes. .PP The order in which the files are created is unspecified, but the library will try to maintain equal usage of the directories. .PP By default pools grow in 128 megabyte increments. .PP Only poolsets with the \f[I]SINGLEHDR\f[R] option can safely use directories. .SH NOTES .PP Creation of all the parts of the pool set and the associated replica sets can be done with the \f[B]pmemobj_create\f[R](3), \f[B]pmemblk_create\f[R](3) or \f[B]pmemlog_create\f[R](3) function, or by using the \f[B]pmempool\f[R](1) utility. .PP Restoring data from a replica can be done by using the \f[B]pmempool-sync\f[R](1) command or the \f[B]pmempool_sync\f[R]() API from the \f[B]libpmempool\f[R](7) library. .PP Modifications of a pool set file configuration can be done by using the \f[B]pmempool-transform\f[R](1) command or the \f[B]pmempool_transform\f[R]() API from the \f[B]libpmempool\f[R](7) library. .PP When creating a pool set consisting of multiple files, or when creating a replicated pool set, the \f[I]path\f[R] argument passed to \f[B]pmemobj_create\f[R](3), \f[B]pmemblk_create\f[R](3) or \f[B]pmemlog_create\f[R](3) must point to the special \f[I]set\f[R] file that defines the pool layout and the location of all the parts of the pool set. .PP When opening a pool set consisting of multiple files, or when opening a replicated pool set, the \f[I]path\f[R] argument passed to \f[B]pmemobj_open\f[R](3), \f[B]pmemblk_open\f[R](3) or \f[B]pmemlog_open\f[R](3) must point to the same \f[I]set\f[R] file that was used for pool set creation. .SH SEE ALSO .PP \f[B]ndctl-create-namespace\f[R](1), \f[B]pmemblk_create\f[R](3), \f[B]pmemlog_create\f[R](3), \f[B]pmemobj_create\f[R](3), \f[B]sysconf\f[R](3), \f[B]libpmemblk\f[R](7), \f[B]libpmemlog\f[R](7), \f[B]libpmemobj\f[R](7) and \f[B]\f[R]