<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Current there is no such command in Lustre to specify a folder and all files under the directory & sub-directories will be batched attached or detached.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
One way as you said is to use some custom script to traverse a directory recursively and call "lfs pcc attach/detach".</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Another way is to develop a program to customize the attach/detach via llapi for PCC feature.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
See lustre-release/lustre/doc:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000"><span style="font-variant-ligatures: no-common-ligatures">llapi_pcc_attach.3<span class="Apple-converted-space"> 
</span>llapi_pcc_attach_fid.3<span class="Apple-converted-space">  </span>llapi_pcc_attach_fid_str.3</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000"><span style="font-variant-ligatures: no-common-ligatures">llapi_pcc_detach_fid.3
<span class="Apple-converted-space">    </span>llapi_pcc_detach_fid_str.3</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000"><span style="font-variant-ligatures: no-common-ligatures">llapi_pcc_detach_fid_fd.3<span class="Apple-converted-space"> 
</span>llapi_pcc_detach_file.3</span></p>
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
i.e.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000"><span style="font-variant-ligatures: no-common-ligatures">int llapi_pcc_attach(const char *" path ", __u32 " id ,</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000"><span style="font-variant-ligatures: no-common-ligatures; color: #c1651c">.BI</span><span style="font-variant-ligatures: no-common-ligatures"> "
<span class="Apple-converted-space">                    </span>enum lu_pcc_type " type ");"</span></p>
This llapi is use to attach a file with a given name.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
By this way, a use can customize PCC attach/detach files under a specified directory or with specified UID/GID/ProjID.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Or you can combine with mpiFileutils to do attach/detach in parallel.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Best Regards,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Qian </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
</body>
</html>