Setting up SUSE Manager with separate disk for data in Public Cloud (BYOS)

Issue:

SUSE Manager setup results with an error while restarting services during setup.

The setup fails on restarting Tomcat.

<img src="../../assets/images/error-1.png">

Reason:

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

<img src="../../assets/images/partitions.png">

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

<img src="../../assets/images/broken-symlink.png">

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.

<img src="../../assets/images/incomplete-files.png">

Actual data which should be present:

<img src="../../assets/images/actual-files.png">

How to Recreate:

  1. SUSE Manager Server provisioned in AWS uses relevant AMI for BYOS

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

  3. Set up SUSE Manager using yast2 susemanager_setup.

Resolution:

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

  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

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.