Skip to content

Instantly share code, notes, and snippets.

@RulerOf
Last active April 11, 2022 17:37
Show Gist options
  • Save RulerOf/c829b70b198d3f17383577673707e2af to your computer and use it in GitHub Desktop.
Save RulerOf/c829b70b198d3f17383577673707e2af to your computer and use it in GitHub Desktop.
Installing drivers for ioDrive Duo on Oracle Linux 7

Installing drivers for ioDrive Duo on Oracle Linux 7

This process is an outline of the steps I followed to get my two first-gen 640GB ioDrive Duo cards working on Oracle Linux 7. After we install the driver, we're going to perform the optional step of formatting the cards to use native 4k sectors, since it offers marginally better throughput and a decent reduction to memory usage.

Download Driver binary and support tools tarball

Go to the SanDisk support site and download the packages that correspond to your device and kernel. I'm using 64-bit Oracle Linux 7.

On the support site, we pick out our device,

Since we need to match the driver to the kernel, let's check the version:

[root@drew-metal ~]# uname -r
4.1.12-94.3.9.el7uek.x86_64

We'll match that for our driver download, and select the recommended support binaries too:

  • iomemory-vsl-4.1.12-94.3.9.el7uek.x86_64-3.2.15.1699-1.0.el7.x86_64.rpm
  • fio-common-3.2.15.1699-1.0.el7.x86_64.rpm
  • fio-preinstall-3.2.15.1699-1.0.el7.x86_64.rpm
  • fio-sysvinit-3.2.15.1699-1.0.el7.x86_64.rpm
  • fio-util-3.2.15.1699-1.0.el7.x86_64.rpm
  • fio-firmware-fusion-3.2.11.20150618-1.noarch.rpm

You can see what the selection looks like in the image below. For more detail on what each file does, see the installation guide in the Documentation section.

Download the tar and scp it to the server:

AndrewBobulskys-MacBook-Pro:~ andrewbobulsky$ cd Downloads/
AndrewBobulskys-MacBook-Pro:Downloads andrewbobulsky$ scp SanDisk-bundle-5a27a65aa3880.tar [email protected]:/root/
SanDisk-bundle-5a27a65aa3880.tar                                 100%   28MB  70.6MB/s   00:00   

Install the software

Over on the server, install some required prerequisites if necessary:

[root@drew-metal ~]# yum install lsof pciutils -y -q
Package lsof-4.87-4.el7.x86_64 already installed and latest version
Package pciutils-3.5.1-2.el7.x86_64 already installed and latest version

Then extract the tar file:

[root@drew-metal ~]# tar xvf SanDisk-bundle-5a27a65aa3880.tar 
SanDisk-bundle-5a27a65aa3880/
SanDisk-bundle-5a27a65aa3880/ioDrive/
SanDisk-bundle-5a27a65aa3880/ioDrive/Linux_oel-7/
SanDisk-bundle-5a27a65aa3880/ioDrive/Linux_oel-7/3.2.15/
SanDisk-bundle-5a27a65aa3880/ioDrive/Linux_oel-7/3.2.15/Firmware/
SanDisk-bundle-5a27a65aa3880/ioDrive/Linux_oel-7/3.2.15/Firmware/fio-firmware-fusion-3.2.11.20150618-1.noarch.rpm
SanDisk-bundle-5a27a65aa3880/ioDrive/Linux_oel-7/3.2.15/Software Binaries/
SanDisk-bundle-5a27a65aa3880/ioDrive/Linux_oel-7/3.2.15/Software Binaries/iomemory-vsl-4.1.12-94.3.9.el7uek.x86_64-3.2.15.1699-1.0.el7.x86_64.rpm
SanDisk-bundle-5a27a65aa3880/ioDrive/Linux_oel-7/3.2.15/Utilities/
SanDisk-bundle-5a27a65aa3880/ioDrive/Linux_oel-7/3.2.15/Utilities/fio-sysvinit-3.2.15.1699-1.0.el7.x86_64.rpm
SanDisk-bundle-5a27a65aa3880/ioDrive/Linux_oel-7/3.2.15/Utilities/fio-common-3.2.15.1699-1.0.el7.x86_64.rpm
SanDisk-bundle-5a27a65aa3880/ioDrive/Linux_oel-7/3.2.15/Utilities/fio-util-3.2.15.1699-1.0.el7.x86_64.rpm
SanDisk-bundle-5a27a65aa3880/ioDrive/Linux_oel-7/3.2.15/Utilities/fio-preinstall-3.2.15.1699-1.0.el7.x86_64.rpm

Install the rpms:

  • Note: I had to run the find command twice because dependencies tried to install out of order.
[root@drew-metal ~]# find ./SanDisk-bundle-5a27a65aa3880 -type f -name '*.rpm' -exec rpm -Uvh {} \;
Preparing...                          ################################# [100%]
Updating / installing...
   1:fio-firmware-fusion-2:3.2.11.2015################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:iomemory-vsl-4.1.12-94.3.9.el7uek################################# [100%]
error: Failed dependencies:
	fio-common is needed by fio-sysvinit-3.2.15.1699-1.0.el7.x86_64
	fio-util is needed by fio-sysvinit-3.2.15.1699-1.0.el7.x86_64
