[LU-5141] Only regular files should be archived Created: 03/Jun/14  Updated: 19/Feb/15  Resolved: 24/Oct/14

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.5.1
Fix Version/s: Lustre 2.7.0

Type: Bug Priority: Minor
Reporter: Frank Zago (Inactive) Assignee: Cliff White (Inactive)
Resolution: Fixed Votes: 0
Labels: hsm, patch
Environment:

Centos 6


Severity: 3
Project: HSM
Rank (Obsolete): 14180

 Description   

It is currently possible to ask lfs to hsm_archive a directory, although this doesn't appear to make any sense, and the posix copytool rejects it.

$ lfs hsm_archive /mnt/tas01/tmp_test_lhmsc
lhsmtool_posix[15132]: copytool fs=tas01 archive#=1 item_count=1
lhsmtool_posix[15132]: waiting for message from kernel
lhsmtool_posix[15137]: '[0x200001b70:0x371:0x0]' action ARCHIVE reclen 72, cookie=0x53880088
lhsmtool_posix[15137]: processing file 'tmp_test_lhmsc'
lhsmtool_posix[15137]: archiving '/mnt/tas01/.lustre/fid/0x200001b70:0x371:0x0' to '/vsm/tasfs1/0371/0000/1b70/0000/0002/0000/0x200001b70:0x371:0x0_tmp'
lhsmtool_posix[15137]: saving stripe info of '/mnt/tas01/.lustre/fid/0x200001b70:0x371:0x0' in /vsm/tasfs1/0371/0000/1b70/0000/0002/0000/0x200001b70:0x371:0x0_tmp.lov
lhsmtool_posix[15137]: cannot get stripe info on '/mnt/tas01/.lustre/fid/0x200001b70:0x371:0x0': No data available (61)
lhsmtool_posix[15137]: cannot save file striping info of '/mnt/tas01/.lustre/fid/0x200001b70:0x371:0x0' in '/vsm/tasfs1/0371/0000/1b70/0000/0002/0000/0x200001b70:0x371:0x0_tmp': No data available (61)
lhsmtool_posix[15137]: going to copy data from '/mnt/tas01/.lustre/fid/0x200001b70:0x371:0x0' to '/vsm/tasfs1/0371/0000/1b70/0000/0002/0000/0x200001b70:0x371:0x0_tmp'
lhsmtool_posix[15137]: '/mnt/tas01/.lustre/fid/0x200001b70:0x371:0x0' is not a regular file: Invalid argument (22)
lhsmtool_posix[15137]: data copy failed from '/mnt/tas01/.lustre/fid/0x200001b70:0x371:0x0' to '/vsm/tasfs1/0371/0000/1b70/0000/0002/0000/0x200001b70:0x371:0x0_tmp': Invalid argument (22)
lhsmtool_posix[15137]: Action completed, notifying coordinator cookie=0x53880088, FID=[0x200001b70:0x371:0x0], hp_flags=0 err=22
lhsmtool_posix[15137]: llapi_hsm_action_end() on '/mnt/tas01/.lustre/fid/0x200001b70:0x371:0x0' ok (rc=0)

Ideally this should be caught early and not being forwarded to the copytool at all.



 Comments   
Comment by Vinayak Hariharmath (Inactive) [ 23/Sep/14 ]

added necessary checks to lustre/utils/lfs.c

http://review.whamcloud.com/12016

Comment by Andreas Dilger [ 23/Sep/14 ]

I'm not against landing this fix, since it is addressing a problem that is being seen today.

A longer-term goal would be to be able to archive whole directory tres by creating a tarball of the tree (including extended attributes and associated HSM archive state), archiving the tar file, and then deleting the tree to release the inodes/directories. This would be useful for archiving directories that contain only small files and/or files that are HSM stubs.

Comment by Oleg Drokin [ 10/Oct/14 ]

Before we attain this goal, it might make sense to also check for non-files at the ioctl level so that people tha don't use our tools, but call ioctls directly don't step on this too

Comment by Cliff White (Inactive) [ 24/Oct/14 ]

New patch was merged, closing

Comment by Frank Zago (Inactive) [ 25/Nov/14 ]

Merged patch was: http://review.whamcloud.com/12036/

Comment by Gerrit Updater [ 19/Feb/15 ]

James Nunez (james.a.nunez@intel.com) uploaded a new patch: http://review.whamcloud.com/13814
Subject: LU-5141 hsm: Only regular files should be archived
Project: fs/lustre-release
Branch: b2_5
Current Patch Set: 1
Commit: b460cea3cb0d015ad2235ac751540e151a48d468

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