[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mdadm usage



Hello,

On Tue, Dec 29, 2020 at 07:58:50AM +0100, Thomas A. Anderson wrote:
> I have been "using" mdadm to run software raid1 (stripping) on a file
> server i have been running.

As others have noted, RAID-1 is not striping but mirroring. I'll
assume you have used RAID-1. Showing us the content of your
/proc/mdstat file would help.

> now that I try to access data on these two original drives on
> another system, I am unable to.

The default metadata format (v1.2) for mdadm is at the beginning of
the device. If you've put a filesystem directly on the md device
then the presence of the metadata will prevent it being recognised
as a simple filesystem. What you can do is force mdadm to import it
as a degraded RAID-1.

Back in the days before GRUB understood md RAID-1 people used to
have to specifically use metadata format v1.0 or v0.9 for the device
containing /boot, in order to get metadata placed at end of device
so that GRUB was tricked into thinking it was a simple filesystem.

If you need help importing your single RAID-1 device, get it plugged
in to a system and recognised as a block device (see
/proc/partitions for a list of block devices), then show us the
output of:

# mdadm --examine /dev/whatever

where /dev/whatever is the block device for this single RAID-1
member device.

Then we'll help you get mdadm to assemble it.

Alternatively, assuming filesystem directly on md device it is also
possible to use the loop driver to create a new device that is an
offset into the md member device and then mount that as the
filesystem, but in my opinion that is more complicated and dangerous
than just getting mdadm to assemble a degraded RAID-1.

Cheers,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting


Reply to: