Saturday, November 22, 2008

Disk problems? I hate it!

There is one thing I hate about computers: sometimes something doesn't work and it takes a lot of time to figure out what is causing troubles. I am really happy when everything works as I am expecting. I am aware that it is important to create backups - I prefer to devote small amount of time every day / week than have to spend all day repairing and trying to get my data back. Unfortunately I am also eager to check a lot of things that shows up - new operating systems' versions (different Linux distribution for example), different compilers, tools etc. As far as it does not involves playing with disk partitions I feel quite safe - only thing that I have to do is just to create backup of the environment I am currently using. However when it comes to repartitioning or changes in partition sizes (sometimes, I had to do it - no matter how much I am trying to avoid it) it takes much more time than expected. A few days ago I have decided to change organization of partition on my old desktop machine. I didn't expected it to take so much time...

The strangest thing that happened to me recently was... incidentally loss of a whole partition (the one with quite important data on it... and of course the one I didn't backed up earlier ;) At the beginning I thought that everything is lost... but after a while I realized, that it have to be possible to recover at least some of the information. It should be possible - just like in case of deleting files. If nothing has been saved on the same place - the information is still there, the issue is that OS somehow does not see it. After a few click I had the first tool. Next couple of seconds, and... the tool informs me, that it found the lost partition, it allows me to see all the data on it... but... I am not able to recover them, because the full version of the software (the one you have to pay for) is needed for the write operation. I didn't want to waste my time, and wait for the code, so I started to search for the free alternative. After a while I have found TestDisk utility. It is completely free, and it is available in many version for different OSes. It is not as much friendly as earlier mentioned commercial app (TestDisk is a console application) but it does its job very good. After a few moments I had all my data back. And everything is ok (media are playable, archives have been tested and are error free). The best thing is that this utility (TestDisk) comes as a part of great LiveCD called PartedMagic. The LiveCD consist of a bunch of disk utilities, among them: GNUParted (partition tool able to resize, move, create, delete partitions...), TestDisk (partition recovery tool) and PhotoRec (file recovery). I advise to download PartedMagic's iso image, burn it, and have it always somewhere near - just in case...

A while ago, I went to my friends and they were having a problem - some application (which was really a state of the art when it comes to its design...) stopped working, because there were no sufficient free space on system partition (only 7 GB free...). They tried to reinstall this app on different partition - nothing changed - it claimed about insufficient free space on system drive. And that's where another utilities I use come in handy: Junction Link Magic and Winbolic. What do these utilities allow? To be short: creating junction points (directory symbolic links, NTFS junction or however you'll call it). The thing is just to create a special link pointing to a directory on a different drive or partition (that has a lot of free space) and thus overcome the limitation of "insufficient free space". It works similar to standard links, but it is transparent for all applications - the paths are not being changed, and from the view of application or file operations it is the same as it was before creating junction point. A few clicks in Winbolic (this one is my favorite) and everything was back to normal, app was starting without any complaint (all thing was about creating symbolic link for application's preferences stored in AppData...).

Similar technique I often use to avoid repartitioning my drive, and still be able to use all its space. When I give up some new and fancy Linux distribution (for any reason) - I just format the partition and link them to an empty directory (this is possible using Windows built in Administrative Tools -> Computer Management -> Disk Management). The only thing you have to do is to remove any drive letter that is assigned to drive, and mount the drive to any empty directory to any of the partitions you use. From now on all the space from the specified partition (or drive) is accessible through the directory you've chosen. It works very similar to mounting drives / partition in Linux distributions. I find it much more convenient than having a lot of drive letters that you have to switch through to find something.

No comments: