So, a while back, I needed to install an SSD PCIe flash drive on one of my CentOS
servers. For a myriad of reasons, we settled on an OCZ Revodrive3. This led to needing to install the proper drivers and other tasks to get the drive mounted and usable. Luckily, I wrote down everything that I did so I could do it again if I had to. I figured that I would share my notes here in case anybody else needed them. So, this article is how I installed an OCZ SSD Revodrive in CentOS.
Step #1 – Download the drivers for your OCZ Revodrive
I found the drivers on ocz’s website and downloaded them from here: http://www.oczenterprise.com/drivers.html
Step #2 – Unzip, Untar the Drivers, Then Put Them into Place:
After unzipping, and untarring the drivers, I ran the following:
# cp ocz10xx.ko /lib/modules/2.6.18-308.el5/extra/
# depmod -a
# modprobe ocz10xx
Depmod creates a list of module dependencies by reading each module under /lib/modules/version and determining what symbols it exports and what symbols it needs.
Modprobe adds modules into the Linux Kernel
Step #3 – Verify the Kernel See the OCZ Drive
Now that the drives are installed into the kernel, we need to verify that the drive is visible by the kernel. I am not sure if I rebooted the machine prior to this step or not. If it doesn’t work immediately, you may wish to reboot.
# ls /dev/sd* <- I did this to verify that I had another drive listed (/dev/sdb)
/dev/sda /dev/sda1 /dev/sda2 /dev/sdb
# hdparm -I /dev/sdb <- Get information about the drive
/dev/sdb:
ATA device, with non-removable media
Model Number: OCZ-REVODRIVE3
Serial Number: OCZ-0OVQR608150CJJ7J
Firmware Revision: 2.15
Transport: Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5
Standards:
Supported: 8 7 6 5
Likely used: 8
Configuration:
Logical max current
cylinders 16383 16383
heads 16 16
sectors/track 63 63
--
CHS current addressable sectors: 16514064
LBA user addressable sectors: 468883199
LBA48 user addressable sectors: 468883199
device size with M = 1024*1024: 228946 MBytes
device size with M = 1000*1000: 240068 MBytes (240 GB)
Capabilities:
LBA, IORDY(can be disabled)
Queue depth: 32
Standby timer values: spec'd by Standard, no device specific minimum
R/W multiple sector transfer: Max = 16 Current = 16
Advanced power management level: unknown setting (0x00fe)
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=120ns IORDY flow control=120ns
Commands/features:
Enabled Supported:
* SMART feature set
Security Mode feature set
* Power Management feature set
* Write cache
* Look-ahead
* Host Protected Area feature set
* WRITE_BUFFER command
* READ_BUFFER command
* NOP cmd
* DOWNLOAD_MICROCODE
* Advanced Power Management feature set
Power-Up In Standby feature set
* SET_FEATURES required to spinup after power up
* 48-bit Address feature set
* Mandatory FLUSH_CACHE
* FLUSH_CACHE_EXT
* SMART error logging
* SMART self-test
* General Purpose Logging feature set
* WRITE_{DMA|MULTIPLE}_FUA_EXT
* 64-bit World wide name
* IDLE_IMMEDIATE with UNLOAD
Write-Read-Verify feature set
* WRITE_UNCORRECTABLE command
* {READ,WRITE}_DMA_EXT_GPL commands
* Segmented DOWNLOAD_MICROCODE
* SATA-I signaling speed (1.5Gb/s)
* SATA-II signaling speed (3.0Gb/s)
* unknown 76[3]
* Native Command Queueing (NCQ)
* Host-initiated interface power management
* Phy event counters
* unknown 76[14]
* unknown 76[15]
DMA Setup Auto-Activate optimization
Device-initiated interface power management
* Software settings preservation
Security:
Master password revision code = 65534
supported
not enabled
not locked
not frozen
not expired: security count
not supported: enhanced erase
2min for SECURITY ERASE UNIT.
Checksum: correct
With all of that, it appears that our OCZ SSD PCIe drive was found by the kernel and is ready for us to partition, build a filesystem and mount, and then use.
Step #4 – Partition the OCZ SSD PCIe Drive
I partitioned the OCZ SSD drive using the following steps:
# fdisk /dev/sdb < - Be sure to choose the correct /dev/sd(n) as determined in step 3 above
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
The number of cylinders for this disk is set to 29186.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): p
Disk /dev/sdb: 240.0 GB, 240068197888 bytes
255 heads, 63 sectors/track, 29186 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
Command (m for help): n
Command action
e extended
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
p primary partition (1-4)
p
Partition number (1-4):
Value out of range.
Partition number (1-4): 1
First cylinder (1-29186, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-29186, default 29186):
Using default value 29186
Command (m for help): p
Disk /dev/sdb: 240.0 GB, 240068197888 bytes
255 heads, 63 sectors/track, 29186 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 29186 234436513+ 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
#5 – Create and Mount the Filesystem on the OCZ SSD Drive
# mkfs -t ext3 /dev/sdb1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
29310976 inodes, 58609128 blocks
2930456 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
1789 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
You have new mail in /var/spool/mail/root
Create a Mount Point
# mkdir /data
Add the filesystem to the /etc/fstab file
# cat >> /etc/fstab << EOF
/dev/sdb1 /data ext3 defaults 1 3
EOF
Mount the filesystem
# mount /data
Verify the Mount
# df -h /data Filesystem Size Used Avail Use% Mounted on /dev/sdb1 221G 188M 209G
1
% /data
Latest posts by Jeff Staten (see all)
- Configure Your HP Procurve Switch with SNTP - May 5, 2015
- Configuring HP Procurve 2920 Switches - May 1, 2015
- Troubleshooting Sendmail - November 28, 2014