* Mirroring Entire Drives Partition Type Clarification
[not found] <68c007470904101351y7442396bla5366afbc7653e10@mail.gmail.com>
@ 2009-04-10 21:00 ` Jared Raddigan
2009-04-11 2:47 ` Goswin von Brederlow
0 siblings, 1 reply; 2+ messages in thread
From: Jared Raddigan @ 2009-04-10 21:00 UTC (permalink / raw)
To: linux-raid
Playing with mdadm today I noticed it seems to allow full drive
mirroring something I remember that raidtools would fail on.
Back in raidtools days I remember that even though it was possible to
mirror an entire drive with a single md volume (sda, sdb rather than
sda1, sdb1) it really did not work and was not recommended. It looks
like that is no longer the case with mdadm. Here is what I did.
Took two hard drives and created a single partition that spans the
whole drive. then do:
mdadm --create --level=mirror --raid-devices=2 /dev/md1 /dev/sd[ab]1
Look using mdadm --detail and see
Number Major Minor RaidDevice State
0 8 1 0 active sync /dev/sda1
1 8 17 1 active sync /dev/sdb1
I reboot and now using mdadm --detail I see:
Number Major Minor RaidDevice State
0 8 0 0 active sync /dev/sda
1 8 16 1 active sync /dev/sdb
So it would seem mdadm basically figured out what I wanted to do and
no longer shows the partition number after a reboot. So next deleted
all partitions on the drives and recreated the raid set without
referencing the partitions
mdadm --create --level=mirror --raid-devices=2 /dev/md1 /dev/sd[ab]
That worked just fine and now mdadm --detail gives me the same as
before (but without rebooting)
Number Major Minor RaidDevice State
0 8 0 0 active sync /dev/sda
1 8 16 1 active sync /dev/sdb
My questions are:
Is there anything wrong with doing this as this was not recommend
with raidtools. This with LVM or partition the md directly (cool
feature you added) seems like a hard combo to beat?
Does the MBR get synced across the drives when doing this?
I know partition type does not seem to matter with mdadm compared to
raidtools, but when creating partitions I use "da" rather than "fd",
is that the recommended type or since it no longer seems to matter no
one really cares what you use?
I am using version mdadm - v2.6.7.2 - 14th November 2008 from Debian Lenny
Thanks and I am pretty excited how mdadm keeps getting better and better.
--
Jared
>
>
--
Jared Raddigan
Koinonia I.T. Director
p. 916-577-7982 x101
http://www.kfh.org
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Mirroring Entire Drives Partition Type Clarification
2009-04-10 21:00 ` Mirroring Entire Drives Partition Type Clarification Jared Raddigan
@ 2009-04-11 2:47 ` Goswin von Brederlow
0 siblings, 0 replies; 2+ messages in thread
From: Goswin von Brederlow @ 2009-04-11 2:47 UTC (permalink / raw)
To: Jared Raddigan; +Cc: linux-raid
Jared Raddigan <jraddigan@kfh.org> writes:
> Playing with mdadm today I noticed it seems to allow full drive
> mirroring something I remember that raidtools would fail on.
>
> Back in raidtools days I remember that even though it was possible to
> mirror an entire drive with a single md volume (sda, sdb rather than
> sda1, sdb1) it really did not work and was not recommended. It looks
> like that is no longer the case with mdadm. Here is what I did.
>
> Took two hard drives and created a single partition that spans the
> whole drive. then do:
>
> mdadm --create --level=mirror --raid-devices=2 /dev/md1 /dev/sd[ab]1
>
> Look using mdadm --detail and see
> Number Major Minor RaidDevice State
> 0 8 1 0 active sync /dev/sda1
> 1 8 17 1 active sync /dev/sdb1
>
>
> I reboot and now using mdadm --detail I see:
> Number Major Minor RaidDevice State
> 0 8 0 0 active sync /dev/sda
> 1 8 16 1 active sync /dev/sdb
>
> So it would seem mdadm basically figured out what I wanted to do and
> no longer shows the partition number after a reboot. So next deleted
> all partitions on the drives and recreated the raid set without
> referencing the partitions
Unless you configured your sda1 to actually start of block 0 of sda
instead of after the partitioning block then something went seriously
wrong there.
> mdadm --create --level=mirror --raid-devices=2 /dev/md1 /dev/sd[ab]
>
> That worked just fine and now mdadm --detail gives me the same as
> before (but without rebooting)
> Number Major Minor RaidDevice State
> 0 8 0 0 active sync /dev/sda
> 1 8 16 1 active sync /dev/sdb
>
>
> My questions are:
>
> Is there anything wrong with doing this as this was not recommend
> with raidtools. This with LVM or partition the md directly (cool
> feature you added) seems like a hard combo to beat?
>
> Does the MBR get synced across the drives when doing this?
If you write to /dev/mdX then it gets synced. if you write to /dev/sdX
then not.
Also be carefull to use a filesystem that leaves the first 63 sectors
of the device unused for the MBR or you will corrupt your filesystem
and MBR every now and then.
> I know partition type does not seem to matter with mdadm compared to
> raidtools, but when creating partitions I use "da" rather than "fd",
> is that the recommended type or since it no longer seems to matter no
> one really cares what you use?
The kernel cares for raid auto detection. But that only works if all
drivers needed are compiled in and you have the right metadata format.
Starting raid from initramfs totaly ignores the type I blieve.
> I am using version mdadm - v2.6.7.2 - 14th November 2008 from Debian Lenny
>
> Thanks and I am pretty excited how mdadm keeps getting better and better.
>
> --
> Jared
MfG
Goswin
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-04-11 2:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <68c007470904101351y7442396bla5366afbc7653e10@mail.gmail.com>
2009-04-10 21:00 ` Mirroring Entire Drives Partition Type Clarification Jared Raddigan
2009-04-11 2:47 ` Goswin von Brederlow
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox