-
Technical task
-
Resolution: Unresolved
-
Medium
-
None
-
None
-
None
-
3
-
9223372036854775807
lfs find can search a Lustre target directly, instead of walking a mounted
namespace. It reads the target's own objects through llapi_find_device(),
which runs the same predicates as a walk (-uid, -mtime, -size,
type, -projid and the rest) over llapi_scan_device() (LU-20606).
Nothing needs to be mounted, and no client or MDS is used, so a snapshot or a
failover partner's LUN can be searched like a serving target.
Naming the target
lfs find --device /dev/vdb -uid 1000 -mtime +30 lfs find --target testfs-MDT0000 -type f -size +1G lfs find --fsname testfs --projid 1999 lfs find --local -type f
- --device DEVICE: a block device, disk image or snapshot. A block device
given where a directory would be is also accepted. - --target NAME: a target mounted on this node, found through
osd-*.NAME.mntdev. - --fsname FSNAME: this node's mounted targets of that filesystem.
- --local: every MDT and OST mounted here; the MGS is skipped.
--internal adds the objects the target keeps for itself.
Where it runs
On the node that holds the target. The scan backend is in the server package;
on a client, llapi_find_device() fails with ENOTSUP and says why.
Changes
- 68157: split cb_find_init()'s decider out, so a record with no path can use it
- 68158: share find's predicate parsing
- 68159: llapi_find_device(), find over a device scan
- 68160: lfs find over a target, with --device