RTFM

[Read This Fine Material] from Joshua Hoblitt

First look at the Intel DC S3700 series of SATA interface SSDs

| 0 comments

Intel has been shipping the DC S3700 series fairly quietly for a couple of months now. I suppose that “DC” is supposed to mean Data Center? This new series is also high write endurance MLC based flash that’s designed to compete against high cost/high performance/high write life SLC devices. The spec sheet says it’s still 25nm MLC but must be either a new flash cell design and/or paired with a new controller as the performance blows the previous 710 series away. The interface has been updated from 3G SATA to 6G SATA (SATA 3), which is obviously needed now as the read & write spec exceeds 3G SATA (SATA 2). I also assume that the DC S3700s retain the 710s internal battery (or is it a capacitor?) backed cache; the spec sheet has just “Enhanced power-less data protection”.

Continue Reading →

Tuning the 3ware 9550 series of SATA RAID controllers on Linux

| 0 comments

This post is dedicated to David Newman. 🙂

For the second time in the last three weeks, I’ve come across an older model 3ware 9550 controller that was causing the system to lurch under load with high. Presumably due to high await times that I know are common with that model of controller.

[root@foo ~]# lsscsi
[0:0:0:0]    disk    AMCC     9550SXU-4L DISK  3.08  /dev/sda
[0:0:1:0]    disk    AMCC     9550SXU-4L DISK  3.08  /dev/sdb

Unfortunately, on el5.x systems sar does not by default log await data so I can’t tell how bad the problem has been historically. At least sar can show us that the system has had a high iowait percentage over the last several hours. Something else to note about el5.x is that tuned is not available so we need to tune I/O things directly instead of via a tuned profile.

Continue Reading →

Oops, I broke an EC2 instance… now what?

| 0 comments

I had a boo-boo the other day while upgrading glibc on an EC2 instance. Assuming that it’s not easier in terms of opportunity cost to provision a completely new instances to replace a broken on, it is possible to recover from this situation but you can’t do it purely via the AWS console. The solution is attach the damaged volume to another instance for repair. For some reason, the AWS console will not allow you to attach multiple volumes to the same instance.

I found an excellent detailed write up on how to do this:

http://alestic.com/2011/02/ec2-fix-ebs-root

The procedure is to:

  • Start a new instance in the same availability zone as the instance/volume that needs repair. Do this first as it takes awhile for EC2 instances to spin up. There’s no reason to create anything larger than a micro instance since we just need something to attach the broken volume to.
  • Stop (not terminate!) the broken instance.
  • Detach the volume needing repair from the broken instance after it has completely stopped.
  • Attach the broken volume to the new repair instance as /dev/sdf or higher.
  • On the repair instance, do something like cat /proc/partition (or install lsscsi) to make sure that the broken volume has appeared as a new block device. Likely something like xvdj.
  • blockdev --rereadpt /dev/xvdj (not needed, just paranoid); mkdir /mnt/tmp; mount /dev/xvdj /mnt/tmp.
  • Do any needed repairs from the repair instance’s shell and/or chroot /mnt/tmp (if you want a fully working chroot you will need to bind mount sysfs/etc.).
  • Once your sure it’s fixed. umount /mnt/tmp
  • Detach the fixed volume from the repair instance.
  • Attach the fixed volume to the original instance as /dev/sda1.
  • Start the original instance.
  • Terminate the repair instance.

fixing the WordPress Twitter Badge Widget v1.75 plugin to work with HTTPS

| 0 comments

The excellent WordPress Twitter Badge Widget Plugin I use on this blog fetches a .js from twitter via HTTP. Ironically, twitter redirects the request to be via HTTPS but initial request is enough to break the browsers title bar “lock icon”.

Fortunately, the required fix is trivial:

$ git diff
diff --git a/twitterbadgescript.js b/twitterbadgescript.js
index 8209441..99d3d31 100644
--- a/twitterbadgescript.js
+++ b/twitterbadgescript.js
@@ -61,7 +61,7 @@ function TBW_ProcessWidgets(jTB)
     var twitterWidgets = document.createElement('script');
     twitterWidgets.type = 'text/javascript';
     twitterWidgets.async = true;
-    twitterWidgets.src = 'https://platform.twitter.com/widgets.js';
+    twitterWidgets.src = 'https://platform.twitter.com/widgets.js';
     document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
   })();//Run on DOM ready
 

I’ve posted the widget + my trivial via fix here: https://github.com/jhoblitt/twitter-badge-widget.