Tag: 2008
UPDATE: Microsoft Windows Server 2008 – Disk is Read-Only / Write Protected
by Steve O Hernandez on Jul.05, 2011, under Technology
This is an updated post to the previous post regarding the READ ONLY / WRITE PROTECTED VOLUMES IN SERVER 2008.
So the work-around presented in the previous post will get you by, but it’s not a solution. I set up a script to run the diskpart script every hour, and still, I found that it was almost happening randomly. I noticed that it only happened on my Disk 2 which was on the built-in SATA controller using the JMircron chipset. Interesting. After I installed the new RAID array (here) I noticed that now my system drive was now listed as Drive 2, and that in fact it was being listed as read-only and my script no longer worked. What a pain in the butt. It was especially annoying since SQL Server and IIS would start failing since they couldn’t write to the system drive. What a mess.
At this point you have to step back and consider the situation. I just upgraded some hardware and the situation changed, but after numerous software changes the issue remained. So what’s hardware related but lives in software such that it can tell the OS that a disk is read only? The answer is, a driver.
Then began my quest in searching for a driver issues with the JMicron chipset. Low and behold, it’s a known issue. Once I installed an updated the driver, the issue that would bring my server to a halt VANISHED.
Link to JMb36X Windows Driver.
Make sure you research your set-up first before installing a random driver. You’ll only make a bad situation worse.
Western Digital Green 2TB Drives (WD20EARS) in RAID 0
by Steve O Hernandez on Jun.03, 2011, under Technology
I purchased 2 WDC WD20EARS-00M drives and raided them in a RAID 0 configuration (124 KB Stripe) for performance of non-crucial operations. Meaning, anything I have on there I can live with losing OR have backed up at least twice elsewhere. This includes virtual machines, movies and music. Anyway, I wanted to post these benchmarks using HD Tach as there have been a ton of reports that these drives are no good in RAID configurations. They’re probably true, especially since these drives have variable spin rates, which fluctuate independent of each other and can pose problems.
When I first set them up I noticed HUGE fluctuations and large differences in transfer speeds. From 200+ MB/s to ~80 MB/s. I could not duplicate them (not yet at least) but the HD Tach results are promising. Let’s see how this works out. I will update if I have any problems.
The first 3 images are the RAID configuration, with the last being a single drive.
NOTE: I was unable to utilize HD Tune Pro 3.5 to test the raid configuration as it only showed the drives at 2199 GB and reported read speeds of 12460.9 MB/s. There’s obviously something wrong there, probably caching on the RAID controller and within Windows Server 2008, and the fact it’s over 2TB.
UPDATE: I upgraded to HD Tune Pro 3.6 and it is able to benchmark the configuration. It shows that performance ranges from 250 MB/s to 80 MB/s at the end of the drives. Which is great, it’s roughly twice the performance of a single drive, which is what we expected. I also posted the Random Access benchmarks for the single and raided drives. You can tell which is which by the drop down list in the top left hand corner of HD Tune Pro.
The low IOPS on the RAID configuration shows that these drives are not intended for high I/O environments, such as a web server or SQL Server. They do, however, work just fine for low – medium I/O file servers as the good sequential read speeds are perfect for that kind of work.
Truncate MSSQL 2008 Database Log File
by Steve O Hernandez on Oct.27, 2010, under Technology
Use this simple script to truncate the log file of your database. Where yourDB is the database name. By default in MSSQL 2008 the log file name is the same as the database file name, with _log appended at the end. If your database deviates from this (possible if the server was upgraded from 2005 or the file name intentionally changed), use the next snippet of code to find the name of the log file.
TRUNCATE DATABASE LOG FILE
USE [master]
GO
ALTER DATABASE [yourDB] SET RECOVERY SIMPLE WITH NO_WAIT
USE [yourDB]
DBCC SHRINKFILE(yourDB_log, 1)
ALTER DATABASE [yourDB] SET RECOVERY FULL WITH NO_WAIT
GO
FIND LOG FILE NAME
sp_helpdb yourDB
[SOLVED] Microsoft SQL Server 2008 x64 Error: 15401
by Steve O Hernandez on Nov.17, 2009, under Technology
I recently came across this error within an Server 2008 Active Directory Environment where I attempted to add a domain user account to Microsoft SQL Server 2008 x64.
As you may see on the internet, the problem is in fact related to SID, but in my situation it was not the SSID of the user, but of the actual server. The instance of Server 2008 x64 is running in VMWare Workstation 7 and was created by cloning another VM. This, of course, makes them identical, such that changing the computer name only results in what ‘appears’ to be disparite systems. In a workgroup this shouldn’t be an issue, but once Active Directory is introduced, it gets wacky. AD relies on SID’s, and thus, acts unpredictably when 2 machines / users / groups have the same SID. This is further exagerated when SQL Server is involved, since it creates and / or stores its own SID for the user.
Here are the steps I followed to solve this issue:
- Remove the server running SQL Server from the domain. Reboot.
- Verify the AD Computer Account has been deleted for the system (on a domain controller).
- Run newSID.exe (found here) and change the SID of the server running SQL Server to a new random SID. Reboot.
- Add server back to the domain and verify the account is created within AD.
Once I did all that, the user added with ease.
Good luck.
Intel Matrix RAID 5 – Rebuild on Reboot
by Steve O Hernandez on May.14, 2009, under Technology
So I finally figured out what was causing my RAID 5 on my Windows Server 2008 box to always rebuild on reboot. For a little background, since I am currently not offering any services to any clients that require the server to remain powered up 24 hours a day, I shut her down for about 6 to 8 hours in the evening (while I sleep, she sleeps). Every morning I start her back up, and she would rebuild the Array. BUT WHY!? It was a graceful shutdown. The logs showed nothing out of the ordinary. So I started to poke around to see what was going on.
To my amazement, the Windows Search indexer was the problem. This cranky service would not shutdown gracefully, and would actually be in the middle of a write to disk right before the system killed it. So I tried to remove the RAID from indexing… but that didn’t help. After looking I found that I had actually set the indexer to save the index on the array, which would have given the array an excuse to rebuild: indexer closed improperly and did not close the index files correctly.
My solution was to remove the array from the indexer’s allowed paths (do not index the array – I’ll wait the extra 10 seconds to find anything that I’m looking for) and I moved the index files to the system drive (yes it may cause minor performance degredation and maybe wear on the system drive, but not nearly as much as a 6 hour RAID rebuild EVERY DAY!).
I have been rebooting for the past 4 days with no issues.
Microsoft Windows Server 2008 – Disk is Read-Only / Write Protected
by Steve O Hernandez on May.13, 2009, under Technology
I recently installed a new hard drive into my server running Server 2008. Everything worked fine, until I rebooted. I tried to copy a file to the disk and recieved an error that the drive, in my case E:, was write protected. I don’t know how or why that happened, but the solution is fairly simple. The steps are as follows:
- Open a command prompt (ie. Start > Run > cmd) with administrative privledges
- Type in the command: diskpart
- Run the command: list disk
- Look for the disk number that’s having the problem. In my case I have a system drive, a RAID 5 configuration (1 logical drive) and then the new drive, so it was DISK 2. I will continue to use it in the example but note that yours may differ.
- Select the disk using the following command: sel disk 2
- Enter the following command: ATTRIBUTES DISK CLEAR READONLY
- Exit diskpart with the command: exit
Then test by copying a file or folder to the drive. It should be fairly instantaneous, but worst case you may have to reboot (I did not, however).
That’s about it. It would be interesting to know WHY this happened, but then again, does it really matter?
Good luck.
How to Fix Windows Server 2008 Boot Loader
by Steve O Hernandez on Mar.29, 2009, under Technology
If the boot loader to your Windows Server 2008 machine gets corrupted or deleted for whatever reason, it really is a painstaking process to get it fixed. The boot loader to my machine got deleted somehow while I was resizing partitions. After scouring the web, I could not find anything on rebuilding the boot loader for Windows Server 2008. All I could find were instructions to restore a Windows Vista boot loader, but luckily, the process for Server 2008 is similar.
If you are getting a “bootmgr is missing” error upon startup or something similar, repairing the boot loader will probably fix the problem.
Due to the lack of recovery tools on the Server 2008 installation CD, the boot loader must be rebuilt manually.
For this guide, I’m going to assume your installation has a drive letter of C:.
Insert the Server 2008 installation CD into your DVD-ROM. Restart your computer and boot from the CD.
Choose to repair your computer, then open the command prompt.
At the command prompt, use the following commands:
c:
cd boot
bootsect /nt60 c: /force /mbr
bootrec /rebuildbcd
After using the “bootrec /rebuldbcd” command, you will be prompted to accept a Windows installation. Accept the installation, then wait for the process to finish. Once it’s done, reboot your comptuer and you should have a boot loader ready to go.
NAS / Software and Hardware RAID Performance Benchmarking
by Steve O Hernandez on Feb.15, 2009, under Technology
I recently came across an application provided by Intel for the purpose of benchmarking NAS devices (Define: Network Attached Storage). I’ve been looking for a solution to benchmark the new RAID-5 array I created on my Windows Server 2008 server (I love the RAID’s redundancy, but the write speeds are quite low). I wanted to get a better idea of its performance, as Windows will report 250 – 150 MB READS and 20 – 50 MB WRITES, which is considerably poor considering the 4 drives are individually benchmarked at ~100 MB READS and 60 MB WRITES (They are Western Digital Caviar Blues / RE3 / RE16).
The software can be found here or from Intel here.
System Specifications:
Operating System: Microsoft Windows 2008 Enterprise Edition, SP1
CPU Type: Pentium 4 630, 3000 MHz w/ Hyperthreading
Motherboard Name: Dell Dimension 8400
Motherboard Chipset: Intel Alderwood i925XE
Motherboard Frontside Bus Speed: 800 MHz
System Memory (RAM): 4 GB, Dual Channel
System Memory Speed / Timings: DDR2-533 (266 MHz) / 4-4-4-12
Hard Drive Controller Interface: SATA I (1.5 Gbits / s) = 150 MB/s (maximum)
Hard Drives: Western Digital
- Drive #1 – WDC WD5002ABYS-01B1B (465 GB)
- Drive #2 – WDC WD5002ABYS-01B1B (465 GB)
- Drive #3 – WDC WD5000AAKS-00A7B (465 GB)
- Drive #4 – WDC WD5000AAKS-00A7B (465 GB)
- Drive #5 – WDC WD800BB-00JHC0 (74 GB) – SYSTEM
Raid Configuration: Software 4 disk RAID-5 (4 x 500GB, 1.36 TB Effective Storage Space)
System Memory Benchmark: Copy – 4790 MB/s, Read – 6266 MB/s, Write – 3341 MB/s, Latency – 92.7 ns
System Processor Benchmark: CPU ZLib – 10592 KB/s, CPU AES – 3055
Benchmarks completed using Everest Ultimate Edition v4.20.1257
All drives are SATA II (3.0 GB/s) but are running in backwards-capability mode.
The primary roles of the server is to serve files and store backups (File Server) and web and application development and website hosting (Web Server). I do not stream media, play music from the server or write extremely large amounts of data that are time sensitive. Therefore, my decision for RAID-5 was based on the space savings (n – 1) storage availability and the redundancy by means of the parity. I am willing to give up performance (write and read) for storage space and redundancy, but I want to know how much I’m actually giving up.
Tests
- HD Video Playback, 2x HD Video Playback, 3x HD Video Playback, 4x HD Video Playback
These benchmarks examine the behavior of the NAS unit while (simultaneously) playing one or more HD video files at 720p using Windows Media Player. Intel gives a percentage rate for the sequential reading of data in these tests, which lies at 99.5% for the HD Video Playback Test. With 2x HD Video Playback, it lies at 18.1%. The result is 6.6% with 3x HD Video Playback and 9.6 % with 4x HD Video Playback.
- HD Video Record
This test writes an HD Video file in 720p format to the NAS unit. This test is made of up of mostly sequentially transferred data.
- HD Video Playback & Recording
HD Video Play & Record examines the behavior of the NAS unit when simultaneously reading and writing an HD Video file in the 720p format. The sequentially-transferred data in this test is approximately 18% of the test.
- HD 2x Playback 2x Record
This benchmark is similar to the one above, but the proportion of sequential file operations is 3%.
- HD Playback With Office
This metric measures the data transfer rates when an HD Video file is read from the NAS unit while working with the Office applications. This test is made up of 608 files. The proportion of sequential file operations is 53.2%.
- HD Playback With Backup
Like the previous test, but this time an HD Video file is played while simultaneously carrying out a backup on the NAS unit.
- Content Creation
This benchmark is made up of 95% write operations to the NAS unit. This simulates the creation of files on the NAS unit such as is the case when, for example, using video editing programs.
- File Copy To NAS / File Copy From NAS
These tests determine the data transfer rate when copying files to or from the NAS unit. In both of these test processes, a 4 GB file is copied. Unlike with Backup / Restore, 64 KB is read and written.
- Directory Copy From NAS / Directory Copy To NAS
Similar to the previous test, files are copied to and from the NAS unit. A total of 126 files with a total size of approximately 188 MB are written and read across the network.
- Photo Album
This test determines how the NAS unit handles the supply of a multitude of small files—for example, viewing digital photographs stored on the NAS unit. It simulates the viewing of a total of 169 photographs with an overall size of approximately 1.2 GB.
Considerations and Assumptions
These tests were conducted on the Server, not over the network, which will probably result in very high throughput. I did this to get a feel for the actual performance, not that felt over the wire, and because I’m currently running 100 Mbps (Cat 5e) on my LAN, not gigabit. Thus, I did not want the network to be the bottleneck in these tests, as it would be saturated and skew the results.
I ran the tests 6 times, in each, manipulating the environment to establish a real world benchmark. Since this benchmark is done via an application, it will compete with other processes for resources. Additionally, it will compete with the actual Operating System who is responsible for transfering the data to the disk and calculating the parity for the raid (which is quite memory and CPU intensive). For test 6 I ran the system in Safe Mode, utilizing only necessary processes and services to run the operating system (Safe Mode without Networking). Thus, the numbers are quite high. In the others, I ran Outlook, SQL, browsed the internet and downloading files via torrents (to the actual RAID, so this will mess with the numbers as well) – not all at the same time, of course, except for test 4.
Results
| Test | 1 | 2 | 3 | 4 | 5 | 6 | Avg MB/s |
| HDVideo_1Play | 267.789 | 267.789 | 80.364 | 54.54 | 59.134 | 274.603 | 167.37 |
| HDVideo_2Play | 223.736 | 223.736 | 68.638 | 44.619 | 75.123 | 223.204 | 143.18 |
| HDVideo_4Play | 177.201 | 177.201 | 70.222 | 54.731 | 73.009 | 180.005 | 122.06 |
| HDVideo_1Record | 626.098 | 626.098 | 651.41 | 618.888 | 678.788 | 732.636 | 655.65 |
| HDVideo_1Play_1Record | 82.744 | 82.744 | 85.224 | 71.802 | 79.058 | 155.986 | 92.93 |
| ContentCreation | 6.199 | 6.199 | 5.983 | 5.628 | 6.141 | 6.022 | 6.03 |
| OfficeProductivity | 25.383 | 25.383 | 25.474 | 20.958 | 26.249 | 27.955 | 25.23 |
| FileCopyToNAS | 633.475 | 633.475 | 748.91 | 690.827 | 768.598 | 806.578 | 713.64 |
| FileCopyFromNAS | 147.096 | 147.096 | 79.675 | 57.42 | 80.561 | 151.573 | 110.57 |
| DirectoryCopyToNAS | 65.156 | 65.156 | 25.13 | 18.384 | 23.418 | 81.739 | 46.50 |
| DirectoryCopyFromNAS | 44.048 | 44.048 | 20.412 | 15.53 | 20.929 | 47.274 | 32.04 |
| PhotoAlbum | 27.748 | 27.748 | 26.411 | 19.508 | 28.171 | 29.204 | 26.47 |

