Is it possible to safely get data off a hard drive thats a member of a mdadm-mounted RAID1 array via USB?

1

I have a RAID1 array of two drives created with mdadm. Is it possible to remove one of the drives, hook it up to a USB SATA adapter, and safely mount it, get the info off of it, and return the drive?

I have a computer that served as a fileserver for a number of years, and I've had it off for the past year. The power supply sounds pretty bad when I turn it on now, and the bootup is slow enough to make me worry. I'd rather not fry my equipment and lose my data, so does USB sound like a viable solution?

How do I safely mount a member of a RAID1, mdadm-created array on USB of another computer?

I'm using Ubuntu for the old computer, something like 09.10, and 11.04 on the working computer.

Conrad.Dean

Posted 2011-12-10T01:57:30.740

Reputation: 738

Answers

1

Yes you can pull the drive out, mount it elsewhere, and get the data off it. Then put it back, and re-sync the array. If you don't have a second computer running Linux, you can use something like SystemRescueCd (Bootable CD), which will mount the mdadm array automatically for you (on a separate computer), and you'll only need to mount the filesystem on it and copy your data.

Warning

This is a risky operation. I wouldn't do it myself.

  1. If something goes wrong (e.g. the disk in the degradated array fails while you're copying your data), your server will go down till you put the second drive back, and remove the failed one.

  2. Re-synching a big array is time consuming and puts a considerable pressure on I/O system. If your system is flaky to begin with, I don't think it's a good idea. Removing disks, putting them in another system, etc.: it all adds stress to your disks and is generally not a good idea unless you really cannot avoid it.

So, in my opinion, a better solution is to copy the data over NFS or some other network protocol, while both disks remain in the original system's RAID. If your network is reasonably fast, it shouldn't be much slower than copying over USB.

haimg

Posted 2011-12-10T01:57:30.740

Reputation: 19 503

The server is already down, so the other drive won't be live while I'm pulling data off through USB. – Conrad.Dean – 2011-12-10T16:06:52.757

1

Personally, I think removing the drive from the old server and mounting it elsewhere would be fine - just mount it as read-only (ro flag); if it's read-only then you can't write to it which means there is no re-syncing required when plugging the device back in to the original server (because there's nothing to re-sync.)

Another option, as suggested, would be to use a network based transfer to move the files over. How much data are we talking here? Rsync with compression enabled can be pretty fast, especially over a 100Mbit LAN or even better, a 1Gbit LAN.

Can you give us some more information on what the server does; what the other server has in terms of connectivity; and whether or not a network based transfer is even possible (so that we know to stop suggesting it)?

Michael Crilly

Posted 2011-12-10T01:57:30.740

Reputation: 106

My concern with turning it on again is that the power supply makes this weird sound. Going only off of third-person anecdotes-- this is a bad thing. Also going off third-person anecdotes-- a bad power supply can fry other components in a computer. The network-based transfer would be great, and it's what I've been using to get data on and off of the computer for years, but under these specific circumstances I'd rather not risk destorying the hard drives just because I was too lazy to put a drive in a SATA adapter. – Conrad.Dean – 2011-12-11T17:37:45.593