Error: systemd-fstab-generator duplicate entry in /etc/fstab prevents service startup in VMware Cloud Foundation
search cancel

Error: systemd-fstab-generator duplicate entry in /etc/fstab prevents service startup in VMware Cloud Foundation

book

Article ID: 450996

calendar_today

Updated On:

Products

VMware SDDC Manager / VCF Installer

Issue/Introduction

  • SDDC Manager services such as postgres fails to start automatically after a reboot, however a manual restart is successful.
  • The following error appears in console or system logs:
    systemd-fstab-generator[####]: Failed to create unit file /run/systemd/generator/####.mount, as it already exists. Duplicate entry in /etc/fstab?

Environment

  • VMware Cloud Foundation 5.2.2
  • SDDC Manager

Cause

During the VCF 5.2.2 upgrade process, the automation script incorrectly appends redundant bind mount entries for the backup directory to the /etc/fstab file.

Resolution

  1. Log in to the SDDC Manager appliance as vcf and switch to root.

  2. Create a backup of the current /etc/fstab file:
    cp /etc/fstab /etc/fstab.backup

  3. Open /etc/fstab using a text editor such as vi.

  4. Locate the duplicate bind mount entries for the backup directory. They typically follow this format: /nfs/vmware/vcf/nfs-mount/backup /home/backup/nfs/vmware/vcf/nfs-mount/backup none rw,bind,nosuid,nodev 0 0

  5. Remove all but one instance of the specific duplicate entry.

  6. Save and close the file.

  7. Reload the systemd daemon to clear the generator cache:
    systemctl daemon-reload

  8. Reboot SDDC manager using "reboot" command.