Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Consider creating a linear mode RAID with single disk(more disks may be added later).

#echo y | mdadm --create /dev/md0 --level=linear --raid-disk=1 /dev/sda1 --force

Now consider another partition is available , is it possible to "grow" from linear mode to RAID1(mirroring) mode? I can do something like this before for raid1 to raid5 , but for linear to RAID1 I have observed this error.

// change the level
echo raid1 >  /sys/block/md0/md/level
"linear does not support online personality change"

I am aware about taking backup of existing contents of linear mode contents and then creating RAID1 with two partitions(one from span and another one newly added ) But, I am interested in doing it in place.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

You can just re-create RAID with RAID-1 specifiyng only the first (active) disk first and using keyword "missing" for the 2nd. mdadm will give a warning, that this disk is already a part of array, of course, but you know what you're doing now. :-)

Later then you can add that postponed disk and it'll get data copied from the first one, making the mirror complete.

P. S. In theory this operation isn't data destructive in a way, but as you've already said, you're aware of backuping. ;-)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.