hiya

>> IMO you defined to create a swap partition, which is at least 20% of
>> your disk, but should not be bigger than 4GB. This may be
>> self-contradictory for your disk size.

> Sure, I understand why this configuration fails. What I don't understand
> is how to get the desired effect. For instance, if I write 1G-4G, I get
> 3.4G on an 80G disk. But I want 4G in this case...

Write a hook that acts between the disk_config template and setup_storage
and has some more sophisticated logic?

At least that's the way I chose to be able to provide different volume
group names and/or different filesystems for different environments
without creating 25something templates which basically all tell the same
story.

[Added bonus: This way I can control volumegroup names and filesystems
even on a per-host base.]

I've attached the relevant files.
- copy DISKlvm to disk_config/
- copy partition.DISKlvm to hooks/
- define a class DISKlvm during class/ scripts

I think that's it. This hook does not configure filesystem sizes yet, but
that's probably not too hard to implement.

Warning: I wrote this quite some time ago. It worked since then and I
never bothered to review the code.

tschüß
thomas

Attachment: partition.DISKlvm
Description: Binary data

Attachment: DISKlvm
Description: Binary data

Antwort per Email an