[LU-10701] HSM remove requests are silently ignored when file is being archived Created: 22/Feb/18  Updated: 29/Jan/22

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

Type: Bug Priority: Minor
Reporter: John Hammond Assignee: WC Triage
Resolution: Unresolved Votes: 0
Labels: hsm

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

While a file is being archived, HSM remove requests are silently being dropped. This is because hsm_find_compatible() only looks at the FIDs of actions when scanning for compatible actions.

n:lustre# dd if=/dev/zero of=f3 bs=1M count=16
16+0 records in
16+0 records out
16777216 bytes (17 MB) copied, 0.284217 s, 59.0 MB/s
n:lustre# lfs hsm_archive f3
n:lustre# lfs hsm_remove f3
n:lustre# lctl get_param mdt.*.hsm.actions
mdt.lustre-MDT0000.hsm.actions=
lrh=[type=10680000 len=136 idx=1/5] fid=[0x200000401:0x3:0x0] dfid=[0x200000401:0x3:0x0] compound/cookie=0x0/0x5a8f32d9 action=ARCHIVE archive#=1 flags=0x0 extent=0x0-0xffffffffffffffff gid=0x0 datalen=0 status=STARTED data=[]
n:lustre# lfs hsm_remove f3
n:lustre# lctl get_param mdt.*.hsm.actions
mdt.lustre-MDT0000.hsm.actions=
lrh=[type=10680000 len=136 idx=1/5] fid=[0x200000401:0x3:0x0] dfid=[0x200000401:0x3:0x0] compound/cookie=0x0/0x5a8f32d9 action=ARCHIVE archive#=1 flags=0x0 extent=0x0-0xffffffffffffffff gid=0x0 datalen=0 status=STARTED data=[]
n:lustre# lctl get_param mdt.*.hsm.actions
mdt.lustre-MDT0000.hsm.actions=
lrh=[type=10680000 len=136 idx=1/5] fid=[0x200000401:0x3:0x0] dfid=[0x200000401:0x3:0x0] compound/cookie=0x0/0x5a8f32d9 action=ARCHIVE archive#=1 flags=0x0 extent=0x0-0xffffffffffffffff gid=0x0 datalen=0 status=SUCCEED data=[]
n:lustre# lfs hsm_state f3
f3: (0x00000009) exists archived, archive_id:1
n:lustre# lfs hsm_remove f3
n:lustre# lfs hsm_state f3
f3: (0x00000000), archive_id:1

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