Thursday Jul 23, 2009

Joomla! and recent OpenSolaris distros - workaround

Though documented elsewhere, it's a good idea to propagate for the benefit of the next person.

Problem: Installation of Joomla! 1.5.x on recent versions of OpenSolaris (2009.06 and later) using MySQL fail with errors after install

Symptom: After otherwise successful install of config on MySQL on OpenSolaris, the home page comes up in the browser with numerous MySQL errors, and the MySQL server restarts:

   Error loading Modules:MySQL server has gone away SQL=SELECT id, title, module, position, 
   content, showtitle, control, params FROM jos_modules AS m LEFT JOIN jos_modules_menu 
   AS mm ON mm.moduleid = m.id WHERE m.published = 1 AND m.access =  0 AND m.client_id = 0 
   AND ( mm.menuid = 1 OR mm.menuid = 0 ) ORDER BY position, ordering

Diagnosis: known issue with MySQL 32-bit server as delivered from pkg.opensolaris.org

Workaround: use the 64-bit version of the MySQL server (/usr/mysql/<version>/bin/64/mysqld_safe, et al)




        
    

Tuesday Sep 23, 2008

Today's coolness: ZFS Snapshots and Reproducible test states

I had a lovely 'aha' moment today. This 'aha' is nothing new, except to me.  Today, I tried ZFS snapshots for the first time, and it made my life SO much easier! My thanks to colleague Tom Daly for the suggestion!

We're testing Drupal on Webstack on OpenSolaris. The MySQL database we're using totals about 20GB on disk - not big, but heretofore it was created via a script of MySQL commands, including lots of inserts. To populate the database to a 'fresh' state took about 50 minutes on a Sun SPARC Enterprise T5120.

"Why not try ZFS rollback," asks Tom, nonchalantly. Ding! Aha!

OpenSolaris uses ZFS for everything, even booting. It's the default filesystem type. Our database resides on a ZFS mount (in a Zone, no less, back-mounted from the global zone!). This is a perfect use of the ZFS 'snapshot' and 'rollback' commands. To wit:

First, we need re-instantiate the database only once, and get it to just the place we want as our 'unsullied starting-point' database. 

Time: 1 hour.

Snapshot the ZFS mount in the global zone (before the '@' is the ZFS volume, after is the snapshot name):

bash# zfs snapshot /tank2/db0/data@freshdb      
bash# zfs list -t snapshot
NAME                             USED  AVAIL  REFER  MOUNTPOINT
tank2/db0/data@freshdb              0      -  13.5G  

Time: 10 seconds

Test to your heart's content, mess up the database all your want. Ready for a fresh, unspoiled MySQL database? Well, just roll it back!


bash# zfs list -t snapshot
NAME                             USED  AVAIL  REFER  MOUNTPOINT
tank2/db0/data@freshdb           166M      -  13.5G  -

bash# zfs rollback /tank2/db0/data@freshdb

bash# zfs list -t snapshot
NAME                             USED  AVAIL  REFER  MOUNTPOINT
tank2/db0/data@freshdb              0      -  13.5G  -
Time: 8 seconds

Do this as many times as you need. Fresh databases in seconds, not upwards of an hour.

Just wanted to share...

Thursday Jan 17, 2008

Call it SaMp now....

Everyone has seen the Sun/MySQL news now. A strong commitment to Open Source Sofware, Open Source RDBMS, MySQL users current and future, and especially SaMp (Solaris Apache MySQL PHP). But don't take my word for it... this blog entry today caught my eye, echoes my probably biased sentiments, and tips a hat to one of the more clever Sci-Fi movies of the past 20 years, The Fifth Element.

I remember I blogged last year that I did Open Source... I suspect that, henceforth, I will be doing Open Source bigtime...
 

About

Main Sequence: 1) an astronomy term denoting the lifecycle of a majority of known stars. 2) err @ Sun/Oracle: long-time (since 1988) Sun/Oracle veteran, still shining in an ever-changing high-tech universe

Search

Archives
« March 2015
SunMonTueWedThuFriSat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
    
       
Today