Whamcloud - gitweb
LU-12614 ldlm: ldlm_cancel_hpreq_check should check lock count
[fs/lustre-release.git] / lustre / doc / lfs-pcc.1
index c709c8d..886a96d 100644 (file)
@@ -1,29 +1,22 @@
 .TH LFS-PCC 1 2019-04-15 "Lustre" "Lustre Utilities"
 .SH NAME
-lfs pcc commands used to interact with PCC features.
+lfs pcc commands used to interact with the Persistent Client Cache (PCC).
 .SH SYNOPSIS
 .B lfs pcc attach <\fB--id\fR|\fB-i\fR \fINUM\fR>  <\fIfile \fR...>
 .br
 .B lfs pcc attach <\fB--id\fR|\fB-i\fR \fINUM\fR>  <\fB--mnt\fR|\fB-m\fR \fImntpath\fR> <\fIfid \fR...>
 .br
-.B lfs pcc detach <\fIfile \fR...>
-.br
-.B lfs pcc detach_fid <\fImntpath\fR> <\fIfid \fR...>
-.br
 .B lfs pcc state <\fIfile \fR...>
 .SH DESCRIPTION
 .TP
 .B lfs pcc attach <\fB--id\fR|\fB-i\fR \fINUM\fR>  <\fIfile \fR...>
-Attach given files on the persistent client cache.
+Attach given files on the persistent client cache. Use
+.B lfs pcc detach
+to remove the cached files from PCC either manually, or through automatic
+mechanisms for the purpose of the cache space management.
 .TP
 .B lfs pcc attach <\fB--id\fR|\fB-i\fR \fINUM\fR>  <\fB--mnt\fR|\fB-m\fR \fImntpath\fR> <\fIfid \fR...>
-Attach given fils into the persistent client cache by FID(s).
-.TP
-.B lfs pcc detach <\fIfile \fR...>
-Detach given files from the persistent client cache.
-.TP
-.B lfs pcc detach_fid <\fImntpath\fR> <\fIfid \fR...>
-Detach files from the persistent client cache by FID(s).
+Attach given files into the persistent client cache by FID(s).
 .TP
 .B lfs pcc state <\fIfile \fR...>
 Display the PCC state for given files.
@@ -34,14 +27,19 @@ Display the PCC state for given files.
 For RW-PCC, it is HSM ARCHIVE ID to choose which backend for cache files.
 .TP
 .B --mnt | -m
-Specifies Lustre mount point.
+Specify the Lustre mount point.
 .TP
 Before using RW-PCC, you need to configure HSM root and Archive ID mapping properly:
 .TP
-.B lfs pcc add $MNTPATH $PCCPATH \ "$ARCHIVE_ID $PROJID"
-Add one PCC backend to the Lustre client, you need to specify hsm root,
-archive ID, and project ID. On this client any subsequently created
-files with this project ID will be persistently cached automatically.
+.B lfs pcc add $MNTPATH $PCCPATH \ "$PARAM"
+Add one PCC backend to the Lustre client. For RW-PCC, when a file is being
+created, a rule-based policy is used to determine whether it will be cached.
+The rule expression supports logical conditional conjunction and disjunction
+operations among different users, groups, projects, or filenames including
+wildcards. You need to specify auto create caching rule and archive ID in
+.B $PARAM.
+On this client any subsequently created files matching the condition of auto
+caching rule will be persistently cached automatically.
 .TP
 .B lfs pcc del $MNTPATH $PCCPATH
  Delete one PCC backend
@@ -57,8 +55,14 @@ Enable HSM on the appropriate MDT.
 .B # lhsmtool_posix --daemon --hsm-root /mnt/pcc/ --archive=1 /mnt/lustre
 Launch one copytool on client node to connect cache storage.
 .TP
-.B # lfs pcc add /mnt/lustre /mnt/pcc \ "1\ 100"
-Add HSM root and Archive ID mapping for RW-PCC.
+.B # lfs pcc add /mnt/lustre /mnt/pcc \ "projid={500,1000}&fname={*.h5},uid=1001 rwid=1"
+Add HSM root and Archive ID (referenced by
+.IB rwid
+name-value pair) mapping for RW-PCC. Where "&" represents the logical
+conjunction operator while "," represents the logical disjunction operator.
+The example rule means that new files are only auto cached if the project ID is
+either 500 or 1000 and the suffix of the file name is “h5” or the user ID is
+1001.
 .TP
 .B $ lfs pcc attach -i 1 /mnt/lustre/file
 Attach an existing file into PCC and migrate data from lustre to Cache Device,
@@ -67,11 +71,11 @@ any I/O to the Lustre file will direct to the RW-PCC copy.
 .B $ lfs pcc attach_fid -i 1 -m /mnt/lustre 0x200000401:0x1:0x0
 Attach an existing file referenced by FID "0x200000401:0x1:0x0" into PCC.
 .TP
-.B $ lfs pcc detach /mnt/lustre/file
-Detach the file from RW-PCC, IO to the file will come to Lustre after this
-command.
-.B $ lfs pcc detach_fid /mnt/lustre 0x200000401:0x1:0x0
-Detach the file referenced by FID "0x200000401:0x1:0x0" from PCC.
+.B $ lfs pcc state /mnt/lustre/file
+.br
+file: /mnt/lustre/file, type: readwrite, PCC file: /mnt/pcc/0004/0000/0bd1/0000/0002/0000/0x200000bd1:0x4:0x0, user number: 1, flags: 6
+.br
+Display the PCC state of the file "/mnt/lustre/file".
 .TP
 .B $ lfs pcc state /mnt/lustre/file
 .br
@@ -82,4 +86,5 @@ Display the PCC state of the file "/mnt/lustre/file".
 .SH SEE ALSO
 .BR lfs (1),
 .BR lfs-hsm (1),
+.BR lfs-pcc-detach (1),
 .BR lctl-pcc (8)