Getting Started – Mac OSX

Installing OffScale DataGrove

Installing DataGrove is very simple.
Once you’ve downloaded the tarball, open it to a temporary location -

$ tar -xvf datagrove_mac.tar.gz

and run the installer -

$ sudo ./

And that’s it!

Starting the server

The DataGrove server does all the behind-the-scenes magic. It handles the data versions and makes sure your virtual storage device is properly mounted onto your system.

To start working with OffScale DataGrove, simply launch the server -

$ sudo datagrove_server

Now that the server is running, load the root version -
$ sudo datagrove load -n=root

You can now see your virtual drive mounted to /media/offscale.

Note – The server needs to be run with sudo because it needs the appropriate permissions to mount the virtual storage devices onto the system. The server doesn’t abuse these permissions in any way and will not perform any action other than mounting.

Example – setting up MySQL

This example shows how to configure MySQL to work with OffScale DataGrove. DataGrove supports other databases as well and configuration may differ between database types.

Copying MySQL data files

Make sure DataGrove is loaded
Load a DataGrove drive. If this is the first time you run DataGrove, you can always load an empty device, designated in our system as “root”:
$ sudo datagrove load -n=root
This will create and mount a directory (by default, under /media/offscale). To verify the success of the mount, you may want to run mount to see that the datagrove-fs is mounted correctly.

Stop MySQL
Stop the MySQL server if it is running:
$ sudo /usr/local/mysql/support-files/mysql.server stop

Copy data files & configure
Copy the MySQL data library to the mounted directory (may require sudo):
$ sudo cp -rp /usr/local/mysql/data /media/offscale/data

Open my.cnf for editing, find the datadir property and change it to point to the new mounted directory, where you copied the data (if you followed the example, it will be datadir=/media/offscale/mysql).

Also, make sure the mysql user has permission to access /media/offscale:
$ sudo chmod a+X /media/offscale

Start MySQL server
Start the MySQL server, and check it runs correctly:
$ sudo start mysql

Configuring DataGrove to control MySQL

While MySQL is running, it is impossible to safely disconnect iSCSI. For DataGrove to work properly, it is required that we tell DataGrove how to control MySQL. For this we have configuration files in /usr/share/offscale/CLI.

Changing DB type
In /usr/share/offscale/CLI/, change database_type to MYSQL:

Test it out

That’s it. We’re done. To test it out, simply tag the new version as your baseline. For example:
$ sudo datagrove tag -n=mysql_base

When you unload and load a version, from now on, DataGrove will automatically take care of stopping and starting MySQL, and mounting the virtual drive back to /media/offscale for you. The complete command line interface is available at our CLI documentation page.

Be Sociable, Share!