Wednesday, September 12, 2012

How to disable IPV6 on RedHat 6.x and CentOS 6.x

Recommends not disabling the ipv6 module, as that can cause issues with SELinux and other components, but adding the following to /etc/sysctl.conf:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
 

Monday, May 16, 2011

Raid Tips & Tricks

Increasing the rebuild speed

Sometimes when you’re quite lazy or bored and don’t like the noticeable amount of free resources on your server, you may like to increase the raid building and resyncing process speed.

# echo 250000 > /proc/sys/dev/raid/speed_limit_max
# echo 250000 > /proc/sys/dev/raid/speed_limit_min



And this would spin up the hards faster to their maximum extent saving almost half of the time!
Defaults were:

# cat /proc/sys/dev/raid/speed_limit_max 200000
# cat /proc/sys/dev/raid/speed_limit_min 1000


Thursday, February 17, 2011

Bonding on RedHat 5 / CentOS 5

In the modprobe.conf file add the following:

alias bond0 bonding
options bond0 miimon=100 mode=1
Be sure to add this before any of the network aliases modes:

mode=0 (Balance Round Robin)
mode=1 (Active backup)
mode=2 (Balance XOR)
mode=3 (Broadcast)
mode=4 (802.3ad)
mode=5 (Balance TLB)
mode=6 (Balance ALB)

Monday, February 14, 2011

Zero Configuration Network (ZEROCONF)

Most Linux distributions utilise the Zero Configuration Network (ZEROCONF) automation suite. This is an IETF workgroup that planned and coordinated a series of dynamic configuration protocols to allow many operating systems to automatically configure themselves and communicate on a network without the need of DHCP or DNS servers. ZEROCONF utilises the 169.254.0.0/16 network address to autoconfigure using a series of unanswered "ARP" queries and then assumes an address if the queries yield an empty result.

Monday, August 23, 2010

Replacing A Failed Hard Drive In A Software RAID1 Array

Replacing A Failed Hard Drive In A Software RAID1 Array

Version 1.0
Author: Falko Timme
Last edited 01/21/2007


This guide shows how to remove a failed hard drive from a Linux RAID1 array (software RAID), and how to add a new hard disk to the RAID1 array without losing data.
I do not issue any guarantee that this will work for you!

1. Preliminary Note

In this example I have two hard drives, /dev/sda and /dev/sdb, with the partitions /dev/sda1 and /dev/sda2 as well as /dev/sdb1 and /dev/sdb2.

/dev/sda1 and /dev/sdb1 make up the RAID1 array /dev/md0.
/dev/sda2 and /dev/sdb2 make up the RAID1 array /dev/md1.
/dev/sda1 + /dev/sdb1 = /dev/md0
/dev/sda2 + /dev/sdb2 = /dev/md1
/dev/sdb has failed, and we want to replace it.

Friday, April 30, 2010

Disabling IPv6 in RHEL 5.5 and Fedora 12, 13

To disable IPv6 in RHEL 5.5:

1. Add the following lines to /etc/modprobe.conf:

alias net-pf-10 off
options ipv6 disable=1


Squid: WARNING! Your cache is running out of filedescriptors

So you have a LAN with 50+ users and you set up a nice Squid w3cache as a transparent proxy with 100GB of space reserved for the cache (hdds are so cheap nowadays…). Weeks pass and suddenly you notice that something is messing up your web experience as Firefox suddenly decides to run painfully slow. About 30 minutes wasted on finding the culprit (like changing your DNS servers, clearing browser cache, etc.) until you decide to check the router and then the Squid with its logs. And then you find something fishy:

2007/01/01 17:51:19| WARNING! Your cache is running out of filedescriptors
2007/01/01 17:51:35| WARNING! Your cache is running out of filedescriptors
2007/01/01 17:51:51| WARNING! Your cache is running out of filedescriptors
(...)