-
Notifications
You must be signed in to change notification settings - Fork 509
/
README
59 lines (46 loc) · 1.89 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Persistent Memory Development Kit
This is examples/libpmemobj/pmemobjfs/README.
This directory contains an example application implemented using libpmemobj.
The pmemobjfs is a simple implementation of FUSE file system using the
transactional API of libpmemobj.
To create a file system layout run the following command:
$ mkfs.pmemobjfs [-s <size>] [-b <block_size>] <file>
To mount the filesystem run the following command:
$ pmemobjfs -s -odefault_permissions,hard_remove,allow_other <file> <dir>
The -o default_permissions option enables permission checking by the FUSE
implementation.
The -s option runs FUSE in single threaded mode. The current implementation
does not use any synchronization mechanisms.
The -o hard_remove forces FUSE to not use the .fuse_hiddenXXX files when
deleting a file.
The -o allow_other option allows other users to access the file system.
To begin a transaction run the following command:
$ pmemobjfs.tx_begin <dir>
To commit a transaction run the following command:
$ pmemobjfs.tx_commit <dir>
To abort a transaction run the following command:
$ pmemobjfs.tx_abort <dir>
The transactions works across multiple operations performed on pmemobjfs
file system including modification of files.
Example usage of transactions:
$ mkfs.pmemobjfs /mnt/pmem/pmemobjfs.obj
$ pmemobjfs -s -odefault_permissions,hard_remove,allow_other\
/mnt/pmem/pmemobjfs.obj /mnt/pmemobjfs
$ ls /mnt/pmemobjfs
$ pmemobjfs.tx_begin /mnt/pmemobjfs
$ mkdir /mnt/pmemobjfs/dir1
$ echo "The pmemobjfs filesystem" > /mnt/pmemobjfs/dir1/file1
$ pmemobjfs.tx_commit
$ ls /mnt/pmemobjfs/dir1
file1
$ pmemobjfs.tx_begin /mnt/pmemobjfs
$ rm /mnt/pmemobjfs/dir1/file1
$ ls /mnt/pmemobjfs/dir1
$ pmemobjfs.tx_abort
$ ls /mnt/pmemobjfs/dir1
file1
** DEPENDENCIES: **
In order to build pmemobjfs you need to install fuse (version >= 2.9.1)
development package.
rpm-based systems : fuse-devel
dpkg-based systems: libfuse-dev