Sunday, July 17, 2011

Manage Intel RAID under GNU/Linux using mdadm tool

You may be interesting to read some history about RAID first.
This article is about managing Intel RAID, with mdadm tool, but some information may apply to others kinds.
To begin, you can find lots of information about RAID under GNU/Linux.

IMPORTANT: for Intel's IMSM support you need at least
version 3.2 of mdadm tool (thanks to Iwan for this information).

Usually, there is a container device (let's call it /dev/md127 in this article), and the RAID device (let's call it /dev/md126 in this article).
Instead of long blabla, this article will give some common commands to help manage Intel RAID with mdadm tool.

To report the RAID information from the Option ROM (for instance "Intel(R) Matrix Storage Manager"):
mdadm --detail-platform

To get general details:
mdadm -D /dev/md127

To examine information (including members):
mdadm -E /dev/md127

To assemble the RAID array inside the container, and/or to start it (the -e option declares the style of RAID metadata (superblock) to be used):
mdadm -I -e imsm /dev/md127

To check the current state:
cat /proc/mdstat

Output sample (with a RAID 10 having 4 members):
Personalities : [raid10]
md126 : active raid10 sda[3] sdb[2] sdc[1] sdd[0]
      3907023872 blocks super external:/md127/0 64K chunks 2 near-copies [4/4] [UUUU]
      [=>...................]  resync =  6.6% (258923904/3907024128) finish=305.7min speed=198882K/sec
md127 : inactive sdb[3](S) sda[2](S) sdc[1](S) sdd[0](S)
      9028 blocks super external:imsm

To add it to the configuration file (to be activated automagically at boot):
mdadm --examine --scan >> /etc/mdadm.conf

For advanced commands (including repairing), you should read this.

RAID 10 on Intel ICH10R under GNU/Linux (including HDD devices on Marvell 88SE9128)

After my experience to setup a RAID 0 on Intel ICH10R Vs Marvell 88SE9128; I've recently experienced the setup of
a RAID 10 on Intel ICH10R, using the mdadm tool.

To begin, I've never succeeded to install a bootable Operating System directly on the RAID (tested with Fedora 12, Fedora 13, Fedora 14, Ubuntu 10.04 LTS and Mandriva 2010.1).
So I added an additional HDD device dedicated to the OS, that I plugged on the Marvell 88SE9128 (at the moment, it was more easy with cables).
This time, the OS was bootable, but asap there was more or less I/O stress on drives (OS or RAID ones), the system failed with lots of severe I/O errors, and eventually one of the RAID HDD was declared offline (although it was healthy).

As soon as I plugged all the HDD devices on the Intel ICH10R controller (and after a last OS installation ...), everything became perfect : very efficient and very stable with absolutely no I/O error whatever the stress.
For information, there is no problem with optical devices on the Marvell 88SE9128 controller.

Like in my last article on this subject, I can only conclude that if ever there is a RAID configuration on a system, no HDD devices should be plugged to the Marvell 88SE9128 controller; otherwise the system will be strongly instable and will eventually fail.

Some history about Intel RAID under GNU/Linux (dmraid/mdadm)

Although RAID is supported under GNU/Linux since many years, it is not trivial either.
This article is about Intel RAID, but some information may apply to others kinds.

There is at least two tools allowing to manage RAID devices:

 - dmraid (Device-mapper RAID tool and library)
 - mdadm (controls Linux md devices - software RAID arrays)

Intel RAID can be regarded as pseudo-Hardware-based RAID or Software-based RAID, so the 2 tools can be used.
Anyway, mdadm is more commonly used with modern distribution (for instance Fedora switched from dmraid to mdraid since version 12).

Besides, if you ever have a problem after an OS upgrade, with an existing RAID that you manage with dmraid, you should use the kernel option "noiswmd" which will make the system use dmraid for Intel BIOS RAID instead of mdraid.

Thursday, June 9, 2011

Get KDE4.6 applications smooth again !

Since KDE4.6, some of KDE applications can be very ...
very slow sometimes (kate, konqueror, dolphin).

One of the workaround is too specify another Qt graphical system, for instance using raster:
kate --graphicssystem raster
dolphin --graphicssystem raster

Wednesday, June 8, 2011

Configure easily themes of GTK+ applications, QT4 applications ...

It's not always immediate to configure Themes of Desktop Environment, GTK+ applications and Qt4 applications separately.
For Desktop environment, there is usually embedded tools.

For GTK+ applications, we can use the gtk-chtheme tool.
Under RedHat-like GNU/Linux, it can be installed with the package of the same name:
yum install gtk-chtheme
Each user wanted to configure his GTK+ applications theme can then use this tool.

For Qt4 applications, we can use the qt-config tool.
Under RedHat-like GNU/Linux, it can be installed like that:
yum install qtconfig-qt4
Each user wanted to configure his Qt4 applications theme can then use this tool.

Lots of themes can be found on OpenDesktop.

Friday, June 3, 2011

Control your GNU/Bash Prompt

With GNU/Bash, it is easy to control your prompt, defining PS1 (and optionally PS2 to PS4) environment variable.

For better legibility or whatever reason, you may want to
add further information or colors to prompt.
For instance you can see this page, and this one.

