InnoDB: Error: log file ./ib_logfile0 is of different size

InnoDB is insanely picky about it's config; if something's not right, it'll just give up and go home. To make a change to the log file size without data loss:

  1. Revert any config changes you've made to the log file size and start MySQL again.
  2. In your running MySQL: SET GLOBAL innodb_fast_shutdown=0;
  3. Stop MySQL
  4. Make the configuration change to the log file size.
  5. Delete both log files.
  6. Start MySQL. It will complain about the lack of log files, but it'll create them and all will be well.

Tags:

Modules that break Varnish caching, and how to fix them

Admin (v. 2.0)

Problem

Adds a DrupalAdminToolbar cookie that is needed server-side to prevent "slow load JS flicker"

Solution

Most users won't have access to the admin toolbar, so this is probably a moot point

More Info

See this exchange with module's maintainer, yhahn, on #open-atrium:

Tags:

How to setup custom nameservers with 1and1 control panel?

First create respective subdomains like ns1.mydomain.com and ns2.mydomain.com:

  • Go to 'Administration' > 'manage domains'
  • Click the little arrow on 'New' (left side of manage domains toolbar) and click on subdomains
  • Type ns1 for the subdomain and choose your domain from the drop down on the right
  • Go back to manage domains and click on 'DNS'
  • Enter ns1.mydomain.com for the primary nameserver and ns2.mydomain.com for the secondary nameserver

How to properly close MySQL port 3306 from outer networks

To close port #3306 from outside networks add this to /etc/my.cnf' under the [mysqld] section:


skip-networking

then run 'service mysqld restart' and then 'netstat -tln' to see if the port comes up in the list of open ports:

root@my:/var/named#
netstat -tln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN

Creating and mounting swap in SSH

Some server that I am working with has no swap space mounted in the server. Swap is necessary as backup of our physical memory in case system needs more memory than what it has at that time and also increase application loading speed especially when starting and closing application.

Swap space can be setup in 2 ways, as partition or as a file. Since this server is already online and I have many free partition left in “/” partition, so it may good for me just to create swap file rather than swap partition.

My variables as below:

OS: RHEL 5.7 64bit (Tikanga)

Tags:

How to change custom CentOS kernel to stock CentOS kernel

First, install the stock Centos kernel via yum. Write down the version it installs!


yum install kernel

Check in /boot if the files are there:


ls -al /boot

You should see "vmlinuz-2.6.32-279.19.1.el6.x86_64" and "initramfs-2.6.32-279.19.1.el6.x86_64.img"

Then, check your root partition, and write it down. Look for "/", and write down the filesystem (/dev/md1 in this example)
df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 20317384 997168 18296272 6% /

Tags:

Removing GPT information from a drive

1. Type "parted /dev/", usually "parted /dev/sda".
2. Once inside parted type "mktable":
-> Table type: msdos
-> Destroy data: yes
-> quit
3. GPT should now be removed.

Speeding Up Linux Software Raid Building And Re-syncing

The /proc/sys/dev/raid/speed_limit_min is config file that reflects the current "goal" rebuild speed for times when non-rebuild activity is current on an array. The speed is in Kibibytes per second, and is a per-device rate, not a per-array rate . The default is 1000.

The /proc/sys/dev/raid/speed_limit_max is config file that reflects the current "goal" rebuild speed for times when no non-rebuild activity is current on an array. The default is 100,000.

To see current limits, enter:

# sysctl dev.raid.speed_limit_min
# sysctl dev.raid.speed_limit_max

Fix for Centos 6.3 Software RAID not loading GRUB on /dev/md0

If you’ve just installed CentOS 6 on software RAID and it won’t boot off /dev/md0, try the following:

1. Using your CentOS install media, boot in to rescue mode
2. Once you are booted in to rescue mode, select the “start shell” option
3. Enter the following command:

chroot /mnt/sysimage

4. Re-install GRUB

grub-install /dev/md0

5. Reboot

Tags:

Setting up Root Kit Hunter on CentOS 6.x

1. Install Rkhunter


yum install -y rkhunter file

2. Update Rkhunter


rkhunter --update

3. Run a Test Scan (help to prevent false positives):


rkhunter -c

4. Setup a daily scan report:

vi /etc/cron.daily/rkhunter
-----------------//--------------
#!/bin/bash
(
/usr/bin/rkhunter --versioncheck --nocolors
/usr/bin/rkhunter --update --nocolors
/usr/bin/rkhunter --checkall --nocolors --skip-keypress
) | /bin/mail -s 'rkhunter Daily Run ' [email protected]
exit 0
-----------------//--------------

Tags:

Pages

Subscribe to Front page feed