Posts Tagged ‘RAID’

I Finally Have An Upgraded Disk

6 February 2011

My trusty desktop has an 80GB disk that I upgraded a couple years ago from a 20GB disk. Now, between a lot of downloads, photos, videos, etc. that disk was about 97% full. It is time for another upgrade. My computer has two disks in it: the 80GB XP disk, and another 80GB that has a 20GB Fedora 12 installation (soon to be Fedora 13), and the rest of the disk is shared space (formatted FAT32) for DVR functionality.

I have a 500GB drive that was recovered from a failed video recorder. I popped the drive into an external carrier and looked at it; it was formatted NTFS and had Windows 2000 Professional on it. I zorched the partition, took it from the external carrier, and installed it into my desktop as an IDE slave. It was recognized by the BIOS, looking good so far.

I started the machine up with System Rescue CD. It found the disks, but when I did an fdisk -l, it found a bunch of RAID stuff as well (RAID == Redundant Array of Inexpensive Disks, a methodology of automatic backups of data, for databases and the like). NBD, I thought, I’m about to wipe the drive anyway.

My usual process here is to clone a known good drive to the new drive, then grow that partition to fit the new, presumably larger drive.

So I started the cloning process using the trusty dd command. My old XP partition was copied over to the “new” 500GB drive after a bit. I moved the IDE connections around to make the 500GB drive the master and rebooted the computer. XP came up, Linux came up, all looked good so far.

I rebooted into System Rescue CD, and fired up Gparted (Gnu Partition Editor) to grow the XP partition to the full 500GB size. Here is where I ran into a problem. The partition grow process seemed to work OK, but when gparted did the final check, it reported that another process had locked access to the 500GB disk. WTH?

Doing some rooting around in the log files showed that Linux thought that the 500GB disk was still a RAID, and it had started RAID services on the disk. These services in turn had complained during boot up that the RAID was screwed up. I know little about RAID administration, so I was off to what I soon found was a confusing and limited set of information about RAID management.

Many things were tried, and none worked. I inquired of Hitachi, the manufacturer, about the possibility of a low-level reformat; they recommended against it. The dd cloning operation was re-performed about five times over a couple days.

Finally, I found a description of a similar problem online. The dmraid command was the answer. I did a dmraid -r, it listed the RAID information it thought it knew about. Next, I did a dmraid -rE command to zorch that “RAID”. The next dmraid -r showed no RAID information. I jumped to gparted, grew the partition, and got no errors reported.

Finally, I booted both Linux (OK), and Windows (also OK). Windows complained about the disk partition being “dirty”, did some chkdsk and other checks, and finally settled down and started working. The usage has gone from 97% to 14.5%, so I have a while to go before another upgrade is needed.

I am still a bit mystified as to how Linux detected that the 500GB disk had been part of a RAID. The disk had Windows 2000 on it. Overwriting the W2K with the XP partition should have gone a long ways to de-RAIDing the disk. I can only surmise that there was RAID information on the disk past the 80GB point, and Linux picked up on it during the boot process. Hitachi said that there was no RAID markers in the Master Boot Record (MBR). Gparted did not show that there were any RAID flags set either. Maybe I can go figure that out later, in my “spare” time.