Score:-1

How to create RAID5 with existing data? EFDITED

ng flag

Here is the original post There is very ancient post on this forum about adding / creating new RAID5 using EXISTING data on non RAID5 partition. I ASSUME the discussion was pertaining to HARDWARE RAID5. Can I add / create / build RAID5 partitions using SOFTWARE RAID5 using exiting data on one partition? I am familiar with Linux "mdadm".

Edit Dec 7 And here is the repeat of the title and my question. Would it be possible for somebody to actually answer the question?

I have a partition containing data and I DO NOT WANT TO LOOSE SUCH DATA. How do I create RAID using the existing partition ?

Prefer RAID5 , but can do ( verified in mdadm) RAID6.

Here is a actual command I used to get a partial copy of ONE partition of the original RAID5 I am trying to restore.

( I'll make another dd copy into BIGGER partition, no problem )

nov25-1@nov251-desktop:~$ sudo dd if=/dev/sdb4 of=/dev/sdf11 dd: writing to '/dev/sdf11': No space left on device 301840385+0 records in 301840384+0 records out 154542276608 bytes (155 GB, 144 GiB) copied, 19143.6 s, 8.1 MB/s nov25-1@nov251-desktop:~$

What is my NEXT step - using mdadm?

I do not need "how to RAID" references , I am asking for ACTUAL, NEXT step to proceed.

br flag
Please don't - RAID 5 is dangerously out of date - it has been for the best part of fifteen years - many sysadmins/designers consider it irresponsible of disk controller manufacturers to still offer it, it's that dangerous. We get people coming here all the time asking for help recovering their data from R5 arrays. Please only use R6/60 or R1/10.
ng flag
How does that answer my question ? This has been my most recent access to this and my post title "did not meet quality standards"... Are replies, such as yours, also monitored for "quality standards "? IMHO reply should contribute to solution, yours, IMHO, does not. Cheers.
br flag
Did you notice it's not an answer, it's a comment :) Either way don't use R5
Score:1
in flag

First would like to repead the warning from Chopper3, reconsider creation of RAID5.

And the procedure. From here you can see how to create RAID1 from single disk.

  1. Partition the second disk (w/o data)
  2. Create the RAID device
  3. Make file system
  4. Copy the data on the array
  5. Boot on the new disk (if this is boot disk)
  6. Add original disk to array
  7. Partition original disk
  8. Add disk partition to array
  9. Alter fstab

Then you can use this answer to convert RAID1 to RAID5

ng flag
I am specifically asking on how to use Linux mdadm to recover failed RAID. I do not need instruction on how to build RAID.
Romeo Ninov avatar
in flag
@JanHus, check the headline of this question. Maybe you mistake it with other question you ask: https://serverfault.com/questions/1117315/recovering-raid5-using-linux-mdadm
Score:0
cn flag

RAID-5 is depreciated, please consider another RAID level. (Use Chopper3 advise for the raid level)

To answer your question as it can apply to any other RAID level, you can't easilly.

Most used way to do what you want is to clone the HDD with a third part tool, like a bootable media, create the array and then restore on the RAID array the data.

My solution seem bad, but keep in mind that it can be a good way to test if your media can see your raid hardware, thus testing your backup tool/plan.

ng flag
After scanning the article - it looks as mdadm ( Linux "stadard" ) sh;ud be used to buil;d RAID0 . AFTER the RAID0 (partition) is build use Now copy the data from /dev/sda1 to /mnt/new-raid/, for example using rsync. That is what I have been asking.... PLEASE confirm. All of the "other stuff" is pretty much standard mdadm process - been there , done that.
ng flag
QUESTION - why creating intermediate RAID0 and NOT build blank RAID5 and THEN use "rsync" ?? PS I am not sure "mdadm" can build MORE then RAID5.
Romeo Ninov avatar
in flag
@JanHus, By definition you need 3 disks minimum for RAID5. Do you have 3 free/not in use?
yagmoth555 avatar
cn flag
@JanHus Dont edit to tell it's not an answer, it's one. Comment here, no need to edit. You clone your disk and apply back that clone image to your RAID array, how it's not an answer ? You focus on using mdadm, while you risk to loose all your data if you do an error, my solution is a full backup of your data, and after you create any array you want to apply the data there...
I sit in a Tesla and translated this thread with Ai:

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.