Loading the Driver via udev or Init Script
Loading the Driver via udev or Init Script
There are two main methods for loading the Fusion-IO Driver: udev and
the iodrive script. The
default
method of loading is udev.
Using Udev to Load the Driver
Most modern linux distributions use udev to facilitate driver loading.
Usually it just works, behind the scenes, loading drivers.
Udev automatically loads drivers for installed hardware on the
system. It does this by walking through the devices on the PCI bus, and
then loading any driver that has been properly configured to work with
that device. This way, drivers are able to be loaded, without having to
use scripts or modify configuration files. The Fusion IO drivers are
properly configured, and udev will properly find, and attempt to load
the drivers.
But, there are some cases where loading by udev is not appropriate,
or can have issues.
Udev will wait 180 seconds for the driver to load, then it will
exit. In most cases, this is plenty of time. (Even with multiple
ioDrives installed). But, if the drives were shut down improperly,
loading the driver, and attaching the drives takes longer than the 180
seconds. In this case, udev will exit. The drivers will not exit, and
will continue working on attaching the drives.
It is not always a problem when udev exits. The drivers will
eventually load, and then you will be able to use the attached block
devices. But, if the drivers do take too long to load, udev does exit, and
filesystems are set to be mounted in the fstab, then the system fsck
will fail, and the system will stop booting. In most distributions the
user will drop into a single-user mode, or repair mode.
Again, this is normal behavior, and, after the driver finishes
rescanning and attaching the drive, a reboot will fix things. For most
users, this will not happen enough to be an issue.
But, for installations with many devices, or for server
installations where dropping into single user mode is unacceptable,
there is an alternative method for driver loading that does not have
these issues.
Using Init Scripts to Load the Driver
The ioDriver packages provide init scripts that are installed on all
supported linux distributions. These scripts typically resided in
/etc/init.d/iodrive or /etc/rc.d/iodrive. The scripts are used to load
and start the driver, and mount filesystems, after the system is up.
This method avoids completly the udev behavior described above. (It
will wait, as long as it takes, for drives to be attached)
Follow the instructions based your driver version.
(jump to:
Using Init
Scripts to Load the 1.2.x Driver)
Using Init Scripts to Load the 2.x.x Driver
Step 1: Modifying /etc/modprobe.d/iomemory-vsl.conf
Edit /etc/modprobe.d/iomemory-vsl.conf, and uncomment the blacklist line:
Before:
# To keep ioDrive from auto loading at boot, uncomment below
# blacklist fio-driver
After:
# To keep ioDrive from auto loading at boot, uncomment below
blacklist fio-driver
This keeps udev from automatically loading the driver
Step 2: Modifying /etc/fstab
Add noauto to the options in the appropriate line in the /etc/fstab.
This will keep the OS from trying to check the drive for errors on
boot.
Before:
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=SWAP-sda5 swap swap defaults 0 0
/dev/fioa1 /iodrive_mountpoint ext3 defaults 1 2
After:
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=SWAP-sda5 swap swap defaults 0 0
/dev/fioa1 /iodrive_mountpoint ext3 defaults,noauto 0 0
Step 3: Modifying /etc/sysconfig/iomemory-vsl
Edit /etc/sysconfig/iomemory-vsl, and uncomment
ENABLED=1 to
enable the init script.
Before:
# If ENABLED is not set (non-zero) then iomemory-vsl init script will not be
# used.
#ENABLED=1
After:
# If ENABLED is not set (non-zero) then iomemory-vsl init script will not be
# used.
ENABLED=1
While editing /etc/sysconfig/iomemory-vsl, add the mountpoint to the
MOUNTS
variable so it will be automatically attached and mounted:
Before:
# An IFS separated list of mount points to mount once the driver is
# loaded. These mount points should be listed in /etc/fstab with
# "noauto" as one of the mount options.
# Example /etc/fstab:
#/dev/fioa /mnt/fioa ext3 defaults,noauto 0 0
#/dev/fiob /mnt/firehose ext3 defaults,noauto 0 0
# Example: MOUNTS="/mnt/fioa /mnt/firehose"
MOUNTS=""
After:
# An IFS separated list of mount points to mount once the driver is
# loaded. These mount points should be listed in /etc/fstab with
# "noauto" as one of the mount options.
# Example /etc/fstab:
#/dev/fioa /mnt/fioa ext3 defaults,noauto 0 0
#/dev/fiob /mnt/firehose ext3 defaults,noauto 0 0
# Example: MOUNTS="/mnt/fioa /mnt/firehose"
MOUNTS="/iodrive_mountpoint"
Step 4: Verifying the Status of the Init Script
Make sure the iodrive script loads at run levels 1 through 5 (runlevel
0 is shutdown and runlevel 6 is reboot).
Please run:
$ chkconfig iomemory-vsl on
$ chkconfig --list iomemory-vsl
iomemory-vsl 0:off 1:on 2:on 3:on 4:on 5:on 6:off
Using Init
Scripts to Load the 1.2.x Driver
Step 1: Modifying /etc/modprobe.d/iodrive
Edit /etc/modprobe.d/iodrive, and uncomment the blacklist line:
Before:
# To keep ioDrive from auto loading at boot, uncomment below
# blacklist fio-driver
After:
# To keep ioDrive from auto loading at boot, uncomment below
blacklist fio-driver
This keeps udev from automatically loading the driver
Step 2: Modifying /etc/fstab
Add noauto to the options in the appropriate line in the /etc/fstab.
This will keep the OS from trying to check the drive for errors on
boot.
Before:
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=SWAP-sda5 swap swap defaults 0 0
/dev/fioa1 /iodrive_mountpoint ext3 defaults 1 2
After:
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=SWAP-sda5 swap swap defaults 0 0
/dev/fioa1 /iodrive_mountpoint ext3 defaults,noauto 0 0
Step 3: Modifying /etc/sysconfig/iodrive
Edit /etc/sysconfig/iodrive, and add the mountpoint to the MOUNTS
variable, so that it will be automatically attached and mounted:
Before:
# An IFS separated list of mount points to mount once the driver is
# loaded. These mount points should be listed in /etc/fstab with
# "noauto" as one of the mount options.
# Example /etc/fstab:
#/dev/fioa /mnt/fioa ext3 defaults,noauto 0 0
#/dev/fiob /mnt/firehose ext3 defaults,noauto 0 0
# Example: MOUNTS="/mnt/fioa /mnt/firehose"
MOUNTS=""
After:
# An IFS separated list of mount points to mount once the driver is
# loaded. These mount points should be listed in /etc/fstab with
# "noauto" as one of the mount options.
# Example /etc/fstab:
#/dev/fioa /mnt/fioa ext3 defaults,noauto 0 0
#/dev/fiob /mnt/firehose ext3 defaults,noauto 0 0
# Example: MOUNTS="/mnt/fioa /mnt/firehose"
MOUNTS="/iodrive_mountpoint"
Step 4: Verifying the Status of the Init Script
Make sure the iodrive script loads at run levels 1 through 5 (runlevel
0 is shutdown and runlevel 6 is reboot).
Please run:
$ chkconfig iodrive on
$ chkconfig --list iodrive
iodrive 0:off 1:on 2:on 3:on 4:on 5:on 6:off