[Ovirt-devel] [PATCH] oVirt Node local installation

Alan Pevec apevec at redhat.com
Sat Aug 23 02:18:04 UTC 2008


Perry N. Myers wrote:
>>  /config - local oVirt configuration (ktab, local admin password...)
>>  /boot - boot loader, kernel and initramfs
>>  /LiveOS - oVirt Node compressed livecd image
> 
> Is the initramfs repeated twice then?  Once inside of the LiveCD and 
> once in /boot?  Or am I just reading this wrong...

There's just one, livecd-tools created, initrd0.img, LiveOS contains only squashfs.img containing ext3fs.img containing real root fs.

>>   ovirt_init=usb|scsi[:serial#]
> So if you leave off serial#, how does it choose the disk?  Does it just 
> take the first device (i.e. /dev/sda) and start using it?

Yes, it will take the first device, skipping current /dev/live and format it.
As per IRC discussion, ovirt_init syntax is changed to: ovirt_init[=usb|scsi[:serial#]]
just 'ovirt_init' w/o value will initialize /config on /dev/live if writable

>> [1] one-liner to list serial#s for all disks in the system:
>> for d in /dev/sd?; do eval $(udevinfo --query env --name $d); echo $d 
>> $ID_SERIAL;done
> 
> Problem with this is it assumes someone has booted linux on the box 
> before and has access to the above command.  I think for the most part 
> people will not have the serial #s to work with.  It's fine to leave 
> this functionality in, I just wonder how much it would be used.

In theory, external USB flash could be plugged into admin's workstation running Linux, and if it's internal flash device, OEM might have a way to predict the serial#
But you're right, I don't have really useful use-case for serial#. I guess we can still leave it there and document only in troubleshooting or advanced doc chapter.

> Other question is...  Should we have a sane default in the init scripts? 
> i.e. even if you don't pass in ovirt_init the init script does the 
> following:
> 
> 1. Looks to see if there is an existing OVIRT partition and if so mounts
>    it
> 2. If one does not exist looks for the first hard disk with free space on
>    it and creates the OVIRT partition there.
> 3. If no hard drive space is available then it looks for the first flash
>    disk with free space on it and creates the OVIRT partition there.
> These partitions are for config only, unless the ovirt_local_boot was 
> passed on the cmdline, in which case the local installation is done.
> This way the admin is not forced to always use the ovirt_init parameter 
> on every machine in the datacenter.  The node will do the right thing if 
> the OVIRT partition is not already there.

I don't think we should make any local changes w/o explicit admin action (i.e. ovirt_* parameter now, local console config utility later) - for mass deployment admin will use PXE and cobbler, allowing him to specify boot parameters per machine and for SMB use-case we could increase usability by providing boot menu option "Install to local storage"

> Also, steps 2 and 3 can be used to set up local swap if it doesn't 
> already exist.

Local swap will be allocated from a logical volume created from remaining local disk space.
This is TBD, I'll address it as a separate patch.

> Also, if ovirt_local_boot is passed on the command line, the OVIRT 
> partition should never be placed on the same flash device as the one 
> that was booted since that device is transient.

yes, device pointed by /dev/live symlink is skipped

>> +ls -l /dev/disk
>> +        mkdir -p /dev/disk/by-label
>> +ls -l /dev/disk/by-label
> 
> Are the two ls lines above missing indentation?

debugging leftover, I'll remove that

>> +      cat > $ovirt/boot/grub/grub.conf <<EOF
>> +default=0
>> +timeout=2
>> +hiddenmenu
>> +title oVirt Managed Node
>> +    root (hd0,$part_num)
>> +    kernel /boot/vmlinuz0 ro root=LABEL=OVIRT roottypefs=ext2 liveimg
>> +    initrd /boot/initrd0.img
>> +EOF
> 
> Ian will need to add to this patch later for some serial console stuff 
> probably.

fixed by passing console= parameters from the current /proc/cmdline and adding them to grub entry

attached is the revised patch I'm about to push
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-oVirt-Node-local-installation.patch
Type: text/x-patch
Size: 16672 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/ovirt-devel/attachments/20080823/f92468b8/attachment.bin>


More information about the ovirt-devel mailing list