Whamcloud - gitweb
LU-14286 osd-ldiskfs: fallocate() should zero new blocks
[fs/lustre-release.git] / lustre / doc / lfs-pcc.1
1 .TH LFS-PCC 1 2019-04-15 "Lustre" "Lustre Utilities"
2 .SH NAME
3 lfs pcc commands used to interact with the Persistent Client Cache (PCC).
4 .SH SYNOPSIS
5 .B lfs pcc attach <\fB--id\fR|\fB-i\fR \fINUM\fR>  <\fIfile \fR...>
6 .br
7 .B lfs pcc attach <\fB--id\fR|\fB-i\fR \fINUM\fR>  <\fB--mnt\fR|\fB-m\fR \fImntpath\fR> <\fIfid \fR...>
8 .br
9 .B lfs pcc state <\fIfile \fR...>
10 .SH DESCRIPTION
11 .TP
12 .B lfs pcc attach <\fB--id\fR|\fB-i\fR \fINUM\fR>  <\fIfile \fR...>
13 Attach given files on the persistent client cache. Use
14 .B lfs pcc detach
15 to remove the cached files from PCC either manually, or through automatic
16 mechanisms for the purpose of the cache space management.
17 .TP
18 .B lfs pcc attach <\fB--id\fR|\fB-i\fR \fINUM\fR>  <\fB--mnt\fR|\fB-m\fR \fImntpath\fR> <\fIfid \fR...>
19 Attach given files into the persistent client cache by FID(s).
20 .TP
21 .B lfs pcc state <\fIfile \fR...>
22 Display the PCC state for given files.
23 .TP
24 .SH OPTIONS
25 .TP
26 .B --id | -i
27 For RW-PCC, it is HSM ARCHIVE ID to choose which backend for cache files.
28 .TP
29 .B --mnt | -m
30 Specify the Lustre mount point.
31 .TP
32 Before using RW-PCC, you need to configure HSM root and Archive ID mapping properly:
33 .TP
34 .B lfs pcc add $MNTPATH $PCCPATH \ "$PARAM"
35 Add one PCC backend to the Lustre client. For RW-PCC, when a file is being
36 created, a rule-based policy is used to determine whether it will be cached.
37 The rule expression supports logical conditional conjunction and disjunction
38 operations among different users, groups, projects, or filenames including
39 wildcards. You need to specify auto create caching rule and archive ID in
40 .B $PARAM.
41 On this client any subsequently created files matching the condition of auto
42 caching rule will be persistently cached automatically.
43 .TP
44 .B lfs pcc del $MNTPATH $PCCPATH
45  Delete one PCC backend
46 .TP
47 .B lfs pcc clear $MNTPATH
48  Clear and remove all PCC backends for the client.
49 .TP
50 .SH EXAMPLES
51 .TP
52 .B # lctl set_param mdt.$FSNAME-MDT0000.hsm_control=enabled
53 Enable HSM on the appropriate MDT.
54 .TP
55 .B # lhsmtool_posix --daemon --hsm-root /mnt/pcc/ --archive=1 /mnt/lustre
56 Launch one copytool on client node to connect cache storage.
57 .TP
58 .B # lfs pcc add /mnt/lustre /mnt/pcc \ "projid={500,1000}&fname={*.h5},uid=1001 rwid=1"
59 Add HSM root and Archive ID (referenced by
60 .IB rwid
61 name-value pair) mapping for RW-PCC. Where "&" represents the logical
62 conjunction operator while "," represents the logical disjunction operator.
63 The example rule means that new files are only auto cached if the project ID is
64 either 500 or 1000 and the suffix of the file name is “h5” or the user ID is
65 1001.
66 .TP
67 .B $ lfs pcc attach -i 1 /mnt/lustre/file
68 Attach an existing file into PCC and migrate data from lustre to Cache Device,
69 any I/O to the Lustre file will direct to the RW-PCC copy.
70 .TP
71 .B $ lfs pcc attach_fid -i 1 -m /mnt/lustre 0x200000401:0x1:0x0
72 Attach an existing file referenced by FID "0x200000401:0x1:0x0" into PCC.
73 .TP
74 .B $ lfs pcc state /mnt/lustre/file
75 .br
76 file: /mnt/lustre/file, type: readwrite, PCC file: /mnt/pcc/0004/0000/0bd1/0000/0002/0000/0x200000bd1:0x4:0x0, user number: 1, flags: 6
77 .br
78 Display the PCC state of the file "/mnt/lustre/file".
79 .TP
80 .B $ lfs pcc state /mnt/lustre/file
81 .br
82 file: /mnt/lustre/file, type: readwrite, PCC file: /mnt/pcc/0004/0000/0bd1/0000/0002/0000/0x200000bd1:0x4:0x0, user number: 1, flags: 6
83 .br
84 Display the PCC state of the file "/mnt/lustre/file".
85 .TP
86 .SH SEE ALSO
87 .BR lfs (1),
88 .BR lfs-hsm (1),
89 .BR lfs-pcc-detach (1),
90 .BR lctl-pcc (8)