Bowie Bailey
2023-Mar-08 20:45 UTC
[CentOS] Mount removed raid disk back on same machine as original raid
I have a Centos 7 system with an mdraid array (raid 1).? I removed a drive from it a couple of months ago and replaced it with a new drive.? Now I want to recover some information from that old drive. I know how to mount the drive, and have done so on another system to confirm that the information I want is there. My question is this: What is going to happen when I try to mount a drive that the system thinks is part of an existing array? To put it another way:? I had two drives in md127.? I removed one (call it drive1), and replaced it with a new drive.? Some files were accidentally deleted from md127, so now I want to connect drive1 back to the same machine and mount it as a separate array from md127 so I can copy the files from drive1 back to md127.? What do I need to do to make that happen? Thanks, Bowie
Chris Adams
2023-Mar-08 21:08 UTC
[CentOS] Mount removed raid disk back on same machine as original raid
Once upon a time, Bowie Bailey <Bowie_Bailey at BUC.com> said:> What is going to happen when I try to mount a drive that the system > thinks is part of an existing array?I don't _think_ anything special will happen - md RAID doesn't go actively looking for drives like that AFAIK. And RAID 1 means you should be able to ignore RAID and just access the contents directly. However, the contents could still be a problem. If LVM was in use on it, that will be a problem, because LVM does auto-probe and will react when it sees the same UUID (IIRC LVM will only block access to the newly seen drive). I don't think any filesystems care (I know I've mounted snapshots of ext4 and IIRC xfs on the same system, haven't touched btrfs). -- Chris Adams <linux at cmadams.net>