Wednesday December 28, 2005 
Getting to grips with NTFS - Part II
I have got fed up with the funeral march that is talking to the KVM switch that controls the Windows 2003 Server I am doing testing on via HTTP - see last post. I have installed Microsoft's Windows Services for Unix which includes the Unix shell utilities, NFS, pthreads (more of which later), various other bits and pieces but importantly for me, a Telnet daemon. I did scratch my head at the name "Windows Services for Unix". Shouldn't that be "Unix Services for Windows"? No matter, I have my backslash and pipe symbol back - although a DOS shell via telnet is very strange place to be for a bear of little brain like me. There is ps(1) and vi(1) and Lord knows what else I haven't discovered yet. I take my hat off to these fellows. They have done a good job. One might almost consider...No. Of course not.
Another tool I installed along the way was BGInfo from Sysinternals. If you tend to weave your way among a lot of MS boxes, having some basic information on the desktop is a great help.
Anyway, as promised, that sample NTFS filesystem creation session, brought to you via the technical marvel we know as Telnet:
*=============================================================== Welcome to Microsoft Telnet Server. *=============================================================== C:\home\dominika>diskpart Microsoft DiskPart version 5.2.3790.1830 Copyright (C) 1999-2001 Microsoft Corporation. On computer: VA64-2OC DISKPART> list volume Volume ### Ltr Label Fs Type Size Status Info ---------- --- ----------- ----- ---------- ------- --------- -------- Volume 0 S FAT32 Stripe 1800 MB Healthy Volume 1 D DVD-ROM 0 B Healthy Volume 2 C NTFS Partition 24 GB Healthy System DISKPART> select volume 0 Volume 0 is the selected volume.
Microsoft Gripe O' The Day. That "Volume 0" is the one I am testing on - incrementing the underlying number of spindles and watching the performance deltas, especially between FAT32 and NTFS. The gotcha is that if I delete it and recreate it, it might not be Volume 0 anymore. It might be Volume 2. Yesterday Drive C was Volume 0 and Drive S was Volume 2 until I rebooted. Then it changed again. As the volume is the object you have to manipulate, this makes it devilishly difficult to script this stuff. The rest is pretty straightforward;
DISKPART> delete volume DiskPart successfully deleted the volume. DISKPART> list disk Disk ### Status Size Free Dyn Gpt -------- ---------- ------- ------- --- --- Disk 0 Online 75 GB 25 GB Disk 1 Online 75 GB 0 B Disk 2 Online 34 GB 34 GB * Disk 3 Online 34 GB 34 GB * Disk 4 Online 34 GB 34 GB * Disk 5 Online 34 GB 34 GB * Disk 6 Online 34 GB 34 GB * Disk 7 Online 34 GB 34 GB * DISKPART> create volume stripe disk=2,3,4,5,6,7 size=300 DiskPart successfully created the volume.
The asterisk in the Dyn column indicates that we are creating volumes spanning "dynamic disks" - an abstraction layer allowing us to spread multiple volumes over arbitrary disks. You can't have a "stripe" of one disk; that should be "simple". The size=300 indicates how much space (Mb) you want on each disk. This (as I noted in my last post) is not the stripe width, over which we have no control.
DISKPART> assign letter=s
DiskPart successfully assigned the drive letter or mount point.
DISKPART> exit
Leaving DiskPart...
C:\home\dominika>format s: /fs:fat32 /v:TestFS
The type of the file system is RAW.
The new file system is FAT32.
WARNING, ALL DATA ON NON-REMOVABLE DISK
DRIVE S: WILL BE LOST!
Proceed with Format (Y/N)? y
Verifying 1800M
Initializing the File Allocation Table (FAT)...
Format complete.
1,883,738,112 bytes total disk space.
1,883,734,016 bytes available on disk.
4,096 bytes in each allocation unit.
459,896 allocation units available on disk.
32 bits in each FAT entry.
Volume Serial Number is A07E-7B4E
C:\home\dominika> iozone -a -z -i0 -f s:\IozoneTest -b c:\t\f6.wks > c:\t\f6.out 2> c:\t\f6.err
...and we are up and away. Its worth saying that DISKPART does a lot of stuff asynchronously so its worth drawing breath between activity inside its shell and outside or else it gets in a muddle; particularly so if you are passing commands in via scripts interspersed with other command-line utilities that interact with the I/O subsystem - this can get it very confused as can multiple concurrent DISKPART sessions.
The numbers generated by this little escapade are interesting and not what you might expect. Later.
( Dec 28 2005, 12:07:57 PM GMT ) Permalink