Environment
Situation
GMS server is running
low on disk space /var/lib/datasync/mobility/attachments
seems to be the problem area.
Issuing a the command: find
/var/lib/datasync/mobility/attachments -type f -mtime +30 | sort | head
reveals that there are files much older than the expected 30 day sync limit.
Resolution
The filenames returned in the find command are GUIDs which can be used to examine the parent object in the postgres
database. To do that:
attachmentid
| objectid
|
userid
----------------------------------+---------------------+----------------------------------
0ec2b1588e5b11e98bbf005056b1e37a | 8955723509040691840 | 1a89d7e44f0b11e99f3e005056b1e37a
(1 row)
mobility=> select eclass,eaction,synckey,tstamp from deviceimages where
objectid='8955723509040691840';
eclass | eaction | synckey
|
tstamp
--------+---------+---------+----------------------------
Email | add
| 0 | 2019-06-14T05:15:35.801784
Email | move |
0 | 2019-06-18T10:23:49.963312
Email | move
| 0 | 2019-06-18T10:23:49.963312
Email | modify | 0 |
2019-06-19T08:54:54.928364
(4 rows)
The returned information confirms
that the attachment is beyond the cleanup period and can be considered
orphaned.