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. Create a backup partition

    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. Copy the backed up data from step 4 to the mounted partition

    cp -prav /bkp/* /var/cache/
  7. Verify the data is present

    ls -l /var/cache/
  8. Repeat the SUSE Manager setup

    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.