Re: migrate single disk to RAID 1?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ben Beuchler wrote:
umount /dev/sdb4
mdadm --build /dev/md0 --level=1 -n2 /dev/sdb4 missing
mount /dev/md0 /mail
mdadm --add /dev/md0 /dev/sda4

Will that work?  Or am I misunderstanding something fundamental?

It'll work but you'll be using a legacy array without superblocks, so you
can't have various features that come with superblocks

Right; for this particular application I'm willing to give up
superblocks.  Just to be 100% sure, thought:  the way I've described
the process would be non-destructive of the data on sdb4?

Thanks!

Actually, if on that sdb4 is a shrinkable filesystem, you can create md raid with superblock at the end. So the process would be something like:

- resize2fs filesystem on sdb4 a bit (shrink)
- mdadm stuff with e.g. 1.0 superblock
- resize2fs filesystem again, this time on md0

According to md(4) you shouldn't need to shrink more than 128KB, but be sure to get a healthy margin. Or do simple test with some tiny partition, or md-on-lvm.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux