Setting up an NVMe SSD on Ubuntu 14.04 LTS

Intel750I need a fast PC for some current work and decided that it’d be nice to use an NVMe SSD to speed up storage. I am using an Intel 750 PCIe 3.0 x4 add in card as it’s a simple way to go. Ubuntu 14.04 has the NVMe driver built in so it came up straight away as /dev/nme0n1. One small issue is that gparted doesn’t seem to think this is a disk so it’s a case of reverting to old school command line stuff to get it set up for use.

First off is to create a partition:

sudo fdisk /dev/nvme0n1

Choose “n” to create a new partition, then “p” then “1” to create a new primary partition. Just use defaults for the sector numbers. Then “w” to write the data to the disk. The lsblk command should show something like:

nvmelsblk

To create a file system on it:

sudo mkfs -t ext4 /dev/nvme0n1p1

Then create a mount point somewhere convenient:

sudo mkdir /media/nvme

Then mount the new partition on that mount point:

sudo mount /dev/nvme0n1p1 /media/nvme

At this point, the whole thing belongs to root which may not be what’s wanted. To change the ownership to a specific user (with the partition mounted):

sudo chown -R <user>:<user> /media/nvme

To get it to mount every time, add a line to /etc/fstab:

UUID=<nvme UUID> /media/nvme ext4 defaults 0 0

To find the UUID, enter:

sudo blkid

and then cut and paste the UUID for the NVMe drive.

To get some idea of performance, the hdparm command can be used. This shows what I got from my system:

NVMeTest

/dev/sda is a WD Caviar Blue drive. The system itself is an intel i7 5820k with 16Gb of DDR4 and an old video card just to get things going – it’s going to be a headless server eventually. Here it is all installed:

5820ksystem

Advertisements

One thought on “Setting up an NVMe SSD on Ubuntu 14.04 LTS

  1. Pingback: Installing Ubuntu 16.04 (Daily) on a Lenovo Yoga 900 – Allan J. Bogh

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s