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.
56 Register 2 changelog consumers on the MDT0000
58 [root@mds]: lctl --device lustrefs-MDT0000 changelog_register
60 lustrefs-MDT0000: Registered changelog userid 'cl1'
62 [root@mds]: lctl --device lustrefs-MDT0000 changelog_register
64 lustrefs-MDT0000: Registered changelog userid 'cl2'
66 Set changelog mask to generate changelogs for file creations
68 [root@mds]: lctl set_param mdd.lustrefs-MDT0000.changelog_mask=CREAT
70 mdd.lustrefs-MDT0000.changelog_mask=CREAT
72 Generate changelogs by creating some files on the fs
74 [root@client]: touch /mnt/lustrefs/test{1..101}
76 Read changelog from number 0 to 99 on MDT0000
78 [root@client]: lfs changelog lustrefs-MDT0000 0 99
80 0 01CREAT 11:03:54.129724442 2022.11.22 ... p=[0x200000007:0x1:0x0] test1
82 99 01CREAT 11:03:54.129724465 2022.11.22 ... p=[0x200000007:0x1:0x0] test100
85 Indicate to MDT0000 that the changelogs lower than 100 are not needed for cl1
87 [root@client]: lfs changelog_clear lustrefs-MDT0000 cl1 99
90 Indicate to MDT0000 that the changelogs lower than 100 are not needed for cl2
92 [root@client]: lfs changelog_clear lustrefs-MDT0000 cl2 99
95 The changelogs from 0 to 99 are cleared by the MDT:
96 [root@client]: lfs changelog lustrefs-MDT0000 0
98 100 01CREAT 11:03:54.129724492 2022.11.22 ... p=[0x200000007:0x1:0x0] test101
101 .BR llapi_changelog_clear (3)
102 .BR llapi_changelog_recv (3)
103 .BR llapi_changelog_start (3)
104 .BR lctl-changelog_register (8)
105 .BR lctl-changelog_deregister (8)