Preparing...                          ################################# [100%]
Updating / installing...
   1:fio-common-3.2.15.1699-1.0.el7   ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:fio-util-3.2.15.1699-1.0.el7     ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:fio-preinstall-3.2.15.1699-1.0.el################################# [100%]
[root@drew-metal ~]# find ./SanDisk-bundle-5a27a65aa3880 -type f -name '*.rpm' -exec rpm -Uvh {} \;
Preparing...                          ################################# [100%]
	package fio-firmware-fusion-2:3.2.11.20150618-1.noarch is already installed
Preparing...                          ################################# [100%]
	package iomemory-vsl-4.1.12-94.3.9.el7uek.x86_64-3.2.15.1699-1.0.el7.x86_64 is already installed
Preparing...                          ################################# [100%]
Updating / installing...
   1:fio-sysvinit-3.2.15.1699-1.0.el7 ################################# [100%]
Preparing...                          ################################# [100%]
	package fio-common-3.2.15.1699-1.0.el7.x86_64 is already installed
Preparing...                          ################################# [100%]
	package fio-util-3.2.15.1699-1.0.el7.x86_64 is already installed
Preparing...                          ################################# [100%]
	package fio-preinstall-3.2.15.1699-1.0.el7.x86_64 is already installed

Load the driver

Use modprobe to load the driver, and then you can confrim by tailing dmesg:

[root@drew-metal ~]# modprobe iomemory-vsl
[root@drew-metal ~]# dmesg | tail
[165104.954595] <6>fioinf ioDrive 0000:0e:00.0: Found device fct3 (Fusion-io ioDrive Duo 640GB 0000:0e:00.0) on pipeline 0
[165105.378397] <6>fioinf Fusion-io ioDrive Duo 640GB 0000:0e:00.0: probed fct3
[165105.389213] <6>fioinf Fusion-io ioDrive Duo 640GB 0000:0e:00.0: sector_size=512
[165105.389219] <6>fioinf Fusion-io ioDrive Duo 640GB 0000:0e:00.0: setting channel range data to [2 .. 2047]
[165105.528198] <6>fioinf Fusion-io ioDrive Duo 640GB 0000:0e:00.0: Found metadata in EBs 720-720, loading...
[165105.655661] <6>fioinf Fusion-io ioDrive Duo 640GB 0000:0e:00.0: setting recovered append point 720+198180864
[165105.667771] <6>fioinf Fusion-io ioDrive Duo 640GB 0000:0e:00.0: Creating device of size 320000000000 bytes with 625000000 sectors of 512 bytes (39058211 mapped).
[165105.667804] fioinf Fusion-io ioDrive Duo 640GB 0000:0e:00.0: Creating block device fiod: major: 248 minor: 48 sector size: 512...
[165105.668764]  fiod: fiod1 fiod2
[165105.669011] <6>fioinf Fusion-io ioDrive Duo 640GB 0000:0e:00.0: Attach succeeded.

To test the utilities, use fio-status:

[root@drew-metal ~]# fio-status 

Found 4 ioMemory devices in this system with 2 ioDrive Duos
Driver version: 3.2.15 build 1699

(Optional) Switch to 4K sector physical layout

Purpose

Some flash storage operates in 512e mode, where the underlying flash uses 4k sectors but the controller virtualizes that into a 512-byte sector layout in order to facilitate compatibility with older operating systems. While Fusion IO drives have no controller chips (it's all in software) and do not experience that problem, there are some performance benefits to using 4k sectorsn so we're going to low-level format the drives into that configuration.

Procedure

[root@drew-metal ~]# ls /dev/fct* | xargs fio-detach
 - Detaching - /dev/fct0: 100% | /dev/fct1: 100% | /dev/fct2: 100% | /dev/fct3: 100%
 fioa - detached.
 fiob - detached.
 fioc - detached.
 fiod - detached.
[root@drew-metal ~]# ls /dev/fct* | xargs fio-format -b 4k -y

/dev/fct0: Creating block device.
  Block device of size 320.00GBytes (298.02GiBytes).
  Using block (sector) size of 4096 bytes.

/dev/fct1: Creating block device.
  Block device of size 320.00GBytes (298.02GiBytes).
  Using block (sector) size of 4096 bytes.

/dev/fct2: Creating block device.
  Block device of size 320.00GBytes (298.02GiBytes).
  Using block (sector) size of 4096 bytes.

/dev/fct3: Creating block device.
  Block device of size 320.00GBytes (298.02GiBytes).
  Using block (sector) size of 4096 bytes.

WARNING: Do not interrupt the formatting! If interrupted, the fio-sure-erase utility may help recover from format errors. Please see documentation or contact support.

 - Formatting - /dev/fct0: 100% | /dev/fct1: 100% | /dev/fct2: 100% | /dev/fct3: 100%
 /dev/fct0 - format successful.
 /dev/fct1 - format successful.
 /dev/fct2 - format successful.
 /dev/fct3 - format successful.
[root@drew-metal ~]# ls /dev/fct* | xargs fio-attach
 - Attaching - /dev/fct0: 100% | /dev/fct1: 100% | /dev/fct2: 100% | /dev/fct3: 100%
 fioa - attached.
 fiob - attached.
 fioc - attached.
 fiod - attached.
[root@drew-metal ~]# 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment