Rob's blog
Spinning Down Hard Drives in OpenSuse 10.3

I started out talking about SMART and drive temperatures the other day but got all geeked out about hardware and forgot where I was going. I meant to also talk about how I tried to just spin down my older Western Digital ATA hard drives to give them a chance to cool off.

I looked at the hdparm, I saw some comments on forums saying it could be used to set a time delay to spin-down a hard drive.

Hot Drives: Dealing with SMART data on OpenSuse 10.3

One thing I've noticed since upgrading my system to OpenSuse 10.3 is that my 3 older Western Digital 160GB drives (specifically 2 WDC WD1600JB-00D and a WDC WD1600JB-00F) run really hot. Like 120 degrees Celsius hot. I get this information from smartd or smartctl. It leaves scary log messages like
Oct 24 19:43:18 copper smartd[4479]: Device: /dev/sda, SMART Usage Attribute: 194 Temperature_Celsius changed from 120 to 116

The drives do get hot to the touch but 120°C sounds really hot. It is possible that the sensors aren't accurate. It's also possible they've been reporting high temperatures ever since I installed them around five years ago. See, until I installed OpenSuse 10.3 I never saw the SMART data. I could also guess that the information just isn't accurate for my system. So to test these ideas out I ran smartctl to see what it had to say about all my drives. Three are the WD drives I mentioned and the fourth is a Seagate SATA drive.

32px-Nuvola_mimetypes_binary.png
32px-Nuvola_filesystems_folder_yellow_open.png
Simple PHP for Dumping a Berkeley Database

I will one day come up with a better way to show PHP in my blog but in the meantime I'm not going to let that stop me from sharing a handy script I put together yesterday. I grabbed most of the code from examples on PHP.net but the examples as they were didn't do what I wanted.

Upgrading my OpenLDAP BDB Backend for Suse 10.3

When I upgraded from OpenSuse 10.2 to OpenSuse 10.3 I should have backed up my LDAP database as LDIF before I started. I didn't do that of course but I thought maybe I could just copy the database over and tweak the config file in /etc/openldap/slapd.conf. The OpenLDAP server, slapd, can be configured to use a few different backends for storage. The most common seems to be a Berkeley Database. On my installation the database resides in /var/lib/ldap. There are a bunch of files there, it looks like a couple log files, a DB_CONFIG file and several database files (they have the extension .bdb).

I don't have exact step-by-step directions for how I fixed it but I'll go over the highlights of what worked for me.

A Couple Ways to Debug mod_rewrite

At the risk of turning this into an Apache fan blog, I have to mention the handy directive I found today. Many webmasters run in to mod_rewrite at one time or another and every one of them will have at least a little trouble with it. I just came across the RewriteLog Directive and corresponding RewriteLogLevel Directive. You're not going to be able to turn these on with shared hosting, they can't be used in .htaccess. To set up a debugging log for mod_rewrite, you need to add them to your httpd.conf somewhere. In my case I'm working on a server at home so I added

Overbooked

September's only just started and already I'm behind. It's not just me that's feeling it. Candace is getting started on reading the stack of books for her Masters Degree before classes start in a few days. She's also still moving her stuff in to our place from her old house. My daughter's schedule is full again of skating, piano and gymnastics and still no room for Aikido. I've noticed the past few years (and it seems obvious in retrospect) that September is more than just the back-to-school time. It's when everybody seems to stop relaxing, knuckle down and get back to work on whatever it is they do.

I've mentioned before that I have trouble getting myself focused when the workload grows. I don't think it's an uncommon reaction to want to go out and do something different when everything you're in the middle of seems to get boring and stagnate. For example, I had a little success working on a web app login page the other day so last night I sat down at the computer to figure out the next step. And spent an hour-and-a-half reading xkcd. Not just the comic but Randall's blag too. That kind of took me full circle in a "holy shit how does this guy have time on his hands like this" sort of way.

No AuthType Digest with LDAP Authentication Provider for Apache today

Motivation

Now that I've got an LDAP server up and running I'm trying to get my personal web server set up so it has a blanket authentication for my personal applications, static content and development stuff. The web applications I'm talking about aren't meant to be exposed to the public at large, they're not what you find here on Late Night PC Service or any of my other sites. These are things like PHP Calendar, Task Freak, SugarCRM, a bunch of development versions of apps I'm working on and some static content that might be a single html file or an image.

I currently have a server that's accessible through DynDNS and I use basic HTTP authentication on it. The server runs Apache HTTPD 2.2 and has whatever modules I want on it. My next server is roughly the same but I want to make things a little more secure and a little simpler (at the same time no less). So my idea was to move to LDAP as the Authentication Provider and Digest as the Authentication Type.

My LDAP Tree So Far

It took a lot of digging to figure out how I should approach choosing a good LDAP directory layout for my house but Michael Donnelly seems to have an answer I like. I created Organizational Units to hold all the people and all the computers. I want to have a few canonical OUs that hold the base records for each of these things then have other OUs that reference them and group by access. I don't know that I have it all figured out right just yet, but phpLDAPadmin makes it simple to move things around. Just make sure to hit the "Purge caches" link if you move stuff on one computer then view it on another.

Syndicate content