VMware vCenter Server Appliance 内の vPostgres データベースの領域の再要求が次のエラーにより失敗する: domain socket "/tmp/.s.PGSQL.5432
search cancel

VMware vCenter Server Appliance 内の vPostgres データベースの領域の再要求が次のエラーにより失敗する: domain socket "/tmp/.s.PGSQL.5432

book

Article ID: 343638

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:

免責事項: これは英文の記事 「Reclaiming space on vPostgres databases within the VMware vCenter Server Appliance fails with error: domain socket "/tmp/.s.PGSQL.5432 (2111236)」の日本語訳です。記事はベストエフォートで翻訳を進めているため、ローカライズ化コンテンツは最新情報ではない可能性があります。最新情報は英語版の記事で参照してください。


  • VMware vCenter Server Appliance 内の vPostgres データベースの領域の再要求に失敗する
  • VacumeDB スクリプトの実行時に次のエラーが表示される: # sudo -u postgres /opt/vmware/vpostgres/1.0/bin/vacuumdb -a -e -v -f -U postgres > /tmp/vacuumdb.log

    vacuumdb: could not connect to database postgres: could not connect to server: No such file or directory
    Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

  • /storage/db/vpostgres/serverlog にクリーンアップ操作を実行するための容量が残っていない

    <YYYY-MM-DD>T<time> UTC db: pid:3570 FATAL: could not write lock file "/tmp/.s.PGSQL.5432.lock": No space left on device
    <YYYY-MM-DD>T<time> UTC db: pid:3462 FATAL: could not write lock file "/tmp/.s.PGSQL.5432.lock": No space left on device
    <YYYY-MM-DD>T<time> UTC db: pid:3478 FATAL: could not write lock file "/tmp/.s.PGSQL.5432.lock": No space left on device
    <YYYY-MM-DD>T<time> UTC db: pid:4683 FATAL: could not write lock file "/tmp/.s.PGSQL.5432.lock": No space left on device
    <YYYY-MM-DD>T<time> UTC db: pid:5756 FATAL: could not write lock file "/tmp/.s.PGSQL.5432.lock": No space left on device</time></time></time></time></time>


Environment

VMware vCenter Server Appliance 6.0.x
VMware vCenter Server Appliance 5.0.x
VMware vCenter Server Appliance 5.1.x
VMware vCenter Server Appliance 5.5.x

Cause

この問題は、データベースが存在するパーティションに領域が残っていない場合に発生します

Resolution

この問題を回避するには、少なくとも postgres データベースの 1.5 倍のサイズの新しい VMDK ディスクを追加し、データベースをその新しいディスク パーティションにコピーします。

次の手順を実行して、新しい VMDK ディスクを追加し、データベースをコピーします。
  1. 仮想マシン編集設定オプションを使用して、少なくとも postgres データベースの 1.5 倍のサイズの新しい VMDK を追加します。
  2. ディスクを初期化するには:
    1. root を使用してアプライアンスにログインします

    2. 'df -h' の出力を確認します

      # df -h

      Filesystem Size Used Avail Use% Mounted on
      /dev/sda3 9.8G 9.6G 0 100% /
      udev 4.0G 104K 4.0G 1% /dev
      tmpfs 4.0G 0 4.0G 0% /dev/shm
      /dev/sda1 128M 21M 101M 18% /boot
      /dev/sdb1 20G 173M 19G 1% /storage/core
      /dev/sdb2 20G 2.3G 17G 12% /storage/log
      /dev/sdb3 60G 54G 2.7G 96% /storage/db

    3. /dev を参照して、ls | grep -i sd を実行します

      ls | grep -i sd

      sda
      sda1
      sda2
      sda3
      sdb
      sdb1
      sdb2
      sdb3
      sdc

      : sdc は手順 1 で追加した新しいデバイスです。新しいデバイスが表示されない場合は、アプライアンスを再起動します。

    4. 新しいディスクをフォーマットするには、次のコマンドを実行します。

      fdisk /dev/sdc

      新しいパーティションを作成するには、以下を入力します: n
      プライマリ パーティションを作成するには、次を入力します: p
      パーティションを指定された設定で作成するには、次を入力します: w

    5. 新しいデバイス上にファイル システムを作成します

      mkfs -t ext3 /dev/sdc

    6. マウント ポイントを作成し、デバイスをマウントします

      mkdir /storage/sdc/
      mount /dev/sdc /storage/sdc/

    7. df -h の出力を再度確認します
    Filesystem Size Used Avail Use% Mounted on
    /dev/sda3 9.8G 9.6G 0 100% /
    udev 4.0G 112K 4.0G 1% /dev
    tmpfs 4.0G 0 4.0G 0% /dev/shm
    /dev/sda1 128M 21M 101M 18% /boot
    /dev/sdb1 20G 173M 19G 1% /storage/core
    /dev/sdb2 20G 2.2G 17G 12% /storage/log
    /dev/sdb3 60G 54G 2.7G 96% /storage/db
    /dev/sdc 99G 188M 94G 1% /storage/sdc

  3. 次のコマンドを実行して、VMware Postgres サービスを停止します。

    service vmware-vpostgres stop

  4. DB を新しいディスク パーティションにコピーします

    cp -ar /storage/db/vpostgres /storage/sdc/vpostgres

  5. データベースを新しい場所から起動します

    sudo -u postgres /opt/vmware/vpostgres/1.0/bin/pg_ctl -D /storage/sdc/vpostgres start

  6. vacuum コマンドを再度実行します

    sudo -u postgres /opt/vmware/vpostgres/1.0/bin/vacuumdb -a -e -v -f -U postgres > /tmp/vacuumdb.log


Additional Information

Reclaiming space on vPostgres databases within the VMware vCenter Server Appliance fails with the error: domain socket "/tmp/.s.PGSQL.5432"