Mailinglist Archive: opensuse-buildservice (124 mails)

< Previous Next >
Re: [opensuse-buildservice] Confused about LVM and bootstrap process

A couple of things are unclear on that page:
1) exactly how to create the LVM volume group and logical volume,

[Frank Schreiner]:
I think there are enough Howto`s out there to describe the lvm setup

*If* it was clear that LVM is optional -- not necessary when playing
around, but recommended for production setups -- yes, I would agree.
But it would be nice to link to a good howto, and to mention something
like "you need to attach the loopback device containing your 'OBS'
volume group to the VM before booting it". (I'm just guessing here!
That might not be an accurate statement.)

2) whether the "OBS" VG is required or merely desirable, and

I have to admit that it would be a good idea to mention that LVM setup
is optional

It's not clear how to submit a patch to that web page. So here is a
suggested rework of the "Appliance Configuration" section:

Appliance Configuration

On first boot the system adapts to the hardware and defaults to
automatic IP and DNS configuration via DHCP. For an
experimental/throwaway server, that should be enough. But if you run
lots of builds, you'll quickly use up the disk space in that VM.
Also, your data will be lost if you upgrade by replacing the VM

A more robust approach is available: on your host system, create an
LVM volume group named "OBS". Make sure this volume group is at
least XX GB. You can create it either on real disks (e.g.
/dev/sd??), or with loopback devices. Attach the device containing
the "OBS" volume group to your VM before boot, and OBS will use the
volume group for worker filesystems. Additionally, if this volume
group contains a logical volume named "server", it will be used as
the data partition for the server.

To update your OBS server, you can use system tools (YaST or
zypper). Or you can replace the entire image—although if you do that
without the LVS setup, all your data will be lost.

3) how to tell if OBS is using those LVM volumes.

all the magic happens in init script "obsstoragesetup". This script
must be enabled and in /etc/sysconfig/obs-server


must be set.

Ah! Thank you, getting closer. I did not know about that config file,
and I don't know which init scripts I'm supposed to enable/start
manually and which are enabled out of the box for me.

So, OBS_STORAGE_AUTOSETUP is already set for me:

# grep STORAGE /etc/sysconfig/obs-server

But the init script was not enabled. I did that and now I see this in
the log (journalctl -u obsstoragesetup):

Nov 23 01:01:45 obstest obsstoragesetup[7363]: ERROR: Not enough space
for worker root LVs, just -12290 MB, but at least 4 GB needed.

Ah-ha! Progress!

Incidentally, my "OBS" volume group is 10 GiB, and the "server"
logical volume is 4 GiB. I just picked those numbers out of thin air,
since the docs gave me no guidance. I'll make the volume group bigger
and see what happens. But it looks like there is a bug in the code
that generates that error message.

Thanks for the help,

To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx

< Previous Next >