Score:0

How to transition software RAID through mdadm from drives to partitions safely

cn flag

I am new to relatively new to linux and a few months ago I created a software RAID through mdadm following instructions I found online.

However, the RAID seemingly randomly drops out leaving the data inaccessible. This problem is resolved on the surface by performing a system reboot and everything works fine again for a few days.

I think I have found the problem but have no idea on how to fix it. When I run "fdisk -l" all of my drives show: "The primary GPT table is corrupt, but the backup appears OK, so that will be used.". Previous posts have suggested this may be caused by the RAID being built from drives rather than partitions on the drives. However, most of what I have found suggests wiping the drives and starting fresh (not an option for me). How do I safely create partitions on the drives and then change the RAID to be formed from those partitions within the drives without losing data?

One previous forum (https://ubuntuforums.org/printthread.php?t=2361339&pp=10&page=1) suggests "Correct, like TheFu says, after you create the partitions the array members are the partitions, not the whole disks. So you need to use sdc1 and sdd1. I think using the whole disks is messing up things...". But again, I don't currently have partitions on the drives and don't know how to create the partitions, move all my data (including mdadm superblocks) into the partition, and then rebuild the array from the moved data.

Thank you in advance everyone for any help you can provide!

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.