91
Listing 7-3. myconcatpool.set – An example of a concatenated poolset created
from three individual pools on three different file systems
PMEMPOOLSET
OPTION NOHDRS
100G /mountpoint0/myfile.part0
200G /mountpoint1/myfile.part1
400G /mountpoint2/myfile.part2
Note Data will be preserved if it exists in /mountpoint0/myfile.part0, but
any data in /mountpoint0/myfile.part1 or /mountpoint0/myfile.part2
will be lost. We recommend that you only add new and empty pools to a poolset.
Replica Poolsets
Besides combining multiple pools to provide more space, a poolset can also maintain
multiple copies of the same data to increase resiliency. Data can be replicated to another
poolset on a different file of the local host and a poolset on a remote host.
Listing 7-4 shows a poolset file called “myreplicatedpool.set” that will replicate
local writes into the /mnt/pmem0/pool1 pool to another local pool, /mnt/pmem1/pool1,
on a different file system, and to a remote-objpool.set poolset on a remote host called
example.com.
Listing 7-4. myreplicatedpool.set – An example demonstrating how to replicate
local data locally and remote host
PMEMPOOLSET
256G /mnt/pmem0/pool1
REPLICA
256G /mnt/pmem1/pool1
REPLICA user@example.com remote-objpool.set
The librpmem library, a remote persistent memory support library, underpins this
feature. Chapter 18 discusses librpmem and replica pools in more detail.
Chapter 7 libpmemobj: a Native traNsaCtioNal objeCt store
Listing 7-3. myconcatpool.set – An example of a concatenated poolset created
from three individual pools on three different file systems
PMEMPOOLSET
OPTION NOHDRS
100G /mountpoint0/myfile.part0
200G /mountpoint1/myfile.part1
400G /mountpoint2/myfile.part2
Note Data will be preserved if it exists in /mountpoint0/myfile.part0, but
any data in /mountpoint0/myfile.part1 or /mountpoint0/myfile.part2
will be lost. We recommend that you only add new and empty pools to a poolset.
Replica Poolsets
Besides combining multiple pools to provide more space, a poolset can also maintain
multiple copies of the same data to increase resiliency. Data can be replicated to another
poolset on a different file of the local host and a poolset on a remote host.
Listing 7-4 shows a poolset file called “myreplicatedpool.set” that will replicate
local writes into the /mnt/pmem0/pool1 pool to another local pool, /mnt/pmem1/pool1,
on a different file system, and to a remote-objpool.set poolset on a remote host called
example.com.
Listing 7-4. myreplicatedpool.set – An example demonstrating how to replicate
local data locally and remote host
PMEMPOOLSET
256G /mnt/pmem0/pool1
REPLICA
256G /mnt/pmem1/pool1
REPLICA user@example.com remote-objpool.set
The librpmem library, a remote persistent memory support library, underpins this
feature. Chapter 18 discusses librpmem and replica pools in more detail.
Chapter 7 libpmemobj: a Native traNsaCtioNal objeCt store
