[Ovirt-devel] [PATCH node] Bootup mounts the local log partition if it exists

Bryan Kearney bkearney at redhat.com
Wed Jan 14 18:29:44 UTC 2009


Perry Myers wrote:
> Bryan Kearney wrote:
>> Perry Myers wrote:
>>> The logs-backup directory is just to catch any logs that get created 
>>> between the system starting and ovirt-early coming up, correct?  
>>> Should be minimal messages and dmesg output probably.  Any way to get 
>>> the log partition mounted earlier than ovirt-early 


So.. I dont know the use case well enough. Is the annoyance of the error 
message better/worse then a good documented step?

>>
>>
>> ovirt early runs very early (01), and mounting of the logs is done 
>> first in that script. I believe that minimizes the impact.
> 
> If /etc/fstab contained an entry to mount the log partition then there 
> would be no log discontinuity right?  Would there be any harm to always 
> putting /var/HostVG/Logging /var/log into /etc/fstab during Node 
> creation?  Before the partition is created (or if it is never created) 
> there will be an error on init saying that the partition couldn't be 
> mounted, but perhaps we can muck with init to swallow that error.
> 
> If we do this then there is no log discontinuity and no need for the 
> logs-backup directory at all.

Lemme play around with it.

> 
>> so that we minimize log
>>> discontinuity?  Also it looks like logs-backup directory is itself 
>>> not persistent.  So the early logs will always get lost.  Perhaps we 
>>> should do:
>>>
>>> cp -R /var/log /var/logs-backup
>>> mount /dev/HostVG/Logging /var/log
>>> rm -Rf /var/log/logs-backup
>>> mv /var/logs-backup /var/log
>>
>> I will add that to the patch and re-send it.
> 
> This wouldn't be necessary if we do the fstab changes above.
> 
>>>
>>> That way the logs-backup is persisted at least for one boot.
>>>
>>> Also, what about logs created during firstboot?  We need a patch that 
>>> makes it so immediately after the Node has the log partition created 
>>> from o-c-storage the log partition is mounted and logs in the 
>>> non-persistent log partition are moved over.  Otherwise we lose all 
>>> of the log output from the firstboot scripts.
>>
>> Good catch..i will add that as well. Given the resolution above, these 
>> will be available for 1 reboot only. Unless we put in a rolling logic 
>> (keep logs for 3 reboots). Thoughts?
> 
> This is the one case where fstab changes wouldn't remove need for 
> logs-backup directory.  However, since this is a one time thing (only 
> during firstboot) we could make it a firstboot-logs directory that is in 
> /var/log and since firstboot is only done once the logs would never be 
> overwritten.
> 
> Perry




More information about the ovirt-devel mailing list