That's it. Refer to the previous blog post to understand how to setup the MySQL database once these filesystems are mounted. In a future blog post, I'll cover how to backup your MySQL database using snapshots and cloning.

Saturday Feb 14, 2015

The Oracle ZFS Storage Appliance supports NFS, iSCSI, and Fibre Channel access to a MySQL database. By consolidating the storage of MySQL databases onto the Oracle ZFS Storage Appliance, the following goals can be achieved:

The option file my.cnf should be modified to offload the database onto the Oracle ZFS Storage Appliance and to make additional tunings for optimal performance. Prior to changing this file, MySQL should be stopped and restarted once completed.

# service mysql stop
# service mysql start

Important my.cnf changes

1. innodb_doublewrite = 0

A double write buffer is necessary in the event of partial page writes. However, the transactional nature of ZFS guarantees that partial writes will never occur. This can be safely disabled.

2. innodb_flush_method = O_DIRECT

Ensures that InnoDB calls directio() instead of fcntl() for the data files. This allows the data to be accessed without OS level buffering and read-ahead.

3. innodb_data_home_dir = /path/to/innodb-data

The data filesystem for InnoDB should be located on its own share or LUN on the Oracle ZFS Storage Appliance.

4. innodb_log_group_home_dir = /path/to/innodb-log

The log filesystem for InnoDB should be located on its own share or LUN on the Oracle ZFS Storage Appliance.

5. innodb_data_file_path = ibdatafile:1G:autoextend

This configures a single large tablespace for InnoDB. The ZFS controller is then responsible for managing the growth of new data. This eliminates the complexity needed for controlling multiple tablespaces.

You can also download the following example my.cnf file to get started.

Testing with Sysbench

Sysbench is a handy benchmark tool for generating a database workload. To fill a test database, run the following command:

The Analytics feature of the Oracle ZFS Storage Appliance offers an unprecedented level of observability into your database workload. This can assist in identifying performance bottlenecks based on the utilization of your network, hardware, and storage protocols. Its drill-down functionality can also narrow the focus of a MySQL instance into a workload’s operation type (read/write), I/O pattern (sequential / random), response latency, and I/O size for both the data and log files. At any point in time, a DBA can track a database instance at an incredibly granular level.

Once you have a single database installed, you can try creating more instances to analyze your I/O patterns. Run separate sysbench processes for each database and then use Analytics to monitor the differences between workloads.

Monday Sep 22, 2014

Join my colleagues and myself at this year's Oracle OpenWorld. We have five hands-on lab sessions available to attend. These are all heavily focused on 12c, MySQL, and the new RESTful API for the Oracle ZFS Storage Appliance.

Tuesday Jan 03, 2012

I ran into a strange automount issue where my NFS shares were not being mounted at boot time. nfs/client was enabled, my entry in /etc/vfstab was correct, and issuing a `mount -a` worked flawlessly. So what was the problem? Well, this was the entry in my vfstab file:

biff:/paulie - /export/home/paulie/biff nfs - yes proto=tcp,vers=3

I wanted to place my NFS share inside a zfs filesystem so that it was easily accessible in my home directory.

Turns out this is not such a good idea since the /etc/vfstab file is read *before* zpool's are imported and mounted. This means that all NFS shares need to be listed outside any filesystems to be mounted at boot time and then symlinked in.

Wednesday Oct 12, 2011

I was an instructor at SNW this year at the JW Marriott hotel in Orlando, Florida. Along with fellow Oracle co-worker Ray Clarke, we represented the ZFS Storage Appliance in a hands-on environment that allowed storage administrators and industry experts to demo our product in a simulated environment.

Rather than haul physical equipment to the convention, we setup an array of Windows 7 virtual machine sessions paired with a ZFS simulator running on Virtual Box across two remote X4270 machines. This let us create a classroom environment of 24 stations (48 VM sessions) that created a superb replica of the 7000 product that each user could toy around with as they completed the storage exercises we devised.

If you missed the opportunity to demo our product, or would like to download and play with the simulator in your own environment, feel free to check out the following links to get started.

Friday Jul 25, 2008

I've been looking to build a network attached storage (NAS) device for some time to store all my music, photos, films, etc. in one global location. I had a few specific requirements that were as follows:

Supports two disks (2TB RAID mirroring preferable)

Supports UPnP server (media sharing)

Low power (always on)

Bonus points: ZFS, SSH, Samba, etc.

There are a few ready-to-go NAS solutions available on the market that are compatible with my demands. The Linksys NAS200, at $130, supports two disks with Twonky Media server for UPnP and is low power. The downside is that reviews indicate it being very slow and it comes with no gigabit ethernet. On the high-end side, however, the QNAP TS-209 Pro also comes with the two disk slots, UPnP support, is fast, along with a bunch of extra goodies like samba and an Itunes server. The price tag at $400 makes it a bit too much for a diskless system, so I decided on a different solution... why not build it myself?

I had a Thermaltake LANBOX Lite Mini-ITX/ATX case lying around along with a 200W power supply, so all I needed to do was find some cheap, low power hardware to support it. Intel recently released a new type of processor called the Atom, which is aimed at bringing x86 into the embedded market. I'm not so sure how successful they will be at this venture, but it fits my needs perfectly. According to their specs, it draws 2W TDP for the 1.6ghz version which is pretty amazing. The power output turns out to be a bit of marketing hype, but considering it is now being used in the ASUS Eee desktop and laptops, it should prove to be a viable candidate. To encourage the hobbyist market, Intel created a combo of motherboard + Atom (BOXD945GCLF) that is available on Newegg for $75. After getting it along with a pair of 1TB drives at $170, I had a workable system shipped to me for under $500.

My first reaction when I got all the parts is that the Intel board is TINY. I can fit my hand around entire thing. Even in the media center case that I use, it has quite a bit of extra room.

The LANBOX Lite is fully modular which makes installation much easier. If you have ever built a computer from scratch, then you probably understand how tedious it can be to screw in motherboards, install drives, etc. This case allows you to pull every section out to make installation a breeze. It also comes with a nice silo to install both the terabyte drives.

The next step is to turn this into a fully functional NAS. After installing FreeBSD 7.0, I wanted to setup both my disks to mirror. Since the BSD family has such a friendly license, ZFS is included in the distribution. And ZFS mirroring makes things incredibly simple to setup.