Using "mgr-storage-server" fails when used with LVM devices
This document (000021506) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Manager Server 5.0.0
Situation
When specifying LVM devices with "mgr-storage-server" this fails with an error, example:
mgr-storage-server /dev/vg-spacewalk/lv-spacewalk /dev/vg-pgsql/lv-pgsql --> Checking disk for content signature --> Creating partition on disk /dev/dm-0 --> Creating xfs filesystem Error: xfs filesystem setup failed: Error accessing specified device /dev/dm-01: No such file or directory
Resolution
NOTE: "mgr-storage-server" and "mgr-storage-proxy" have since been enhanced to support LVM based devices, if the problem described here is still encountered, make sure the latest Multi Linux Manager is being used. From version 5.0.2 on wards there is no need anymore for the below work around to be used.
Note that for Virtual Machine based or Cloud based installations, the recommendation is to not use LVM anymore, as was the case with SUSE Manager 4.3.
The below workaround is ONLY needed if the installation is being done on bare metal and LVM is being used.
Take the following steps as a workaround:
1. Set up the LVM devices as required (using pvcreate, vgcreate and lvcreate) for the Database device and the spacewalk storage device.
2. Create the mount points for the DB and spacewalk devices:
mkdir /var/spacewalk mkdir /var/lib/pgsql
3. Create the XFS file system on the two LVM devices created with 1. above:
mkfs.xfs /dev/<insert_vg>/<insert_lv>
4. Obtain the UUID of the LVM device mapper LVM devices using for example "blkid". The output should look something like this example:
:~ # blkid /dev/mapper/vg--spacewalk-lv--spacewalk: UUID="3770ceaf-4a7b-483a-af33-bf81efae210f" BLOCK_SIZE="512" TYPE="xfs" /dev/mapper/vg--pgsql-lv--pgsql: UUID="38dbbe51-e3b9-4055-9255-81998d050116" BLOCK_SIZE="512" TYPE="xfs" /dev/sdc: UUID="u1R0mP-sVuv-w097-IjrS-G3R3-ITOB-bbzBd2" TYPE="LVM2_member" /dev/sda: UUID="RpZoOx-O0ZE-nGMZ-DcEB-HXcm-9vn9-kPap1L" TYPE="LVM2_member"
5. Add the mount information for the relevant UUID's to the "/etc/fstab" file, using the above example output:
UUID=3770ceaf-4a7b-483a-af33-bf81efae210f /var/spacewalk xfs defaults 0 0 UUID=38dbbe51-e3b9-4055-9255-81998d050116 /var/lib/pgsql xfs defaults 0 0
6. Reboot and verify the devices have been properly mounted after the reboot.
7. Under the directory "/var/lib/containers/storage" create the "volumes" directory:
mkdir volumes
8. In the "/var/lib/containers/storage/volumes" directory create the following two symlinks:
/var/lib/containers/storage/volumes # ln -s /var/spacewalk var-spacewalk /var/lib/containers/storage/volumes # ln -s /var/lib/pgsql var-pgsql
9. Now it should be possible to run "mgradm podman install <fqdn>" normally to install using the LVM devices for the database and spacewalk storage.
Cause
With version 5.0 it was not possible to specify LVM devices when using "mgr-storage-server", however it has since been enhanced to allow using LVM devices.
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:000021506
- Creation Date: 25-Jul-2024
- Modified Date:11-Jun-2025
-
- SUSE Manager Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com