0

I'm doing research for a project I'm starting, so I cannot provide configuration here. Say I have a software RAID 1 array configured between two drives with mdadm.

If I write data to the array and then move one of the drives to another machine, will the second machine be able to read and/or write data to the drive without reformatting it? i.e. copy the files back over

I saw this post, which seems to ask the same question. However, the answer seems too abstracted to me; I cannot follow it:

It is also possible to read the contents from the MD partiotion by directly mounting it and specifying, if necessary, the filesystem type (or activating lvm). Normally the metadata is at the end of the disk, so it just works.

Can someone please explain more explicitly how to do this and what complications could arise when mounting one of the drives?

0

1 Answer 1

1

If I write data to the array and then move one of the drives to another machine, will the second machine be able to read and/or write data to the drive without reformatting it?

If only one of the drives is moved to another host, the array will become available in a degraded mode. By default, you will be able to read data from the array, but writes will be disabled.

It is possible to enable writes to a degraded array; however, this will mean that the array will be out of sync when the disk is returned to its original location. The resync which follows will overwrite one disk's contents with the contents of the other, which is likely to cause data loss. (Don't do this.)

4
  • Okay, so on the topic of mounting the disk for read only, would a simple mount command do the trick or would I have to use mdadm somehow?
    – ifconfig
    Commented Jul 22, 2019 at 19:26
  • I think the array would show up normally. If not, you might have to use mdadm --assemble --run to make it come online.
    – user89623
    Commented Jul 22, 2019 at 19:28
  • So the RAID 1 member drive should appear as a mountable volume by default?
    – ifconfig
    Commented Jul 22, 2019 at 19:30
  • No, I mean that the array itself (/dev/mdX) will appear and be mountable.
    – user89623
    Commented Jul 22, 2019 at 19:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .