----- "Frank Corrao" <[EMAIL PROTECTED]> wrote:
> Greetings,
>
> I'm currently using systemimager 3.8.2 and would like to take
> advantage
> of the lvm support that has been added. I've defined 2 partitions on
> the disk and used the size="*" statement to specify that the second
> partition should use all of the remaining space since I won't know the
> size of the disk in advance. This partition will make up VolGroup00.
> Within VolGroup00 I want to define a 2GB logical volume for swap and
> use the remaining space in the volume group to create a logical volume
> for /. Unfortunately the lv statement doesn't seem to recognize
> size="*" as the part statement does. Omitting the size= definition
> doesn't seem to work either. Is there any other way to accomplish
> this without knowing the size of the physical disk?
>
> Frank
>
Hi Frank,
You can accomplish this by modifying the .master install script. The below
example creates a 800 MB swap and 30 GB /root. The script then determines the
amount of memory in the system and doubles it for swap. Extends the swap LV to
the correct amount of swap and then extends the /root LV to the end of the disk.
### BEGIN LVM volumes creation commands -AR- ###
logmsg "lvcreate -L30G -n root ubuntu || shellout"
lvcreate -L30G -n root ubuntu || shellout
logmsg "lvscan > /dev/null; lvchange -a y /dev/ubuntu/root || shellout"
lvscan > /dev/null; lvchange -a y /dev/ubuntu/root || shellout
logmsg "lvcreate -L800M -n swap_1 ubuntu || shellout"
lvcreate -L800M -n swap_1 ubuntu || shellout
logmsg "lvscan > /dev/null; lvchange -a y /dev/ubuntu/swap_1 || shellout"
lvscan > /dev/null; lvchange -a y /dev/ubuntu/swap_1 || shellout
memory=$(cat /proc/meminfo | grep MemTotal | sed 's/^MemTotal://' | sed 's/^[
\t]*//' | sed 's/ kB$//')
swap=$(($memory * 2))
lvextend -L ${swap}K /dev/ubuntu/swap_1 || shellout
vg_space=$(vgdisplay | grep Free | sed 's/^ Free PE \/ Size //' | sed
's/ \/.*//')
vg_mb_space=$(($vg_space * 4))
lvextend -L +${vg_mb_space}M /dev/ubuntu/root || shellout
### END LVM volumes creation commands ###
Best, Carl
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
sisuite-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sisuite-users