Personal tools
You are here: Home Storage Ubuntu Hardy Server Edition problems

Ubuntu Hardy Server Edition problems

Posted by Rafal Zawadzki at Jun 27, 2010 10:49 AM |

solutions of few problems which I unfortunately found using Ubuntu Hardy LTS Server Edition

This post includes note  from my previously blog - I decided to included it in agregation purposes.

Raid / boot

Unfortunately, since years support for raid is broken in Ubuntu. If you need details - just google for "Ubuntu reliable raid" or "Ubuntu raid boot problem" and similar phrases. Every time when I have hardware problems with one of my servers - I stuck at raid problems.

Today I coudn't start properly jabberpl.org server - boot process had been interrupting and every time finished with busybox.So, I started to digg into problem.

First, I checked if arrays had been correctly recognised. cat /proc/mdstat showed me "no arrarys". I tried to reassembly them:

 mdadm --examine --scan >/tmp/md
 mdadm --assemble --scan --config=/tmp/md
after this right was ready to work. I exited busybox and my machine was fully operation again. But without possibility to bot again ;) Next thing which I checked was mdadm hook for initramfs, which usually is here:
 /usr/share/initramfs-tools/hooks/mdadm
This file has been orignally taken from Debian, then reedited and 'tuned' for Ubuntu. And usually causes a lot of problems. So I decided to fix it - to add reassembly lines at the end of the hook:
root@idoru:~# cat /usr/share/initramfs-tools/hooks/mdadm |tail -n 4
mdadm --examine --scan >/tmp/md
mdadm --assemble --scan --config=/tmp/md
exit 0
root@idoru:~#
and then I recreated initramfs:
update-initramfs -k all -c
and finally rebooted machine. Since that operation my server is able to reboot flawlessly.

Missing logrotate config

Few days ago I noticed, that some log files are not rotating. After short investigation I discovered, that all of them were part of syslogd logs. I checked all configs in /etc/logrotate.conf, /etc/logrotate.d/, /etc/cron.daily/ and /etc/cron.weekly/ and I found that there is no any task which could rotate these logs. Strange. So, I created /etc/logrotate.d/syslog file with following content:

/var/log/mail.warn /var/log/daemon.log /var/log/messages /var/log/syslog /var/log/mail.log /var/log/auth.log  /var/log/mail.info {

daily
missingok
rotate 365
compress
notifempty
create 610 syslog adm
postrotate
/etc/init.d/sysklogd reload
endscript
}

Comments (0)