Monday, January 3, 2011

Old School Skills FTW!

So, I'm assuming you know that FTW means For the Win!. With that out of the way, I'm very pumped up right now that I was able to pull out my old school Linux skills to solve a very serious problem one of my best friends was having.

My friend has a small business with three people that doing quite alot of work but their data needs aren't huge. They are real and involve print assets but we aren't talking more than 2 terabytes. At his request for a solution, I talked him into a Buffalo Linkstation Pro that holds about 4TB in raid 5 so his data would be protected.

After 15 months of solid use with no issues, they arrived to work one morning and it wouldn't work. We unplugged and re-plugged it back in but the device was stuck in a pattern of running disk checks and not allowing access to the data. We called buffalo and they said it can take up to 8 hours per TB of raw disk. We waited two days and the device now showed up as offline.

We did what any normal person with business data would do and found a duplicate model brand new and tried to swap the disks into it. The only problem was that the problem followed the disks as the new unit had the same behavior and the old unit with new drives was fine. We were hopeful as the errors shown were things like fan failure, unable to mount, etc.

After trying various things over a few days, I threw in the towel. We went back to Fry's and purchases an eSata drive array and put in the troubled drives. We took a working PC, booted it with a Knoppix linux CD and within a few minutes using the commands below, it was all working.

Option 11
(Shell prompt)

fdisk -l
(validating I could see all the physical disks)

mdadm --examine /dev/sde6
(Told me that it was a member of a raid5 group and the other disks were present)

mdadm --assemble /dev/md0 /dev/sde6 /dev/sdf6 /dev/sdg6 /dev/sdh6
(This brought it bound them together as a unit)

mkdir /mnt/raid

(This made a place for us to mount the new raid for access)


mount -t xfs /dev/md0 /mnt/raid

(This command actually mounted it)


cd /mnt/raid

(Next I went into the device and saw that my data was intact)


mkdir /mnt/share

(Made a place for my windows share to copy the data to)


mount -t smbfs 192.168.0.150:share /mnt/share

(This mounted it up onto the server)


cp -r /mnt/raid /mnt/share

(this copied the data off)

There really wasn't any magic but I had to pull out all my old school skills and think it through. I was honestly a bit scared to get this involved on a drive as it contained someone elses critical business data. All in all, it is done and I feel a HUGE relief. This post is only to document in case it helps someone else. :)