PCC Phase 2 (LU-12714)

[LU-12373] detach and delete the PCC cached files when remove a PCC backend from a client Created: 01/Jun/19  Updated: 06/May/22

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Technical task Priority: Minor
Reporter: Qian Yingjin Assignee: Qian Yingjin
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Blocker
Related
Rank (Obsolete): 9223372036854775807

 Description   

Currently when remove a PCC backend from a client, it does not deal with previously PCC-cached files at all. These files can still use PCC caching service.

That's to say, after remove the corresponding PCC backend:

1) For RW-PCC cached files, we do not restore the data back into Lustre OSTs of the main filesystem. Although the PCC backend falls back as a tranditional HSM storage solution since the lhsmtool_posix copytool is still running at this client. But this is dangerous, and likly to cuase user data to be lost if the PCC device maybe permanently unaviailable.

2) The space used by these PCC cached files may not release.

 

Thus, we need to add an option to detach and delete the PCC cached files when remove a PCC backend from a client.

The practical and feasible methods is to scan the PCC backend fs, execute the detach operations via "lfs pcc detach" command or the corresponding llapi.

i.e.  For RW-PCC cached files, it can do as follows:

 "find /mnt/pcc -type f -name '[0-9a-f:]'" to generate a FID list, then "lfs pcc detach_fid $fid" for each FID.

 

Here we still need to patch the PCC detach, as the the scanned regular files in the PCC backend fs may be detached involuntary by the Layout lock revocation due to the LRU lock shrinking or by the inode reclaim. 

For these kind of files,  PCC detach still needs to restore the file into Lustre OSTs, wait the restore finish, and then send HSM remove requests to remove them for RW-PCC; while for RO-PCC, we need to simply delete the crresponding files.

 

 



 Comments   
Comment by Gerrit Updater [ 14/Jun/19 ]

Yingjin Qian (qian@ddn.com) uploaded a new patch: https://review.whamcloud.com/35230
Subject: LU-12373 pcc: uncache the pcc copies when remove a PCC backend
Project: fs/lustre-release
Branch: pcc
Current Patch Set: 1
Commit: b95cbf57e8ff6ddfcbe14b385e2e822f3144e3f2

Comment by Gerrit Updater [ 24/Apr/20 ]

Yingjin Qian (qian@ddn.com) uploaded a new patch: https://review.whamcloud.com/38352
Subject: LU-12373 pcc: uncache the pcc copies when remove a PCC backend
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 50c8f0b64488704e801b56ab6c52c61cc782cfb2

Comment by Gerrit Updater [ 22/Oct/20 ]

Yingjin Qian (qian@ddn.com) uploaded a new patch: https://review.whamcloud.com/40359
Subject: LU-12373 pcc: delete stale PCC copy when remove PCC backend
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: e5c3fd080e9f112b5d3c8c4e676000574727f6d7

Generated at Sat Feb 10 02:52:01 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.