Friday, February 6, 2009

Analyze data on Corporate network drive

When you are dealing with hughe number of domain users who put their data on same logical drive (usualy those drives are suited on SAN), for sure you will have need of content inspection of those data. This need comes from many aspects :

- Type of data - are they productive or not ?
- Planing of defragmentation procedure
- Planing for future upgrades of storage space
- Behavior of users and most used filetypes
- Top 10 freespace_eat users
- Duplicate files

For example, if you are dealing with 500 users, and you try to analyze their files which are located on that one logical drive, you will face with thousands folders and files and standard tools are not adequate for such analysis. At the end probably you will have sheets and sheets numbers, names and paths, which I'm sure that you'l agree it is pointless way to analyze.
Therefore I'm using opensource tool named WinDirStat.
This tool is created for administrators who have needs like I've described before. Once you start this tool, read the whole content on selected disk, and after some time you are getting graphical presentation of your disk situation.


After such pretty picture, you will easily have "a clue" what's giing on with that drive and your users.. ...and you can start to do the admin-work ! :)

How to expand size of VHD virtual disk file

Planning is one of the essential steps when you are building an IT solution. If you underestimate this part of the process lately you will face problems, and sometime those problems are likely with no easy solution or even no solution at all.
One of such problems that may appear is size of hard disks in virtualized environment. Let's say that you are using Microsoft Virtual Server, and initially you defined a Primary hard drive with dynamic size up to 16 GB. You install on this drive OS and after some time you realize that 16 GB is space that do not meet your needs. So adding aditional drive (VHD file) as second may solve your problem. But what you need more space on C: and you are running Windows ?
In such cases I'm using a tool from vmToolkit.com named VhdResizer. This toll for affordable time will expand your VHD disk to size you want (limith is 4TB, but I assume that noone will have a need for such large disk in vitualized environment).

Usage is very easy:

1. You are installing VhdResizer on yor host server.
2. Run the tool and select your VHD file that you want to expand.
3. Name your destination resized VHD file. This is great feature as you don;t have to do backup of your existing drive. After resizing process you will have a new larger file.
4. Define new size and click "resize" button.

About time consumption of this process: I've done it on 16 GB file and expanded it to 30 GB. It took allmost 40 min on HP DL380G5 server with 16 GB RAM and 2 QuadCore Xeon processors.

Thursday, February 5, 2009

How to convert back Dynamic disk into Basic in Windows 2003 Server

If you are dealing with environment in which you are using servers based on Microsoft Windows 2003 Server platform, than after some time for sure you will face with situation in which you will need to deal with Logical disk configurations and option.
Some time ago I faced a problem with one of the server in which I had 2 hard drives. System disk was previously converted as Dynamic and I had do convert it back to Basic.
This feature is documented by Microsoft as Unsuported, so there is no official way to do this. Luckily after 2 days reading about structure of NTFS, I've found a solution. It is a tricky one, and I must warn you that changing partition and disk parameters directly using disk editing tools is Highly dangerous and you must follow this steps exactly - othervise you may loose all your data.

This will work ONLY if you havn't expanded previously your Dynamic disk.

So here is what I did:

1. On Installation CD of Windows Server 2003 there are Support Tools. You have to install them manualy directly from CD. After installation, you will wind new tool called dskprobe.exe
2. Run dskprobe.exe on your server and GUI should appear.
3. Shrink Physical Volumes Tree on right side, select your Physical Drive that you want to convert, right click and Open Handle

4. After this, again right click same drive and click on Read Sectors...
5. In new window you will see: Starting sector: 0, and Number of sectors: 1. Change Number of sectors to 10 and click on Read



6. Now on right side in editor you will sex HEX data. Now go to line number 01C0 and look for third bit. it should be 42. Go with cursor on this field and type on third byte new value of 07.

7. Go again on left side, right click drive, then click on Write Sectors.. Here in this window change value of Number of sectors to 10 and click on Write button.
8. Exit and reboot.

After reboot check in Disk Manager and you will see that your Dynamic disk now is Basic.