Set up SUSE Manager with Separate Disk for BYOS

1. Issue

SUSE Manager setup results with an error while restarting services during setup. The setup fails on restarting tomcat.

tshoot error 1

2. Reason

When SUSE Manager is set up using separate disks for cache, PostgreSQL and spacewalk, the existing data within these partitions are covered under the new mount point.

tshoot partitions

Because of this, data for certain services like tomcat go missing due to a broken symbolic link.

tshoot broken symlink

As SUSE Manager instance of cloud already has some services set up, when the data is not available during set up it causes the service to not restart as expected. Therefore the setup fails.

tshoot incomplete files

Actual data which should be present:

tshoot actual files

3. How to Recreate

Procedure: Recreating the issue
  1. AWSでプロビジョニングされたSUSE Managerサーバは、BYOSに関連するAMIを使用します。

  2. Separate storage for spacewalk, PostgreSQL and cache. The size of the partition depends on the repository to be synchronized.

  3. Set up SUSE Manager using yast2 susemanager_setup.

4. Resolution

To resolve or avoid the issue, copy the data of the underlying partition into the new partition by following the steps below:

Procedure: Resolving the issue
  1. バックアップパーティションを作成します。

    mkdir /bkp
  2. Unmount the affected partition for example /var/cache.

    umount /var/cache
  3. Check the underlying data in the partition. This should list the actual data present in the directory.

    ls -l /var/cache
  4. Copy the data onto the backup partition created in step 1.

    cp -prav /var/cache/* /bkp/
  5. Mount the partition again using option 1 or 2:

    (option 1)   /dev/nvme0nxx /var/cache
    (option 2)   mount -a (if you have the entries under /etc/fstab)
  6. ステップ4でバックアップしたデータをマウントされたパーティションにコピーします。

    cp -prav /bkp/* /var/cache/
  7. データが存在することを確認します。

    ls -l /var/cache/
  8. SUSE Managerのセットアップを繰り返します。

    yast2 susemanager_setup

5. Conclusion

When using SUSE Manager in public cloud with separate data partitions, make sure that the existing data in those directories are copied onto the new partition.