[CentOS] Convert "bare partition" to RAID1 / mdadm?
Benjamin Smith
lists at benjamindsmith.com
Fri Jul 25 17:32:42 UTC 2014
On 07/25/2014 06:56 AM, Robert Nichols wrote:
> Unless you can figure out some way to move the start of the partition back
> to make room for the RAID superblock ahead of the existing filesystem, the
> answer is, "No." The version 1.2 superblock is located 4KB from the start
> of the device (partition) and is typically 1024 bytes long.
>
> https://raid.wiki.kernel.org/index.php/RAID_superblock_formats
Sadly, this is probably the authoritative answer I was hoping not to
get. It would seem technically quite feasible to reshuffle the partition
a bit to make this happen with a special tool (perhaps offline for a bit
- you'd only have to manage something less than a single MB of data) but
I'm guessing nobody has "felt the itch" to make such a tool.
On 07/25/2014 08:10 AM, Les Mikesell wrote:
> What happens if you mount the partition of a raid1 member directly
> instead of the md device? I've only done that read-only, but it does
> seen to work.
>
As I originally stated, I've done this successfully many times with a
command like:
mount -t ext{2,3,4} /dev/sdXY /media/temp -o rw
Recently, it seems that RHEL/CentOS is smart enough to automagically
create /dev/mdX when inserting a drive "hot" EG: USB or hot swap SATA,
so I haven't had to do this for a while. You can, however do this, which
seems to be logically equivalent:
mdadm --manage /dev/mdX --stop;
mount -t ext{2,3,4} /dev/sdXY /media/temp -o rw;
-Ben
More information about the CentOS
mailing list