Software RAID support on Linux

Good RAID FAQ on Linux here.

Walkthrough on setting up a software RAID array here

Check RAID status:

<code>/sbin/mdadm --detail /dev/md0</code>

Or check with this:

<code>sudo cat /proc/mdstat</code>

This is what a good status will look like:

<code>
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md1 : active raid1 sdb5[0] sdc5[1]
      1485888 blocks [2/2] [UU]
      
md0 : active raid1 sdb1[0] sdc1[1]
      242709888 blocks [2/2] [UU]
      
unused devices: <none>

The [UU] (I think) indicates the status of both drives in the array, and both are Up

Removing drives: sudo mdadm /dev/md0 -r /dev/sdb1

Adding drives back to the array: sudo mdadm /dev/md0 -a /dev/sdb1

Making the most of Eclipse’s breakpoint conditions in the debugger

Not many developers I’ve come across are aware that Eclipse has this feature, but sometime setting conditions on breakpoints can save you a ton of time, especially if you’re stepping through the same lines again and again in a loop waiting for a condition to occur that you need to debug.

Once you have a breakpoint in place (double-clicking in the left hand column next to the line you’re interested in), go to your Breakpoints view in the Debug perspective. Right-click the breakpoint and select ‘Breakpoint properties’. In the middle of the dialog box that appears there is a text area where you can enter an expression that will either trigger the breakpoint when the expression is true, or when the condition changes, depending on the value of the radio button you select. In the textarea you can type an expression that you want to get evaluated, for example ‘secondsRemaining ==1’ (without the quotes). With the ‘condition is true’ radio button selected, this breakpoint will now only trigger when secondsRemaining (a variable that is in scope where my breakpoint is) has the value of 1. Easy.

Network vulnerability exposed for Vista that causes a Blue Screen

This report details a remote code execution vulnerability in Vista that cause Vista to blue screen. Apparently this same code was inherited by Windows 7 too (the same vulnerability exists in Windows 7 Release Candidate), but has already been patched in the version of 7 that’s gone to manufacturing according to this Microsoft technote… That’s unusual, because didn’t the final code go to manufacturing some time ago?

Android/myTouch 3g tips – usage and development

I’ve just started playing around with my new Google Android phone and checking out the SDK. I have to say, Google did an awesome job with the SDK making the APIs extremely rich and easy to get apps put together very quickly. My only gripe so far is getting to grips with the layout managers to layout your UIs.

The phone itself is absolutely awesome. This is everything I’ve wanted my phone to be, in terms of an internet access device, with easy access to email accounts. and a decent browser that looks like what you see on your desktop browser, and not some text equivalent that gets mangled by a WAP gateway.

I’ve started putting together some notes – first on using the myTouch3g phone itself, and then also on developing for Android. Hopefully soon I’ll have my first app ready to upload to the Android Market!