A great introduction to ZFS de-duplication

I’ve been looking into deploying ZFS de-duplication, and I have one application in particular (backup staging) that would greatly benefit from it. George Wilson did an awesome introduction to ZFS de-duplication video, and it’s a great place to get started. I’m planning to start testing out de-duplication as soon as my SSDs are ordered, and hopefully I will have some positive results to report!

Using MySQL query logs to debug authentication issues

I recently installed LogAnalyzer, and after the install completed I noticed that nothing was being displayed in the web interface. I figured I fat fingered something, but needed a way to verify this. Luckily for me I was using MySQL, so I enabled MySQL query logging and low and behold I proved my hypothesis:

120212 12:09:33     6 Connect   rsyslog@localhost on
                    6 Init DB   Access denied for user 'rsyslog'@'%' to database 'Syslog'

To fix this I logged into the database and changed the password for the rsyslog user:

$ mysql -u root -h localhost –password
mysql> use Syslog

mysql> SET PASSWORD FOR rsyslog = PASSWORD (“XXXXXXXXX”);

Everything began working once the application could authenticate, and I was able to start playing around with LogAnalyzer. Noting this here in case I fat finger another password in the future. :)

An interesting way of looking at file system versioning (ZFS feature flags)

I got a chance to catch up with a bunch of stuff in my “need to read” / “need to watch” folder this past weekend. One of the videos I watched talked about ZFS feature flags, and how they will be used by the Illumos community to add new features to ZFS. ZFS feature flags make a lot of sense, and will definitely be invaluable once ZFS is extended by more than one organization. Cool video, and well worth the ten minutes it takes to watch it.

How I saved $80 a month on my cable and Internet bill

I was reviewing my cable bill last month and was floored that I was spending $120 a month for a DVR, cable and Internet access. This blew my mind, and I set out on a quest to lower my bill without losing access to quality content (I like to watch educational shows and documentaries). I had a couple of requirements prior to heading down this road:

1. I needed to be able to view shows on the major TV networks.

2. Internet bandwidth needed to be sufficient to stream movies from Hulu, Netflix or Apple.

3. Wanted to be able to access on content on demand.

None of my requirements called for cable tv, so the first thing I did was cancel my cable and return the cable box. I replaced my cable with HDTV over-the-air service, which I am obtaining through a Leaf indoor HDTV antenna. This paper thin antenna works great, and I am able to pick up crystal clear reception from the major networks, as well as a number of other stations I didn’t know were available. Can’t beat free!

Cutting cable saved me $60 a month, but I started to wonder if I could do more. I went back to my bill and noticed that I was being charged $7 a month to lease a modem, and my Internet service was running me $43 a month. After a bit of research I realized you can purchase a modem, so I picked up a Motorola SB6121 SURFboard DOCSIS 3.0 Cable Modem (if you decide to buy your own modem make sure you get a model that works with your cable provider) for $40 and returned the modem I was leasing. This purchase will pay for itself in 6-months, and after that I will begin saving $7 a month. Nice!

So with two relatively minor changes I was saving $67 a month. Could I do more? Well it appears I could. I went out to a competitors website and started looking at their Internet rates. They have a plan similar to mine that was $13 less a month, so I called my cable provided and told them I was going to switch. They transferred me to their retention department who offered me the same plan as their competitor, which chopped another $13 off my bill. So if I you add up the $60 I saved from cable, the $7 I saved by purchasing a modem and the $13 monthly reduction in Interent service I’m now saving $80 a month! I still need to find a good way to stream movies and documentaries, and ideally I would like it to work with the roku digital video player. How are my readers watching movies and documentaries in the digital world?

How to get around the PHP “strftime(): It is not safe to rely on the system’s timezone settings” warning

When I was playing around with the LogAnalyzer Statistics page I received the following error in each of the display boxes:

Warning: strftime(): It is not safe to rely on the system’s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘America/New_York’ for ‘EST/-5.0/no DST’ instead in /var/www/html/log/classes/jpgraph/jpgraph.php on line 390 Warning: strtotime(): It is not safe to rely on the system’s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘America/New_York’ for ‘EST/-5.0/no DST’ instead in /var/www/html/log/classes/jpgraph/jpgraph.php on line 391

In the error message it provides two solutions to address this issue:

1. Use the date.timezone php.ini entry.

2. Call date_default_timezone_set() to set the timezone.

I went with #1 and set date.timezone to the following:

[Date]
; Defines the default timezone used by the date functions
; http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone
date.timezone = ‘America/New_York’

I restarted Apache and everything is now working. I like easy fixes. :)

Enabling MySQL query logging

I recently installed the LogAnalyzer graphical syslog analysis tool. After the install completed I went to the “Show Events” page and noticed that no data was being displayed. I wanted to see which queries were being sent by LogAnalyzer to my MySQL database instance, so I enabled query logging by adding the following two statements to the [mysqld] block in the /etc/my.cnf configuration file:

general_log=1
general_log_file=/var/log/query.log

The first line enables logging, and the second line tells MySQL were to write the logs. Once enabled you can see the queries executed against your server by paging out the contents of /var/log/query.log. This will have one or more entries similar to the following:

                  233 Query     Select FOUND_ROWS()
120212 13:15:07   233 Quit
120212 13:15:12   234 Connect   rsyslog@localhost on
                  234 Init DB   syslog
                  234 Query     SHOW TABLES LIKE '%SystemEvents%'
                  234 Query     SELECT SQL_CALC_FOUND_ROWS id, devicereportedtime, facility, priority, fromhost, syslogtag, processid, infounitid, message FROM SystemEvents ORDER BY id DESC LIMIT 100

Pretty cool, and definitely super useful for debugging problems and figuring out how restrictive you can be with your GRANT statements. Viva la MySQL!

« Older Entries