Portal
Language
 
Home>Knowledge Base>Linux Specific>Red Hat: Building the Driver From Source (Red Hat, Oracle, CentOS)
Information
Article ID68
Created On6/3/2010
Modified12/7/2010
Share With Others
Red Hat: Building the Driver From Source (Red Hat, Oracle, CentOS)
Red Hat: Building the Driver From Source (Red Hat, Oracle, CentOS)

Red Hat: Building the Driver From Source (Red Hat, Oracle, CentOS)

The 2.x driver builds and runs on a much wider range of kernels than the 1.2.x driver series. It accomplishes this using a new portability layer to abstract itself away from the operating system internals. By following the procedure below, you will obtain a working driver, built for the specific kernel running on your system. That driver can then be copied as an RPM package and installed on other systems in your network.*


Follow the instructions based on the version of your driver.

Building the 2.x Driver From Source
Building the 1.2.x Driver From Source
Troubleshooting

Building the 2.x Driver From Source

Before beginning, download the ioDrive driver source rpm for RHEL from our support site.


1. Remove prior versions of the ioDrive driver rpm
# Remove 2.x.x driver

$ rpm -e iomemory-vsl

# Remove 1.2.x driver

$ rpm -e iodrive-driver

2. For Red Hat Enterprise 5, install the gcc 4.x and kernel-devel packages for your current kernel. The kernel-headers package is also needed, but is typically installed as part of the base operating system.


$ yum install gcc kernel-devel kernel-headers rpm-build


For Red Hat Enterprise 4, install gcc and kernel-smp-devel packages for your current kernel.


$ yum install gcc kernel-smp-devel rpm-build

3. Change to the directory where you downloaded the ioDrive driver source RPM and begin the rebuild process.


$ rpmbuild --rebuild iomemory-vsl*.src.rpm


4. Install the newly-built driver.


$ rpm -Uvh /usr/src/redhat/RPMS/x86_64/iomemory-vsl*.rpm


5. Load the driver module by restarting the computer or running modprobe.


$ modprobe iomemory-vsl

6. Check the status of the ioDrive(s). (NOTE: fio-status is part of the ioDrive utility ("fio-util" rpm) software available on the support site.)


$ fio-status

Found 1 ioDrive in this system

fct0 Attached as 'fioa' (block device)
Fusion-io ioDIMM3 160GB, Product Number:FS1-001-161-ES SN:6168
Firmware v5.0.1, rev 42895
161 GBytes block device size, 198 GBytes physical device size capacity.
PCI:0c:00.0, Slot Number:6
Internal temperature: avg 42.3 degC, max 44.3 degC
Media status: Healthy; Reserves: 100.00%, warn at 10.00%

From this point, you should be able to use the OS-level tools to partition and format the drive.

*NOTE: The 2.x driver series takes advantage of the Red Hat (RHEL) 5.x Application Binary Interface (ABI) to help avoid the need for rebuilding after a minor kernel update.

Building the 1.2.x Driver From Source

NOTE: If the Linux kernel version running on your system does not exactly match one of the pre-compiled drivers on our support site, you will need to use this procedure to rebuild from the driver source. Run the uname command to check your kernel version, for example:


$ uname -r

Before beginning, download the ioDrive driver source rpm for RHEL from our support site.


1. Remove prior versions of the ioDrive driver rpm

$ rpm -e iodrive-driver


2. For Red Hat Enterprise 5, install the gcc 4.x and kernel-devel packages for your current kernel. The kernel-headers package is also needed, but is typically installed as part of the base operating system.


$ yum install gcc kernel-devel kernel-headers rpm-build


For Red Hat Enterprise 4, install the gcc and kernel-smp-devel packages for your current kernel.


$ yum install gcc kernel-smp-devel rpm-build

3. Change to the directory where you downloaded the ioDrive driver source RPM and begin the rebuild process.


$ rpmbuild --rebuild iodrive-*.src.rpm


4. Install the newly-built driver.


$ rpm -Uvh /usr/src/redhat/RPMS/x86_64/iodrive-driver-*.rpm


5. Load the driver module by restarting the computer or running modprobe.


$ modprobe fio-driver

6. Check the status of the ioDrive(s). (NOTE: fio-status is part of the ioDrive utility ("iodrive-util" rpm) software available on the support site.)


$ fio-status

Found 1 ioDrive in this system

fct0 Attached as 'fioa' (block device)
Fusion-io ioDIMM3 160GB, Product Number:FS1-001-161-ES SN:6168
Firmware v17350 'Released'
161 GBytes block device size, 198 GBytes physical device size capacity.
PCI:0c:00.0, Slot Number:6
Vendor:1aed, Device:1003, Sub vendor:1aed, Sub device:1010
Internal temperature: avg 42.3 degC, max 44.3 degC
Media status: Healthy. 99.44% blocks good.

From this point, you should be able to use the OS-level tools to partition and format the drive.


Troubleshooting

Problem

During driver load you receive an error similar to the following:

FATAL: Error inserting fio_driver (/lib/modules/2.6.18-164.11.1.el5/fusionio/fio-driver.ko): Invalid module format

(Your kernel version may be different than the one shown above.)

Solution

The version of the kernel-devel package must match the version of the currently running kernel.


$ uname -r
2.6.18-164.11.1.el5

$ rpm -qa kernel-devel
kernel-devel-2.6.18-164.el5


Since the kernel is 2.6.18-164.11.1.el5 and the installed version of kernel-devel is 2.6.18-164.el5, the old kernel-devel package needs to be removed and the exact matching one installed.


$ rpm -e kernel-devel

$ yum install kernel-devel-2.6.18-164.11.1.el5

If the package is not available directly using yum, it will need to be downloaded from Red Hat's repository and installed.

Once the package has been installed, these rebuild instructions can be started again.