geek

Replacement UPS batteries and RefurbUPS.com

Posted by Cameron Stokes on August 23, 2010
diy, geek / No Comments

The tldr version is…RefurbUPS.com is awesome and saved me over $80 off buying original manufacturer batteries and over $200 off buying all new UPS units. Read on for the full story.

Several years back I purchased two uninterruptible power supply units (UPS) for my home file-server and firewall. The idea, of course, was to prevent these systems from experiencing temporary power interruptions and potentially causing file corruption in the case of my file-server or just being a nuisance for the firewall. Last year both units died within a month of each other. I couldn’t believe it… I was convinced they had a time trigger to fail after X number of years in a ruse to get customers to spend more money. Not wanting to fall for this, I started looking for alternatives.

A new, comparable UPS would cost approximately $150 (these were high-end models) and I certainly wasn’t excited about buying two.  Replacement batteries from the manufacturer would have cost approximately $80 each so I was still looking at roughly $160. I looked around at replacement battery sites and was largely unimpressed. Let’s just say the site design for several sites left me questioning their credibility. I finally found RefurbUPS.com and was sold when I found their instructional video for how to replace the batteries. It wasn’t a complicated procedure but that gave me the warm, fuzzy feeling I was looking for to buy from them. Total price from RefurbUPS.com including shipping was $90.29 for two sets of batteries.

After receiving the replacement batteries I installed them and was dismayed when the UPS started beeping and the Replace Battery LED lit after being turned on. I re-installed them a few times with the same results. I watched the instructional video again, realizing it was hard to mess up a two and a half step process, and was stumped. My one thought was maybe the UPS needed to charge a bit. I left the unit plugged in but turned off overnight and when I checked the next day all was well.  The UPS turned on fine, no beeps, and when I hooked it up to my file-server it said it had a full charge.

The UPS have been up and running with the new batteries for a few months now and are holding strong.

Tags: ,

Pandora Bookmarklet

Posted by Cameron Stokes on May 30, 2010
code, geek / No Comments

Every time I listen to Pandora I open the site in a new window and scroll and resize the window to fit the player just right and hide the noise (ads) on the page. I finally sat down and put together a bookmarklet to do this for me. It’s not perfect, but is good enough. Right-click the link below and click Bookmark This Link (in Firefox) and you can use the same script to load Pandora and only see what you really care about, the music.

Bookmark This Link.

Here’s the code (prettified):

javascript: function pandora() {
    window.open( 'http://pandora.com/#radio',
                 '_blank',
                 'width=725,height=340,' +
                 'scrollbars=1,location=0,menubar=0,titlebar=0,toolbar=0'
    );
}
pandora();

Enjoy.

Tags: ,

Installing Euca2ools on Mac OS X

Posted by Cameron Stokes on May 11, 2010
Uncategorized, geek / No Comments

Having been bit by the cloud bug, I recently looked into the cloud computing software Eucalyptus. Using the Ubuntu Enterprise Cloud distribution I setup a controller and a couple nodes and then went to install Euca2ools on my Macbook. Following the instructions here, I soon ran into an issue. Here is the error I received:

stokesc-mbp:euca2ools-1.2 stokesc$ sudo make
...
Processing dependencies for euca2ools==1.0
Finished processing dependencies for euca2ools==1.0
install: root: Invalid argument
make: *** [install] Error 67
stokesc-mbp:euca2ools-1.2 stokesc$

A quick internet search didn’t reveal too much but I soon found my way into the MakeFile and noticed the group for the install command seemed off. Knowing Mac OS X’s ancestry is BSD and from my past experience with OpenBSD, I knew the root group did not exist in the BSD operating system and was in fact named wheel. I changed all references to the group root (the -g option), but left the owner references alone (the -o option) and Euca2ools was soon installed. Here is the snippet from my new MakeFile:

...
@install -g wheel -o root -m 755 -d $(PREFIX)/bin
@install -g wheel -o root -m 755 bin/* $(PREFIX)/bin/
@install -g wheel -o root -m 755 -d $(PREFIX)/man/man1
@if [ -d $(MANDIR) ]; then install -g wheel -o root -m 644 $(MANDIR)/* $(PREFIX)/man/man1; fi
@if [ -d $(BASH_COMPLETION) ]; then install -g wheel -o root -m 644 $(UTILDIR)/* $(BASH_COMPLETION); fi
...

I opened bug 558420 with the Eucalyptus project to address this. As of this post, this issue affects version 1.2 of the Euca2ools download and likely previous versions.

Tags:

New raid array with Linux and mdadm

Posted by Cameron Stokes on February 28, 2009
geek, raid, upgrade / 2 Comments

I ran out of free space on my file server a few months back and have been too cheap to upgrade until recently. I first started with four 400 GB drives a few years ago and setup a RAID 5 array using Linux and mdadm giving me roughly 1.2 TB of space. I upgraded a disk at a time as needed until I had seven drives and about 2.6 TB of space:

Filesystem Size Used Avail Use% Mounted on
/dev/md0 2.6T 2.6T 2.8G 100% /mnt/sata-array

Having filled this up I started looking for the best way to upgrade. The Seagate 1.5 TB drives offered the best per GB pricing however with the recent bad news specific to these drives I decided to stear clear of Seagate. The next best option I could find were the 1 TB Western Digital Green Power drives. The Green Power drives have a lower overall rotational speed and will spin down as allowed to save power with the added benefit of generating less heat and also noise.

After reading several threads (one here) regarding Bit Error Rates (BER) with drives this large and the potential for errors even with a RAID 5 array I decided to go for RAID 6 with my new array. RAID 6 can survive 2 disk drive failuers and will theoretically protect me from the high BER these drives are susceptible to.

In a previous post I mentioned trying ZFS. I scrapped that idea when I found you can’t expand a ZFS zpool by adding single drives to the system. You can add additional zpools to a zpool (not sure if my terminology is right there) but that means adding an equal amount of storage to your existing array when you want to upgrade. This means if I have 4 drives in a zpool, I’d have to add another 4 drives to upgrade. You can also replace drives in the zpool with larger drives to expand them, but you have to replace each drive. Neither option is very cost effective for me. I was a little disappointed not to be able to try something new but have been happy with Linux and mdadm so it was not a difficult decision to go back to them.

I ordered 6 drives from Amazon and once they arrived I assembled them into a RAID 6 array. mdadm has to sync the newly created array but the array is online and can be used normally. A quick ext3 format and I have 3.6 TB of space available.

Filesystem Size Used Avail Use% Mounted on
/dev/md0 3.6T 229G 3.2T 7% /opt/sata-array

After the format I started transferring my data which slows down the sync, but transferring all my data will take a few days anyway so the overall timeline doesn’t really matter for me. Doing a cat /proc/mdstat shows me the status of the array:

Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid6 sdf[5] sde[4] sdd[3] sdc[2] sdb[1] sda[0]
3907049984 blocks level 6, 64k chunk, algorithm 2 [6/6] [UUUUUU]
[======>..............] resync = 32.0% (312900864/976762496) finish=4727.0min speed=2340K/sec

unused devices: <none>

Short of having to setup a second computer to transfer the data, the entire process is very easy. I feel better knowing my data is reasonably safe with RAID 6 even though I don’t have a backup. Backing up that much data is just too expensive to be worthwhile.

Tags: , ,

Happy 1234567890!

Posted by Cameron Stokes on February 13, 2009
geek / No Comments

Any developer or system administrator worth their salt will know what I’m talking about.

Tags: