Specifying sizes in setup-storage
Thomas Neumann
blacky+fai at fluffbunny.de
Wed Sep 2 13:30:01 CEST 2009
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: partition.DISKlvm
Type: application/octet-stream
Size: 3015 bytes
Desc: not available
Url : http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20090902/c707fda2/attachment.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DISKlvm
Type: application/octet-stream
Size: 1626 bytes
Desc: not available
Url : http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20090902/c707fda2/attachment-0001.obj
More information about the linux-fai
mailing list