Where’s The Disk Space?

On June 9, 2008, in posts, by Michael

Interested in what exactly is consuming most of my disk space on my laptop I took a look using Disk Inventory X. The little utility fired up and scanned my hard drive in no time.

When the scan was complete I was given a detailed map of everything on my hard drive, organized by directory. Optionally there is also a side menu showing file usage by type. This comes in very handy for finding out where all your disk space is being used.

Maybe I should just get a larger disk?

Tagged with:  

Screen Blanking MythTV

On June 9, 2008, in mythtv, by Michael

So very recently I setup up another mythtv pvr that runs in my bedroom. The point of this was to encourage me to get to bed at a decent hour and to put a stop to me falling asleep on the couch.

The setup went okay, although I must admit I encountered some issues with the whole frontend/backend slave setup which I will detail in a later post.

This post is about blanking the screen as I often fall asleep while watching a movie or show. This increases the chance of screen burn in, and is something I want to avoid.

I am still researching how this can be done automatically but in the interim I have come up with the following solution. I have setup the power button on my hauppauge remote to execute a script with changes the runlevel from 5, to 3. Essentially stopping the frontend and bringing the system down to a terminal.

Since most default installs automatically blank the terminal after a set period of time of inactivity I am set. Now when I am drifting off and far to cozy to get out of bed to shut off the monitor I can simply press power and let the system enter runlevel 3. Then after a few minutes the screen will blank automatically.

To get this to work I added the following configuration to the .lircrc file in /home/mythtv.

# Power Button begin
prog = irexec
button = Power
config = /home/mythtv/powerbutton.sh
end

With that done the next step is to create the actual script that will switch runlevels. (Keep in mind this assumes your mythtv user has sudo access to run the init command) The following script is run from /home/mythtv/powerbutton.sh.

#!/bin/bash
 
RL=`/sbin/runlevel | awk '{print $2}'`;
LOG="/home/mythtv/pb.log";
 
if [ $RL -eq 5 ]
then
   # shutdown
   sudo /sbin/init 3;
   printf "`date`: powerbutton.sh: [$RL] switching to runlevel 3\n" >> $LOG
   killall irexec
   sleep 1;
   /usr/bin/irexec &
   printf "`date`: powerbutton.sh: starting irexec.\n" >> $LOG
   sleep 1;
   setterm -reset
   printf "`date`: powerbutton.sh: resetting terminal.\n" >> $LOG
   sleep 20;
   RL=`/sbin/runlevel | awk '{print $2}'`;
   printf "`date`: powerbutton.sh: switched to [$RL], exiting.\n" >> $LOG
else
   # startup
   sudo /sbin/init 5;
   printf "`date`: powerbutton.sh: [$RL] switching to runlevel 5\n" >> $LOG
   sleep 20;
   RL=`/sbin/runlevel | awk '{print $2}'`;
   printf "`date`: powerbutton.sh: switched to [$RL], exiting.\n" >> $LOG
fi
exit 0

With that done, all that is left is to test it out. Of course you will need to either reboot to pickup the changes or restart lircd, then the mythtv frontend.

Keep in mind this is just temporary solution and not something I plan to keep doing. I know there are probably far better ways of doing this and I will be looking into them in the future.

Tagged with:  

File Server Update

On June 9, 2008, in posts, by Michael

This is an update to my earlier filer posts (Part 1, Part 2), where I put together a windows server 2003 and set up a raid 5 array. Everything was working great for a long time, but as expected eventually a drive stopped working.

Not a problem the raid 5 array handled the failure without issue. What I suspect brought this on was a series of power failures one day. Along with the failed drive also came other issues. The primary ide controller on the motherboard no longer functioned, and I had to switch to the secondary just to boot the server.

Due to the lose of the ide controller, I had to remove the cdrom drive to put in a replacement drive. After that was done, I started resyncing the raid. All appeared to be going well until I took a look the next day and noticed the raid was still in a failed state. Taking a look at the replaced drive it was appearing as a 750GB drive. Since it was a 250GB drive I knew this wasn’t right. Checking out the drives properties revealed another issue. The system couldn’t read the drive information properly.

Great I thought, not only did the primary controller die, but the secondary controller slave isn’t working properly either. Signs to me that the motherboard cannot be trusted. I decided to swap out the motherboard from my desktop machine.

Of course the system didn’t boot, but performing an inplace reinstall, then plugging my raid drives back in brought everything back online. Not a single byte lost. I added the new drive to the raid 5 volume and started the resyncing process.

After a few hours all was well and I had a nice healthy file server.

Tagged with: