Jan 3, 2013

Keeping data safe - Part three

The previous part was about partitioning, and this part is about mirroring. As it turns out, not having to restore from a backup at all, is the most efficient way of avoiding data loss.

One way of ensuring your data is to mirror it continuously, usually by mirroring the whole disk. A drawback of data mirroring is cost - you need at least two disks, which means the price doubles. That is where partitioning steps up and says hey, you don't need to mirror everything - just put the important bits on the mirrored drive.  You usually don't have more than a 256 GB disk of personal data (I know many who have less  - a few have a lot more), which means you can have a small-ish set of drives for mirroring.

It actually makes sense not just because of the price tag, but because of the time it takes to rebuild the drive.

The benefit of this setup is quite easy to see, because recovering data from a hard drive failure can be very expensive, and always takes a certain amount of time. And even if you have a backup, you risk data loss because when did you perform a backup the last time? Even if it's a few hours ago, it doesn't help much if the work you did after, is gone.


How to set up mirroring

Strictly speaking, there are two ways of mirroring, one is by hardware, which you set up in your computer's BIOS, the other one is software based and can be done from the operating system.


In either case, you'll just see it as a regular hard drive on your system, but behind the scenes there are two drives, and every write action is performed on both disks. If one fails, the system automatically fails over to the working one. Hopefully you'll also get a message about the failure, but this depends on the software.

I'll just quickly go through the built-in feature in Windows 7. Go to Disk management (either click through Control Panel, Administrative tools, Computer Management , Storage and hit Disk Management - or just write disk management and click on "Create and format hard disk partitions" or from the run dialog, write diskmgmt.msc). Right click the disk you want to mirror, and select "Add mirror..."  This option is only available if a suitable disk exists. You can also remove mirrors the same way.

Windows 8 has a new feature called "Storage Spaces" that provides the option to mirror or distribute data over several disks. You'll find a nice review of this feature at howtogeek.com.



Things Takes Time

A word of caution here, (re)building an array of disks takes time. I have two 2 TB disks mirrored, and whenever I hit blue screen or reboot or system crash of any type (last time, way back in 2012) I couldn't really exhale until some 6 hours later... because meanwhile, the status of the array was "rebuilding". It basically means going through every bit on the one drive and replicating it on the other. And if the working drive fails during that time, you are in a hard place. (So if you're really really paranoid about losing anything, you might want to keep a spare drive handy, or even go for a heavier RAID setup, like RAID 5, which involves more hardware, but has a higher fault tolerance)



Windows does not do a good job in telling you if something's wrong with the mirror (it does hint something with a shout-out just after booting, but you have to sit there to notice it), so you need separate software. Or, you can go to Disk management, where you'll see the status of the array (I've highlighted the relevant bits). You see the two red disks, "disk 0" and "disk 2", they are both assigned to G: - if I go to Explorer, I'll just see one instance of G:.  You'll also see it reports a 50% overhead, which is correct. I have 2x 2TB = 4TB disk space, but only 2 TB is available. 50% is lost, because it's mirrored.



Next part will be about continuous backup, or using services that let's you forget about backup. Stay tuned.

Dec 3, 2012

Keeping data safe - Part Two

Some say the devil is in the detail. This may not be necessary for a succesful backup strategy, but it keeps things nice and tidy: Partition your data. If you can partition physically, on different disks, that's great.  Even if you only have one hard drive, you can split it into several partitions. And on mobile devices, you can split between internal storage and external storage (SD cards). There's also software for partitioning SD cards.

It can be as easy as splitting between data and programs, or you can be more fine-grained. If you split things this way, you can always install a different operating system, or install your data-disk in another system, without dragging along old mud from previous installations.

Then, you should always save your data to the designated data-partition, and keep the operating system and program files on the other one. This is actually what I've run into many times, the OS stops working, and you're unable to get in to copy those files to where you want them.  If they're on a separate partition, or better yet, separate hard drive, you can easily reinstall without touching your saved files.

There's a word to be said on "data" as well, you can choose to split it into "commercially available" and "not commercial available". The latter one being stuff that you can't buy or download or otherwise get your hands on, should it disappear from you device - that's your personal notes and photos, and whatever else you create.

Should I back up my programs?

You have to install programs again on your new installation - unless you create an image of your disk, and use that instead of backup. That's a question I get from a lot of people, shouldn't I back up my "c:\Program files" folder? Well, no, not really. Some configuration files or the files you saved from the programs, of course. But most programs require registry changes, different files to be created and permissions to be granted. These won't be recreated if you simply copy your old Program Files folder  (or your \usr\bin) over to your newly installed drive.

You can choose to back up the installation files for your programs, but chances are they are available online anyhow. For convenience's sake, you may keep them around (especially if you have a license for a specific version!).

With Windows 8 you have the option to "reset" the operating system  to it's initial state, or to a point in time you've set by yourself, and then it's possible to keep your programs and settings as they were at that point. In earlier versions of Windows, you'd have to make disk images to keep this sort of functionality. Anyway, the best idea is still to separate your concerns between data and programs, because it just may be that your next operating system won't be able to install on top of the last one. Or - you're unable to restore from your system restore point, and then what do you do?

Next part coming up: mirroring disks and why it makes sense (and how it's connected to partitioning).

Nov 25, 2012

Setting up Telldus Tellstick Net

This is a very quick post on my latest gadget purchase, the Telldus Tellstick Net.  It's a networked radio signal transmitter, designed for home automation - which is what Telldus is all about.

The device is small, it can run on USB power or from the mains, and it has holes for wall mounting. Great start!

After installing the device, which is a breeze, just login to live.telldus.com. It should already have detected a tellstick net  from your location. I just clicked OK and it was activated. Smooooooth - no need to punch in that nasty 24-character ID.

I had a little trouble using live.telldus.com from Google Chrome, but IE9 was fine. Another problem is that if you register using google, as I did first, you get an e-mail with a password, but no indication of this from the web page. So I was unable to log in with my google account and registered a regular account,when getting the password, I saw that one was already sent to my google account. This is something the Telldus guys should fix.




Once logged in, start by adding devices. What's very cool about the Tellstick Net, is that it doesn't only support Telldus and Nexa devices - it supports a wide array of on/off switches, dimmers and sensors. Check out this list!

 I first added my devices from the Nexa  "code switch" (which I guess is more commonly referred to as "remote") , but was unable to find the "house code" on it. You have to look under the battery cover for it.

A downside using the code switch is that you only get on and off state. If you want to dim the lights, you have to have a dimmer (duh!) and also install it as that - not via the remote.

But that's also very easy, just click on the learn button in the web page, and then the learn button on your dimmer (on the Nexa one's it's a green light). The light will flash when a successful match is made. This does not override your remote unit number, if you have already learned it there, so you can still use the remote.

Now you can add a group device also, which is currently in beta, but works just fine. For instance, create a group called "lighting ground floor" and make it switch off  every night at 10:15 PM. I've not tested if this works only when the internet connection is up.

Other cool stuff: You can install XBMC Light Controller plugin to make the light dim when you watch movies from your XBMC. Read more about it in this forum post. Excellent work, Henrik!