Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I had a drive go bad in RAID5. I failed the drive, removed the drive, and replaced it with a new drive. The drives that are currently in the machine are 1TB seagates. I am replacing it with a 1TB Western Digital.
I attmpted to add the new drive with the same paritioning info as the old drives:
sfdisk -d /dev/sdd | sfdisk /dev/sdc
Then added the device back to RAID5. That went fine, but as the RAID was rebuilding, I started getting errors:
Buffer I/O error on device sdc, logical block 0
Buffer I/O error on device sdc, logical block 1
Buffer I/O error on device sdc, logical block 2
Buffer I/O error on device sdc, logical block 3
RAID failed the drive and stopped the rebuild.
I removed the drive from RAID with mdadm and did an fdisk. I get Unable to read /dev/sdc
I find it hard to believe that a 2nd drive, from a diff manufacturer is bad. Have I done something wrong here or do I just have a bad drive?
Feb 26 12:04:55 vv-atl1 smartd: Device: /dev/sdc, failed to read SMART Attribute Data
Feb 26 12:34:55 vv-atl1 smartd: Device: /dev/sdc, not capable of SMART self-check
2) If you failed in the attempt to read and transfer the partitioning scheme using the command sfdisk and the command was without effect, would not fdisk give you the result "unable to read.." since no partitions have been created? You might try to create the needed partitions by hand with cfdisk or fdisk and see if the disk will accept partitioning.
I would have written Nr.2 as Nr.1 had I been thinking quicker. Good luck
Last edited by thorkelljarl; 02-26-2009 at 02:33 PM.
The sfdisk man pages tells us that it is very dangerous to repartition a device with sfdisk and also that sfdisk doesn’t understand the GUID Partition Table (GPT) and it is not designed for large partitions. I would consider a 1 TB disk as quite large single partition and I guess that your problem could just as well be caused by all these sfdisk peculiarities.
Maybe format and partition your new disk the traditional way (/bin/fdisk), maybe even add the filesystem yourself - and afterwards try again to fit it into your RAID setup.
The drive passes WD's diagnostics. I re-partitioned it in XP with NTFS and put it back into the Linux machine. Then fdisk could read it. I removed the NTFS partition and added a linux partition. I added the drive back to the array. I'll cross my fingers. It may be that this thing really wanted to be partitioned by WD's software first. That would be bizarre.
I think that it was blank, that is all zeros from WD, and sfdisk didn't do anything with it, leaving it still blank, that is no flag, no label, no partitions, nothing. You came out of it well enough in the end, whatever was the problem. I trust you can recreate your partitions without too much trouble. Then again, doesn't a system administrator always get through in the end?
Last edited by thorkelljarl; 02-27-2009 at 07:55 PM.
Did you try switching the SATA cable to the drive just in case that is bad? Cables can produce funny faults, but at least they're cheap.
I assume that you have done all the fault finding hardware swaps, but I can't understand how the first problem, formatting a new disk, is related to a faulty controller. There have been other symptoms, I presume. I'm just curious; I might learn something.
Last edited by thorkelljarl; 02-27-2009 at 07:56 PM.
Yes, I replaced the SATA cable with a new one that came with the new HD.
A full explanation may clear up some questions:
I recently (less than 2 weeks ago) built a new Samba/LDAP server and put it in RAID5 with 4 brand new 1TB Seagate HD's. I noticed shortly after that one of the drives in the array had failed. It was in RAID5 so no data was lost, but I wanted to get the array to a healthy state. I didn't have time to return the drive, but I did have a new Western Digital 1TB drive still in its box, so I plugged that in and copied the partition. The array worked fine rebuilding until it got to about 5-7% and then the drive failed. It appeared at first that the partition didn't take. I looked at it and it had changed size. I found it hard to believe that 2 brand new drives of different brands each with a different SATA cable would be bad within days, so I tested each of them with their respective diagnostic tools. Both drives passed. All I can conclude at this point is that I have a bad SATA port on the MB. Hopefully I can return it.
Last edited by deathsfriend99; 02-28-2009 at 12:10 PM.
Reason: I can't spell