1 .TH lfs-changelog 1 "2022-11-22" Lustre "user utilities"
3 lfs-changelog, lfs-changelog_clear \- client utility to read and clear Lustre changelogs
6 .B lfs changelog \fR[\fB--follow\fR] \fIMDTNAME\fR [\fISTARTREC \fR[\fIENDREC\fR]]
8 .B lfs changelog_clear \fIMDTNAME\fR \fIID\fR \fIENDREC\fR
13 Show the metadata changes on an MDT. Start point
20 option will block waiting for new changes.
22 .B lfs changelog_clear
23 Indicate that changelog records previous to
26 interest to a particular consumer
28 , potentially allowing the MDT to
29 free up disk space. An
31 of 0 indicates the current last record.
33 Changelog consumers must be registered on the
36 .BI "lctl --device " MDT_NAME " changelog_register"
39 Return 0 on success or a errno value on failure.
43 One or more invalid arguments are given.
46 MDT's changelog char device or changelog user not found.
49 Not enough permissions to open the changelog char device. By default, the device
50 is only accessible to the root user.
53 Failed to read the changelog record on the MDT.
55 Certain userspace tools might rely on past Lustre behavior of displaying the
56 shard's parent FID instead of the real parent FID, in changelog records related
57 to striped directories or filesystem objects contained within them; if this
58 behavior is needed for compatibility, please set mdd.*.enable_shard_pfid=1. This
59 tunable might be deprecated in a future Lustre release.
62 Register 2 changelog consumers on the MDT0000
64 [root@mds]: lctl --device lustrefs-MDT0000 changelog_register
66 lustrefs-MDT0000: Registered changelog userid 'cl1'
68 [root@mds]: lctl --device lustrefs-MDT0000 changelog_register
70 lustrefs-MDT0000: Registered changelog userid 'cl2'
72 Set changelog mask to generate changelogs for file creations
74 [root@mds]: lctl set_param mdd.lustrefs-MDT0000.changelog_mask=CREAT
76 mdd.lustrefs-MDT0000.changelog_mask=CREAT
78 Generate changelogs by creating some files on the fs
80 [root@client]: touch /mnt/lustrefs/test{1..101}
82 Read changelog from number 0 to 99 on MDT0000
84 [root@client]: lfs changelog lustrefs-MDT0000 0 99
86 0 01CREAT 11:03:54.129724442 2022.11.22 ... p=[0x200000007:0x1:0x0] test1
88 99 01CREAT 11:03:54.129724465 2022.11.22 ... p=[0x200000007:0x1:0x0] test100
91 Indicate to MDT0000 that the changelogs lower than 100 are not needed for cl1
93 [root@client]: lfs changelog_clear lustrefs-MDT0000 cl1 99
96 Indicate to MDT0000 that the changelogs lower than 100 are not needed for cl2
98 [root@client]: lfs changelog_clear lustrefs-MDT0000 cl2 99
101 The changelogs from 0 to 99 are cleared by the MDT:
102 [root@client]: lfs changelog lustrefs-MDT0000 0
104 100 01CREAT 11:03:54.129724492 2022.11.22 ... p=[0x200000007:0x1:0x0] test101
107 .BR llapi_changelog_clear (3)
108 .BR llapi_changelog_recv (3)
109 .BR llapi_changelog_start (3)
110 .BR lctl-changelog_register (8)
111 .BR lctl-changelog_deregister (8)