In this article we discuss how to resolve the issue of SDDC-Manager nfs-mount 100% full
Symptoms:
root@sddcmgr-1 [ /nfs/vmware/vcf/nfs-mount/backup/scripts ]# cat nsx_backup_config.properties # All properties are mandatory. # Property BACKUP.RETENTION.HOURS is used for retention policy. All backup files past # 'N' hours will be retained and rest will be deleted in current day. # Constraints : Min 2 BACKUP.RETENTION.HOURS=6 # Property BACKUP.RETENTION.DAYS is used for retention policy. A single latest backup file # for a day for 'N' number of days will be retained and rest will be deleted in that day. # Example, if there are hourly backups configured and say there are backups for each hour, # files will be evo-nsx-******-23_0-****.backupproperties, # evo-nsx-******-22_0-****.backupproperties, evo-nsx-******-21_0-****.backupproperties,.... # In above file list latest would be at 23:00, so file evo-nsx-******-23_0-**** # will be retained. # Constraints : Min 1 BACKUP.RETENTION.DAYS=7 # Property BACKUP.RETENTION.WEEKS is used for retention policy. A single latest backup # file for a week for 'N' number of weeks will be retained and rest will be deleted in # that week. # Example, if there are hourly backups configured and say there are backups for each hour, # files on the last day of the week ie on Sunday will be evo-nsx-******-23_0-Sun***.backupproperties, # evo-nsx-******-22_0-Sun***.backupproperties, evo-nsx-******-21_0-Sun***.backupproperties,.... # In above file list latest would be at 23:00, so file evo-nsx-******-23_0-Sun*** # If there is no file available on Sunday then previous day will be checked until # start day of the week. BACKUP.RETENTION.WEEKS=2 # Enable log LEVEL # Allowed levels INFO and DEBUG BACKUP.LOGGER.LEVEL=INF
So, the cronjob for cleaning the nsxbackup files is failing due to an issue with the script nsxbackupcleaner.py and fills the space of NFS share and this will need cleaned up.
root@sddcmgr-1 [ /nfs/vmware/vcf/nfs-mount/backup/scripts ]# vi nsxbackupcleaner.py
backup_files_for_day.sort(key=lambda x: os.path.getctime(x), reverse=True)
backup_files_for_day = sorted(backup_files_for_day, key=lambda x: os.path.getctime(x), reverse=True)
backupfilesForDay.sort(key=lambda x: os.path.getctime(x), reverse=True)
backupfilesForDay = sorted(backupfilesForDay, key=lambda x: os.path.getctime(x), reverse=True)
files.sort(key=lambda x: os.path.getctime(x), reverse=True)
files = sorted(files, key=lambda x: os.path.getctime(x), reverse=True)Once, the file is updated then rerun the command to cleanup the backup files.
root@sddcmgr-1 [ /nfs/vmware/vcf/nfs-mount/backup/scripts ]# ./nsx_backup_cleanup.sh
Impact/Risks: