Re: How to salvage a degraded mdadm RAID1 with as little data loss as possible?

<[email protected]>
Newsgroups gmane.linux.debian.user
Message-ID <[email protected]>
On Mon, Jun 22, 2026 at 07:50:10AM +0200, Michel Verdier wrote:
> On 2026-06-21, Paul Leiber wrote:
> 
> > I managed to rebuild the md RAID1 using the data on the seemingly failed
> > device (partition_1). First, I did a dd dump of partition_2 (currently in
> > usage) in order not to lose data. Then, I recreated the RAID1 using the data
> > from partition_1:
> >
> > mdadm --stop /dev/md0 # This stops the degraded RAID1
> > mdadm --assemble --update=uuid /dev/md0 /dev/mapper/partition_1 # This creates a new RAID1 using the partition_1, a new array UUID is required in order for --assembly to work
> > mdadm --manage --add /dev/md0 /dev/mapper/partition_2 # This adds partition_2 to the RAID1, contents of partition_1 are replicated to partition_2 automatically
> 
> Your commands are strange : the partitions should be the disk partitions
> from /dev and not mapped ones. Or you have another layer ? From where
> come /dev/mapper/partition_1 and /dev/mapper/partition_2 ?

If I have been following along, the RAID parts are LUKS encrypted devices,
so to me it does make sense.

Cheers
-- 
t
signature.asc (application/pgp-signature, 195 B)
-----BEGIN PGP SIGNATURE-----

iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCajjPtwAKCRAFyCz1etHa
Rh7cAJ4vPPLY7ZvDJaDd59/5xglbU7pWfQCeMVBEh+/YSvlyewXnX0FoZGvOfwg=
=ofKO
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.