> -----Original Message----- > From: linux-raid-owner@xxxxxxxxxxxxxxx [mailto:linux-raid- > owner@xxxxxxxxxxxxxxx] On Behalf Of Ben Nemec > Sent: Monday, August 02, 2010 5:18 PM > To: linux-raid@xxxxxxxxxxxxxxx > Subject: Replacing a drive in RAID 0 > > > Hi, > > I have a disk in a RAID 0 array that SMART tells me is dying, but hasn't > died yet. I have a warranty replacement on the way, and I'm wondering if > there's any way to copy the data off the dying drive to the new drive and > swap the RAID array to use the new one (assuming the old one lasts long > enough to do that, of course). Can I just dd the entire drive over and > replace the bad drive? Can the md tools do it somehow? Maybe it's > impossible? Obviously nothing on this array is irreplaceable, but it > would > save me some hassle reinstalling things if I could save it. Well, yes, although one cannot guarantee there won't be any data loss. Of course you will need to take the array offline, and indeed I recommend you take it down now - or at least remount it as read-only, and don't do any writes to it until after you have the new drive in place. Install the new drive, and then use ddrescue to copy the contents of the old drive to the new. Read the man page for ddrescue carefully, and take care not to accidentally copy the new drive to the old. -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html