J
J
jidckii2014-08-19 12:25:34
linux
jidckii, 2014-08-19 12:25:34

How to replace disk in mdadm RAID 0?

Hello.
There is a home server on debian.
it has a RAID 0 of 3 disks.

:~$ cat /proc/mdstat
Personalities : [raid0] 
md0 : active raid0 sdb1[0] sdd1[2] sdc1[1]
      713052672 blocks super 1.2 512k chunks

Soon I think to replace 1 of the disks with a more capacious one.
Is it possible to somehow replace the disk without losing data, backup-restore and rebuilding the raid?
No need to advise NOT to use RAID 0, go to RAID 5 and other advice. This particular question is of interest.
Thanks in advance.)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Puma Thailand, 2014-08-19
@opium

it is forbidden

M
Melkij, 2014-08-19
@melkij

Can. But don't try without a backup.
0) stop the array
1) make a sector-by-sector copy of the partition to the new disk (dd)
2) reset the superblock on the old disk
3) assemble the array (via mdadm --assemble, not create)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question