Getting Started – Linux

Installing OffScale DataGrove

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

$ tar -xvf datagrove_linux.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 service datagrove start

or, if you prefer not to run it as a service, simply call:

$ sudo datagrove_server

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 service mysql stop

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

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

Adding AppArmor permissions
In some Ubuntu distributions, additional permissions are required for MySQL to be able to access the data files in a different location.

$ sudo vi /etc/apparmor.d/usr.sbin.mysqld
Add the mount directory to the list:
/media/offscale/ r,
/media/offscale/** rwk,

Now, restart AppArmor and MySQL for the changes to take effect:
$ sudo /etc/init.d/apparmor restart

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

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!