Thursday, May 28, 2009

RAID 1 vs Windows Vista

I recently needed to upgrade a computer with Windows Vista to RAID 1 (drum roll please)
without reinstalling vista.

Here are the steps to follow.

Disclaimer : Do not attempt these procedures. If you do attempt this, you and only you are responsible for any damage, loss of data, etc.

Note : Your RAID controller must support creating a mirrored array (RAID 1) without erasing the drive.

Note 2 : I got lucky with this one.

Note 3 : You should be familiar with setting up RAID already, this is NOT FOR NOVICE USERS.

Note 4 : One tiny mistake could result in complete loss of data, you've been warned.

The steps:

  1. BACKUP DATA!!! BACKUP DATA!!! BACKUP DATA!!!
  2. MAKE SURE YOUR DATA IS BACKED UP!
  3. Did I mention BACKUP YOUR DATA!
  4. Download the correct RAID drivers.
  5. Main Disk in SATA port 0.0 Spare Disk in SATA port 0.1
  6. Enable RAID in the BIOS but disable RAID support on SATA port 0.0
  7. Allow windows to load.
  8. Install RAID drivers.
  9. Shutdown system.
  10. Enable RAID support on SATA port 0.0 and 0.1 via BIOS.
  11. Create a new mirrored array via BIOS utility using SATA 0.0 and 0.1.
  12. If it asks you to erase the disk choose no.
  13. Shutdown computer and remove SATA data cable from spare disk (0.1)
  14. On startup the BIOS should report that the raid array is degraded.
  15. Enter RAID setup utility and make the RAID array to bootable.
  16. Shutdown and replug the SATA data cable to spare disk (0.1)
  17. Enter RAID setup utility.
  18. If it shows 2 arrays delete the one that is the spare disk (0.1)
  19. Choose the remaining raid 1 array and choose repair, select the spare disk.
  20. Allow windows to load.
  21. Wait for the mirror to rebuild.
  22. Enjoy!
After thoughts, if you wanted to migrate to a striped (raid 0, raid 5, etc) array, follow the steps for a mirrored array, then image your hard drive (Trinity Rescue Kit anyone?), construct your RAID array, and copy the files back over onto the new array, then hope windows boots.

Monday, May 04, 2009

OWCLANMP3

And so begins the project....

  1. Create a song database backend.
  2. Create a management front end.
  3. Create a customer selection front end.
  4. Create a server based music player.

And so begins the problems....

1) Using a database to represent song data seems like a good choice. However, it isn't as straight forward as it seems when you through in genres. I would like the manager to be able to include(or exclude) genres from playing.
  • I seem to have solved the problem by using a parent child relationship between genres, eg Rock->Alternative ->Adult Alternative. Using stored procedures to iterate through the children to the parent to generate the combined name (for user readability), and children to the parent checking id's. eg: if Rock is selected as an excluded genre, we also need to exclude all of it's children (Alternative, Adult Alternative) Had I chose Oracle or MsSQL I could have used SQL Recursion, MySQL doesn't support this. However, in my view, MySQL Community Edition beats the pants off MsSQL Express. In the end I want this to be able to function on low end hardware running Linux, so MS was out from the start anyway. However I'm looking forward to MySQL implementing this type of feature in the future (got to love community driven development).
2) I will need to either script a file transfer client, or write one into the manager program to transfer the actual mp3 files to the server.
  • Undecided
3) The web programming seems pretty straight forward and I plan on using PHP as the backend for interfacing with the SQL Server. I want this to be very user friendly and "pretty", however I don't claim to be much of a graphic artist, maybe I can leverage some contacts to help with this.

Updates to follow.