Red Hat Satellite 6 Installation Failure Due to Insufficient Disk Space During PostgreSQL Database Setup

Solution Verified - Updated

Environment

  • Red Hat Satellite 6

Issue

  • Red Hat Satellite 6 Installer Failed Due to PostgreSQL Initdb Error - No space left on device.

     2023-09-25 20:38:43 [DEBUG ] [root] Running installer with args [["--scenario", "satellite", "--foreman-initial-organization", "RedHat", "--foreman-initial-location", "pune", "--foreman-initial-admin-username", "admin", "--foreman-initial-admin-password", "********"]]
     2023-09-25 20:38:43 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
     2023-09-25 20:39:16 [ERROR ] [configure] '/usr/bin/initdb --pgdata '/var/lib/pgsql/data'' returned 1 instead of one of [0]
     2023-09-25 20:39:16 [ERROR ] [configure] /Stage[main]/Postgresql::Server::Initdb/Exec[postgresql_initdb]/returns: change from 'notrun' to ['0'] failed: '/usr/bin/initdb --pgdata '/var/lib/pgsql/data'' returned 1 instead of one of [0]
     2023-09-25 20:39:42 [DEBUG ] [root] Exit with status code: 6 (signal was 6)
    
  • Red Hat Satellite 6 Installer Encountered Failure: PostgreSQL Initdb Process Errors - Insufficient Disk Space.

     2023-09-25 20:39:16 [INFO  ] [configure] /Stage[main]/Postgresql::Server::Initdb/Exec[postgresql_initdb]/returns: running bootstrap script ... 2023-09-25 20:39:16.713 UTC [2605] FATAL:  could not write to file "pg_wal/xlogtemp.2605": No space left on device
     2023-09-25 20:39:16 [INFO  ] [configure] /Stage[main]/Postgresql::Server::Initdb/Exec[postgresql_initdb]/returns: child process exited with exit code 1
     2023-09-25 20:39:16 [INFO  ] [configure] /Stage[main]/Postgresql::Server::Initdb/Exec[postgresql_initdb]/returns: initdb: removing contents of data directory "/var/lib/pgsql/data"
     2023-09-25 20:39:16 [ERROR ] [configure] '/usr/bin/initdb --pgdata '/var/lib/pgsql/data'' returned 1 instead of one of [0]
     2023-09-25 20:39:16 [ERROR ] [configure] /Stage[main]/Postgresql::Server::Initdb/Exec[postgresql_initdb]/returns: change from 'notrun' to ['0'] failed: '/usr/bin/initdb --pgdata '/var/lib/pgsql/data'' returned 1 instead of one of [0]
     2023-09-25 20:39:16 [DEBUG ] [configure] /Stage[main]/Postgresql::Server::Initdb/Exec[postgresql_initdb]: Evaluated in 0.53 seconds
    

Resolution

  • For a successful installation, ensure sufficient disk space for the Postgresql partition by verifying and, if necessary, allocating additional space on the designated partition.

Root Cause

  • The Red Hat Satellite installation failed because there wasn't enough space on the disk during the Postgres installation. This lack of space prevented processes from running as they should, failing to initiate.

     $ df -h
       Filesystem                        Size  Used Avail Use%  Mounted on
       /dev/mapper/rhel8-lv_pgsql        1G     1G   0    100%  /var/lib/pgsql
    

Diagnostic Steps

  • To address the installation failure in Red Hat Satellite 6 caused by insufficient disk space, follow these essential steps:

      1. Verify Disk Space:
        Confirm the available space on the PostgreSQL partition, ensuring it meets the requirements for initdb and subsequent processes.
      1. Disk Cleanup:
        Identify and remove unnecessary files to create additional space on the PostgreSQL partition.
      1. Consider Partition Resizing:
        If needed, explore resizing the partition to accommodate the PostgreSQL initdb process effectively.
      1. Rerun the Installer:
        After successfully allocating sufficient disk space, proceed to rerun the Satellite installer for a successful completion.
SBR
Product(s)
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.