vzdump LVM snapshots kernel errors
Tue, 03/31/2009 - 09:49 — sandipOn running daily lvm snapshot backups via vzdump on OpenVZ servers, I noticed the below Kernel errors in logwatch reports.
WARNING: Kernel Errors Present
Buffer I/O error on device dm-4, ...: 22 Time(s)
EXT3-fs error (device dm-4): e ...: 60 Time(s)
lost page write due to I/O error on dm-4 ...: 22 Time(s)
This would show up on busy servers only, probably caused due to lvm snapshot running out of space.
I edited "/usr/bin/vzdump" and increased the size from 500m to 1000m which seems to have resolved the issue for now.
run_command (\*LOG, "$lvcreate --size 1000m --snapshot --name vzsnap /dev/$lvmvg/$lvmlv");
- sandip's blog
- Login or register to post comments
set_loginuid failed opening loginuid
Tue, 02/03/2009 - 10:51 — sandipIf this file doesn't exist:
/proc/<pid of crond>/loginuid
It's because the kernel doesn't have AUDIT enabled. So you get a bunch of errors in "/var/log/secure" with "set_loginuid failed opening loginuid".
Recompile kernel with audit support:
CONFIG_AUDIT=y
CONFIG_AUDITSYSCALL=y
If recompiling of kernel is not an option then:
Comment the below lines from all pam.d files.
session required &nbs p; pam_loginuid.so
Find files via:
# grep -l pam_loginuid.so /etc/pam.d/*
/etc/pam.d/atd
/etc/pam.d/crond
/etc/pam.d/login
/etc/pam.d/remote
/etc/pam.d/sshd
Automatically reboot server after a kernel panic
Tue, 03/25/2008 - 09:12 — wizapAdd panic=10 to the kernel command line to reboot with 10 seconds of a kernel error. Be careful with this when setting up new kernels.
It’s possible to change it later with sysctl, or by writing to /proc:
# echo 10 > /proc/sys/kernel/panic
To make it permanent, edit /etc/sysctl.conf and add the below line:
kernel.panic = 10
`sysctl -p` to load the conf file and make permanent.
- wizap's blog
- Login or register to post comments
Kernel compile from source
Sun, 03/02/2008 - 22:26 — sandip1) cd /usr/src
2) unlink linux
3) rm -rfv linux-oldversion
4) wget http://kernel.org/pub/linux/ke
5) tar -jxvf linux-newversion.tar.bz2
6) ln -s linux-newversion linux
7) cd linux
8) make mrproper
9) make oldconfig (you may have to select new options available that wasn't on the old kernel. Generally, you're safe to just keep presseing enter for it to select the default for those new options.)
10) make menuconfig (ONLY if you want to edit kernel configuration)
11) make (go make some coffee)
12) make modules_install
- sandip's blog
- Login or register to post comments
- Read more
Anatomy of Linux Kernel
Sun, 11/18/2007 - 10:53 — sandipImmensely useful article for learning about Linux kernel at IBM DeveloperWorks.
- sandip's blog
- Login or register to post comments
`yum update kernel` without removing old kernels
Mon, 06/18/2007 - 13:22 — sandipEdit "/etc/yum/pluginconf.d/install
[main]
enabled=1
# this sets the number of package versions which are kept
tokeep=2
- sandip's blog
- Login or register to post comments
Mount and read from NTFS partitions on Linux -- Fedora Core 5
Wed, 06/14/2006 - 22:24 — sandip-
Download the specific kernel module rpm from linux-ntfs.org .
You can check the currently installed kernel version using `uname -rm` .
Install via:
# rpm -ivh kernel-module-ntfs-*.rpmCheck the partitions to be mounted:
# fdisk -l | grep NTFS
Note: If using a dual boot, then windows is normally installed in the first partition, "/dev/hda1".
The listed NTFS partition can be mountable after a restart via:# mount -r -o umask=0222 -t ntfs /dev/hda1 /mnt/ntfsFor automated mounts during startup, add the below line in "/etc/fstab" .
/dev/hda1 /mnt/ntfs ntfs ro,defaults,umask=0222 0 0