1() PMDK Programmer's Manual ()
2
3
4
6 pmempool-create - create a persistent memory pool
7
9 $ pmempool create [<options>] [<type>] [<bsize>] <file>
10
12 NOTICE: The libpmemblk and libpmemlog libraries are deprecated
13 since PMDK 1.13.0 release.
14
16 The pmempool invoked with create command creates a pool file of speci‐
17 fied type. Depending on a pool type it is possible to provide more
18 properties of pool.
19
20 Valid pool types are: blk, log and obj which stands for pmemblk, pmem‐
21 log and pmemobj pools respectively. By default the pool file is creat‐
22 ed with minimum allowed size for specified pool type. The minimum
23 sizes for blk, log and obj pool types are PMEMBLK_MIN_POOL, PMEM‐
24 LOG_MIN_POOL and PMEMOBJ_MIN_POOL respectively. See libpmemblk(7),
25 libpmemlog(7) and libpmemobj(7) for details.
26
27 For pmemblk pool type block size <bsize> is a required argument.
28
29 In order to set custom size of pool use -s option, or use -M option to
30 create a pool of maximum available size on underlying file system.
31
32 The size argument may be passed in format that permits only the upper-
33 case character for byte - B as specified in IEC 80000-13, IEEE 1541 and
34 the Metric Interchange Format. Standards accept SI units with obliga‐
35 tory B - kB, MB, GB, ... which means multiplier by 1000 and IEC units
36 with optional “iB” - KiB, MiB, GiB, ..., K, M, G, ... - which means
37 multiplier by 1024.
38
39 Available options:
40 -s, --size <size>
41
42 Size of pool file.
43
44 -M, --max-size
45
46 Set size of pool to available space of underlying file system.
47
48 -m, --mode <octal>
49
50 Set permissions to (the default is 0664) when creating the files. If
51 the file already exist the permissions are not changed.
52
53 -i, --inherit <file>
54
55 Create a new pool of the same size and other properties as <file>.
56
57 -b, --clear-bad-blocks
58
59 Clear bad blocks in existing files.
60
61 -f, --force
62
63 Remove the pool before creating.
64
65 -v, --verbose
66
67 Increase verbosity level.
68
69 -h, --help
70
71 Display help message and exit.
72
73 Options for PMEMBLK:
74 By default when creating a pmem blk pool, the BTT layout is not written
75 until the first write operation of block entry is performed. Using -w
76 option you can force writing the BTT layout by writing zero data to
77 specified block number. By default the write operation is performed to
78 block number 0. Please refer to libpmemblk(7) for details.
79
80 -w, --write-layout
81
82 Force writing the BTT layout by performing write operation to block
83 number zero.
84
85 Options for PMEMOBJ:
86 By default when creating a pmem obj pool, the layout name provided to
87 the libpmemobj library is an empty string. Please refer to libpmemo‐
88 bj(7) for details.
89
90 -l, --layout <layout>
91
92 Layout name of the pmemobj pool.
93
95 $ pmempool create blk 512 pool.blk
96
97 Create a blk pool file of minimum allowed size and block size 512 bytes
98
99 $ pmempool create log -M pool.log
100
101 Create a log pool file of maximum allowed size
102
103 $ pmempool create blk --size=4G --write-layout 1K pool.blk
104
105 Create a blk pool file of size 4G, block size 1K and write the BTT lay‐
106 out
107
108 $ pmempool create --layout my_layout obj pool.obj
109
110 Create an obj pool file of minimum allowed size and layout “my_layout”
111
112 $ pmempool create --inherit=pool.log new_pool.log
113
114 Create a pool file based on pool.log file
115
117 pmempool(1), libpmemblk(7), libpmemlog(7), libpmemobj(7) and
118 <https://pmem.io>
119
120
121
122PMDK - 2023-06-05 ()