But it is very important to escape special characters dedicated to colors.
For instance, this prompt will NOT work:
export PS1="\e[0;32m\t\e[0m \u@\h:\e[0;36m\W\e[0m$ "

With this prompt, GNU/Bash will NOT work properly while breaking lines (for instance if its length if greater than limit) or while moving to begin/end of them.
To work, it is needed to add escaped bracket between each color escaped characters; this is a working prompt with colors (starting with date and time, and then usual information: user name, host and relative path):
export PS1="\[\e[0;32m\]\t\[\e[0m\] \u@\h:\[\e[0;36m\]\W\[\e[0m\]$ "

To persist your GNU/Bash prompt, you can add this in a GNU/Bash startup file (e.g. $HOME/.bashrc).

Wednesday, April 20, 2011

RAID 0 on Intel ICH10R Vs Marvell 88SE9128

I've recently setup a RAID0 of two SATA 3 (6Gb/s) HDD, on a Asus P6X58D-E.
HDD can not reach theorical efficiencies of SATA 3 because of mechanical limits, but in RAID0 configuration,
such limit can be overriden.
So there was 2 choices:
 - 2 HDD in SATA 3 mode on Marvell 88SE9128 controller
 - 2 HDD in SATA 2 mode on Intel ICH10R controller (2011 specifications update)

For the greatest efficiencies, the reflex is to use the Marvell 88SE9128 controller to benefit from SATA 3 mode.
Despite 2 installation attempts, the system was instable, and performances were drastically variable (easily seen with various Benchmarks).
In addition, it was impossible to get SMART information on any of the HDD.
Because all I've then read on Web was against Marvell, BIOS (, and drivers ( were up to date, I try Intel ICH10R.

It's as quick and easy as to setup RAID0 on Intel ICH10R controller than on Marvell 88SE9128 controller; but that's where the comparison ends.

The read/write efficiencies are greater with Intel ICH10R controller (despite in SATA 2 mode, instead of SATA 3) and very constant. System is as stable as it can be.
The Intel Rapid Storage is interesting to get quick Health information, and there is no problem to get SMART information for each HDD of the RAID.

This is an interesting article comparing these 2 controllers.

For HDD, I think there is no hesitation to have, Intel ICH10R controller is far more better.
Maybe for SSD, for which it is possible to reach SATA 3 theorical limit, Marvell 88SE9128 controller can be better ?
It is another story ...

Friday, April 1, 2011

Fix kind of "GLib-GIO:ERROR:gdbusconnection.c:2270:initable_init: assertion failed" issue

When launching some applications (e.g.: emacs, gedit ...) as root user, you may have error message like:
GLib-GIO:ERROR:gdbusconnection.c:2270:initable_init: assertion failed
It means root user doesn't have access to the session bus.
To solve that, simply ensure having a login shell for your root user:
su -

Thursday, March 31, 2011

Define google-chrome as default Web browser in Thunderbird

To define google-chrome as default Web browser in Thunderbird, there is two steps to follow.
Step 1 (may be enough):
 - open advanced configuration editor (Edit->Preferences->Advanced->Configuration  Editor)
 - define following properties with /usr/bin/google-chrome

Step 2:
Usually there is embedded configuration in mimeTypes.rdf file of your Thunderbird profile. In this case, step 1 is not enough.

To define default Web browser:
 - open advanced configuration editor (Edit->Preferences->Advanced->Configuration  Editor)
 - define following properties with true
 - open a http link -> the first time there will be a popup, define /usr/bin/google-chrome as your default Web browser, and activate the check box for memorizing this configuration
 - open a https link -> and do the same

You will see that mimeTypes.rdf file will have been edited.
This time, google-chrome will really be the default Web browser in Thunderbird.

Fix google-chrome "error while loading shared libraries:" issue

After GNU/Linux OS upgrade (at least with Fedora), google-chrome may be broken, complaining about missing library.
To fix this issue:
 - ensure you have installed nss v3.xx (corresponding to your architecture)
 - create a symbolic link to corresponding library in the google-chrome main directory, usually:
ln -s /usr/lib64/ /opt/google/chrome/

There is some other needed symbolic links; if you have same kind of issue for others libraries, you can fix them the same way.

Anyway, at worse, if you don't want to fix it manually, you can reinstall google-chrome and reinstall it:
yum remove google-chrome-stable
yum install google-chrome-stable

Upgrade GNU/Linux Fedora from 10 to 11, 12, 13 and finally 14

To upgrade GNU/Linux Fedora from 10 to 11, 12, 13 and finally 14, there is no problem.
Although the way to upgrade is
the same for legacy End Of Life (EOF) Fedora versions (until 10 included), and for Fedora 11; it is easier from Fedora 12 with new yum options --releasever and distro-sync.

The principle is globally the same when upgrading:
- from Fedora core N to Fedora core N+1 (see this post)
- from Fedora 8 to 9, then 10 (see this post)
- from Fedora core 6 to Fedora 7 then 8 (see this post).

In addition, the recommendations of Fedora project have greatly evolved and are complete.

Ensure there is no dependencies problem like explained into this post.

Then, you should perform a great configuration files merging campaign to ensure having the up to date functionalities while keeping your own specific configuration (globally the XXX.conf and XXX.conf.rpmnew files).