Discussion
I attribute the absurd file copy speeds to caching and buffering at both the OS, RAID and the Drive level, as well as the writes for the video recording. All in all, I’m pleased with the benchmarks and am satisfied with the set up. One thing to note is that the tests were done from the SYSTEM drive to the RAID, and thus, the SYSTEM drive introduced an additional bottleneck as the transfers from it to the RAID were going to be quite slow (the drive is benchmarked at ~56MB READ and ~30 WRITE).
ASP.NET Charting Control! :)
by Steve O Hernandez on Dec.03, 2008, under Technology
Microsoft recently released a cool new ASP.NET server control – <asp:chart /> – that can be used for free with ASP.NET 3.5 to enable rich browser-based charting scenarios.
It’s official (nearly): Iraq’s government wants America’s army out by the end of 2011
by Steve O Hernandez on Nov.21, 2008, under Personal
Iraq boots out the Americans
Nov 20th 2008 | BAGHDAD
From The Economist print edition

WHEN General David Petraeus, now America’s most celebrated military commander, arrived in Iraq in 2003 at the head of an airborne division, he asked a journalist: “Tell me how this ends?” For years nobody had a good answer. But now, thanks to a military pact between America and Iraq, a conclusion is in sight: America’s war in Iraq will end in three years’ time, with American troops being shown the door and Iraqi politicians competing to claim credit for getting rid of the foreigners.
A “withdrawal agreement” approved by the Iraqi cabinet on November 16th requires American troops to pull out of Iraqi towns and cities by the end of June next year, and to leave Iraq altogether by December 31st 2011. Those deadlines, said Iraq’s prime minister, Nuri al-Maliki, in a televised address, would not be extended. The deal was not perfect, but marked “a solid start for Iraq to regain its full sovereignty in three years.”
There were no secret articles, he said, and there would be no permanent American bases. Iraq could not be used to attack others (ie, Syria or Iran). There would be, he promised, “no detainees any more, no detention centres any more, no searches or raids of buildings or houses, until there is an Iraqi judicial warrant and it is fully co-ordinated with the Iraqi government.”
This is a big moment for America and Iraq, yet the Iraqi government was more regretful than jubilant, calling the deal the best it could achieve after more than a year of negotiations. The Bush administration, now in its last weeks in power, made several concessions. It had long opposed any notion of a fixed timetable for withdrawal, saying any troop pull-out had to be based on security conditions on the ground. The White House said the new deadlines were “aspirational”, but the text leaves less wiggle-room; clauses allowing for a review of the deadline, and the possibility that some American troops would stay on to train and support Iraqi forces, have been deleted. Security has improved markedly. But the political context has also shifted against the Bush administration—and the Iraqis have got their timetable.
In America, Ike Skelton, chairman of the House armed services committee, a Democrat, said he was worried by provisions that could result in American troops facing prosecution in Iraqi courts. But the text suggests that this is a remote possibility. Iraq has legal jurisdiction over American troops only in cases of “major and intentional crimes”, and even then only when they are outside their bases and off-duty.
The agreement should make life easier for Barack Obama, although there is some dispute as to whether it will have to be ratified by the American Congress. The deal supports the president-elect’s principle of a firm timetable for leaving Iraq, but allows him to draw out the process beyond the 16-month withdrawal he promised in his campaign. Admiral Mike Mullen, chairman of the joint chiefs of staff, said America had so much equipment that it would take two or three years to withdraw completely—security conditions permitting.
The agreement was strongly endorsed by the Iraqi cabinet but its passage through the Iraqi parliament, which could vote on it as early as November 24th, is less assured. There were brawls among the lawmakers when it was discussed on November 19th.
In a country with a history of intense opposition to military pacts with an invading power, the deal could polarise opinion. Followers of Muqtada al-Sadr, the radical Shia cleric who heads a powerful (though now dormant) private army, oppose the treaty and demand an immediate withdrawal of foreign troops. Ayatollah Ali al-Sistani, Iraq’s most senior Shia cleric, says any agreement had to restore Iraqi sovereignty and win “national consensus”. But he did not oppose it, which supporters take as tacit assent.
Some Sunnis want the agreement to be put to a referendum. Another contentious issue is the status of some 17,000 (mostly Sunni) prisoners in American hands. The Iraqi government is due to take responsibility for them, but some Sunni leaders want them all released.
Iran is equivocal. The speaker of its parliament, Ali Larijani, said America was seeking to turn Iraq into a vassal. But the leader of Iran’s judiciary, Ayatollah Mahmud Hashemi Shahrudi, said the Iraqi government “has done very well”. Some interpret this as Iranian endorsement. But like so much else in Iran, it is hard to pick out a genuine signal from the political noise.







