* Re: Root Drive Mirroring and LVM.
[not found] <868055F9-5045-11D8-8066-00039382032A@mindspring.com>
@ 2004-01-27 8:01 ` Atro Tossavainen
2004-01-27 9:32 ` Sven Luther
2004-01-28 1:42 ` Neil Brown
0 siblings, 2 replies; 9+ messages in thread
From: Atro Tossavainen @ 2004-01-27 8:01 UTC (permalink / raw)
To: linuxppc-dev, linux-raid; +Cc: tas
Sorry about the crossposting.
I wrote on the Yellow Dog Linux list when somebody asked about software
RAID on YDL about my experiences with it:
>> The one really big gotcha is that the Macintosh partitioning scheme
>> can't tell the Linux kernel that certain partitions are to be
>> considered "Linux RAID autodetect" (as in x86 using the DOS partition
>> table type 0xfd). This means that you can't boot a Mac Linux system
>> directly from RAID because the kernel won't be able to autostart the
>> RAID devices. You have to work around this by creating an initial RAM
>> disk that uses the raidstart command to start your metadevices, then
>> swaps the initrd out of the way and proceeds to start the real system.
to which Tim Seufert replied on the same list:
> Hmmm. That would seem to be a lack in the Linux RAID code, since the
> Macintosh partition table has a vastly more flexible partition type
> field than DOS: instead of a single byte it's a string. It would mean
> breaking from the convention of using the "Apple_SVR2_UNIX" type for
> Linux partitions, but that really is just a convention as far as I know.
Perhaps the PPC Linux developers and the Linux RAID developers should
get together on this and make some decisions so as to make it happen.
--
Atro Tossavainen (Mr.) / The Institute of Biotechnology at
Systems Analyst, Techno-Amish & / the University of Helsinki, Finland,
+358-9-19158939 UNIX Dinosaur / employs me, but my opinions are my own.
< URL : http : / / www . helsinki . fi / %7E atossava / > NO FILE ATTACHMENTS
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Root Drive Mirroring and LVM.
2004-01-27 8:01 ` Root Drive Mirroring and LVM Atro Tossavainen
@ 2004-01-27 9:32 ` Sven Luther
2004-01-27 9:50 ` Ethan Benson
2004-01-29 1:01 ` Tom Vier
2004-01-28 1:42 ` Neil Brown
1 sibling, 2 replies; 9+ messages in thread
From: Sven Luther @ 2004-01-27 9:32 UTC (permalink / raw)
To: Atro.Tossavainen; +Cc: linuxppc-dev, linux-raid, tas
On Tue, Jan 27, 2004 at 10:01:17AM +0200, Atro Tossavainen wrote:
>
> Sorry about the crossposting.
>
> I wrote on the Yellow Dog Linux list when somebody asked about software
> RAID on YDL about my experiences with it:
>
> >> The one really big gotcha is that the Macintosh partitioning scheme
> >> can't tell the Linux kernel that certain partitions are to be
> >> considered "Linux RAID autodetect" (as in x86 using the DOS partition
> >> table type 0xfd). This means that you can't boot a Mac Linux system
> >> directly from RAID because the kernel won't be able to autostart the
> >> RAID devices. You have to work around this by creating an initial RAM
> >> disk that uses the raidstart command to start your metadevices, then
> >> swaps the initrd out of the way and proceeds to start the real system.
>
> to which Tim Seufert replied on the same list:
>
> > Hmmm. That would seem to be a lack in the Linux RAID code, since the
> > Macintosh partition table has a vastly more flexible partition type
> > field than DOS: instead of a single byte it's a string. It would mean
> > breaking from the convention of using the "Apple_SVR2_UNIX" type for
> > Linux partitions, but that really is just a convention as far as I know.
>
> Perhaps the PPC Linux developers and the Linux RAID developers should
> get together on this and make some decisions so as to make it happen.
Seems ok for me. Also, i guess that there are other partition types,
like the amiga partitition table the pegasos boxes mostly use, which has
a 32bit identifier for partition types. I guess it is the task of the
RAID code to have some per partition type checking for this RAID autodetect
magic.
Friendly,
Sven Luther
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Root Drive Mirroring and LVM.
2004-01-27 9:32 ` Sven Luther
@ 2004-01-27 9:50 ` Ethan Benson
2004-01-29 1:01 ` Tom Vier
1 sibling, 0 replies; 9+ messages in thread
From: Ethan Benson @ 2004-01-27 9:50 UTC (permalink / raw)
To: linuxppc-dev
On Tue, Jan 27, 2004 at 10:32:13AM +0100, Sven Luther wrote:
>
> On Tue, Jan 27, 2004 at 10:01:17AM +0200, Atro Tossavainen wrote:
> >
> > Sorry about the crossposting.
> >
> > I wrote on the Yellow Dog Linux list when somebody asked about software
> > RAID on YDL about my experiences with it:
> >
> > >> The one really big gotcha is that the Macintosh partitioning scheme
> > >> can't tell the Linux kernel that certain partitions are to be
> > >> considered "Linux RAID autodetect" (as in x86 using the DOS partition
> > >> table type 0xfd). This means that you can't boot a Mac Linux system
> > >> directly from RAID because the kernel won't be able to autostart the
> > >> RAID devices. You have to work around this by creating an initial RAM
> > >> disk that uses the raidstart command to start your metadevices, then
> > >> swaps the initrd out of the way and proceeds to start the real system.
> >
> > to which Tim Seufert replied on the same list:
> >
> > > Hmmm. That would seem to be a lack in the Linux RAID code, since the
> > > Macintosh partition table has a vastly more flexible partition type
> > > field than DOS: instead of a single byte it's a string. It would mean
> > > breaking from the convention of using the "Apple_SVR2_UNIX" type for
> > > Linux partitions, but that really is just a convention as far as I know.
> >
> > Perhaps the PPC Linux developers and the Linux RAID developers should
> > get together on this and make some decisions so as to make it happen.
>
> Seems ok for me. Also, i guess that there are other partition types,
> like the amiga partitition table the pegasos boxes mostly use, which has
> a 32bit identifier for partition types. I guess it is the task of the
> RAID code to have some per partition type checking for this RAID autodetect
> magic.
in general we need to stop using Apple_* types for our partitions,
apple clearly documents that the entire Apple_* namespace is reserved
solely for Apple use, and 3rd party developers must use something,
anything else for thier partitions.
the trick is coming up with a generic enough and sensible enough
naming convention. (i think its quite silly to include specific
filesystem names in partition types, and really it seems silly to
specify "Linux" for filesystems which can and are used by OSes other
then "Linux" (ext2 is used in Hurd for example)).
--
Ethan Benson
http://www.alaska.net/~erbenson/
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Root Drive Mirroring and LVM.
2004-01-27 8:01 ` Root Drive Mirroring and LVM Atro Tossavainen
2004-01-27 9:32 ` Sven Luther
@ 2004-01-28 1:42 ` Neil Brown
2004-01-28 8:15 ` Sven Luther
2004-02-04 18:23 ` linas
1 sibling, 2 replies; 9+ messages in thread
From: Neil Brown @ 2004-01-28 1:42 UTC (permalink / raw)
To: Atro.Tossavainen; +Cc: linuxppc-dev, linux-raid, tas
On Tuesday January 27, atossava@cc.helsinki.fi wrote:
> Sorry about the crossposting.
>
> I wrote on the Yellow Dog Linux list when somebody asked about software
> RAID on YDL about my experiences with it:
>
> >> The one really big gotcha is that the Macintosh partitioning scheme
> >> can't tell the Linux kernel that certain partitions are to be
> >> considered "Linux RAID autodetect" (as in x86 using the DOS partition
> >> table type 0xfd). This means that you can't boot a Mac Linux system
> >> directly from RAID because the kernel won't be able to autostart the
> >> RAID devices. You have to work around this by creating an initial RAM
> >> disk that uses the raidstart command to start your metadevices, then
> >> swaps the initrd out of the way and proceeds to start the real system.
>
This is not entirely true. Certainly an initial-ram-disk is one
solution and is (I think) the preferred long-term solution. However
you can also boot from raid with kernel-parameters like:
md=0,/dev/hda1,/dev/hdc1 boot=/dev/md0
where '0' indicated which md device (md0 in this case), and the
remaining words are the devices to assemble it from.
> to which Tim Seufert replied on the same list:
>
> > Hmmm. That would seem to be a lack in the Linux RAID code, since the
> > Macintosh partition table has a vastly more flexible partition type
> > field than DOS: instead of a single byte it's a string. It would mean
> > breaking from the convention of using the "Apple_SVR2_UNIX" type for
> > Linux partitions, but that really is just a convention as far as I know.
>
> Perhaps the PPC Linux developers and the Linux RAID developers should
> get together on this and make some decisions so as to make it happen.
>
I personally think auto-detect is the wrong approach and have no
desire to extend it to other partition types (I cannot remove it from
DOS partitions as that breaks back-compatability).
Just use "md=..."
NeilBrown
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Root Drive Mirroring and LVM.
2004-01-28 1:42 ` Neil Brown
@ 2004-01-28 8:15 ` Sven Luther
2004-02-04 18:23 ` linas
1 sibling, 0 replies; 9+ messages in thread
From: Sven Luther @ 2004-01-28 8:15 UTC (permalink / raw)
To: Neil Brown; +Cc: Atro.Tossavainen, linuxppc-dev, linux-raid, tas
On Wed, Jan 28, 2004 at 12:42:18PM +1100, Neil Brown wrote:
>
> On Tuesday January 27, atossava@cc.helsinki.fi wrote:
> > Sorry about the crossposting.
> >
> > I wrote on the Yellow Dog Linux list when somebody asked about software
> > RAID on YDL about my experiences with it:
> >
> > >> The one really big gotcha is that the Macintosh partitioning scheme
> > >> can't tell the Linux kernel that certain partitions are to be
> > >> considered "Linux RAID autodetect" (as in x86 using the DOS partition
> > >> table type 0xfd). This means that you can't boot a Mac Linux system
> > >> directly from RAID because the kernel won't be able to autostart the
> > >> RAID devices. You have to work around this by creating an initial RAM
> > >> disk that uses the raidstart command to start your metadevices, then
> > >> swaps the initrd out of the way and proceeds to start the real system.
> >
>
> This is not entirely true. Certainly an initial-ram-disk is one
> solution and is (I think) the preferred long-term solution. However
> you can also boot from raid with kernel-parameters like:
>
> md=0,/dev/hda1,/dev/hdc1 boot=/dev/md0
>
> where '0' indicated which md device (md0 in this case), and the
> remaining words are the devices to assemble it from.
This is said to be broken on latest 2.4.x kernels though. Didn't try
myself though, since i only have a single drive, and don't really want
to mess up with it.
> > to which Tim Seufert replied on the same list:
> >
> > > Hmmm. That would seem to be a lack in the Linux RAID code, since the
> > > Macintosh partition table has a vastly more flexible partition type
> > > field than DOS: instead of a single byte it's a string. It would mean
> > > breaking from the convention of using the "Apple_SVR2_UNIX" type for
> > > Linux partitions, but that really is just a convention as far as I know.
> >
> > Perhaps the PPC Linux developers and the Linux RAID developers should
> > get together on this and make some decisions so as to make it happen.
> >
>
> I personally think auto-detect is the wrong approach and have no
> desire to extend it to other partition types (I cannot remove it from
> DOS partitions as that breaks back-compatability).
> Just use "md=..."
Ok.
Friendly,
Sven Luther
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Root Drive Mirroring and LVM.
2004-01-27 9:32 ` Sven Luther
2004-01-27 9:50 ` Ethan Benson
@ 2004-01-29 1:01 ` Tom Vier
2004-01-29 7:22 ` Sven Luther
1 sibling, 1 reply; 9+ messages in thread
From: Tom Vier @ 2004-01-29 1:01 UTC (permalink / raw)
To: Sven Luther; +Cc: linuxppc-dev, linux-raid
[-- Attachment #1: Type: text/plain, Size: 585 bytes --]
On Tue, Jan 27, 2004 at 10:32:13AM +0100, Sven Luther wrote:
> Seems ok for me. Also, i guess that there are other partition types,
> like the amiga partitition table the pegasos boxes mostly use, which has
> a 32bit identifier for partition types. I guess it is the task of the
> RAID code to have some per partition type checking for this RAID autodetect
> magic.
it's done in fs/partitions/. it could be made anything, as long as it's put
in the raid docs so people know.
here's a patch of mine for alpha, to give you an idea.
--
Tom Vier <tmv@comcast.net>
DSA Key ID 0xE6CB97DA
[-- Attachment #2: part-fstype.diff --]
[-- Type: text/plain, Size: 1386 bytes --]
diff -urN linux-2.4.10-ac7-patched-build/fs/partitions/osf.c linux-2.4.10-ac7-patched-build-osf/fs/partitions/osf.c
--- linux-2.4.10-ac7-patched-build/fs/partitions/osf.c Sat Oct 6 13:25:48 2001
+++ linux-2.4.10-ac7-patched-build-osf/fs/partitions/osf.c Sat Oct 6 13:25:20 2001
@@ -7,6 +7,7 @@
* Re-organised Feb 1998 Russell King
*/
+#include <linux/config.h>
#include <linux/fs.h>
#include <linux/genhd.h>
#include <linux/kernel.h>
@@ -17,6 +18,10 @@
#include "check.h"
#include "osf.h"
+#if CONFIG_BLK_DEV_MD
+extern void md_autodetect_dev(kdev_t dev);
+#endif
+
int osf_partition(struct gendisk *hd, struct block_device *bdev,
unsigned long first_sector, int current_minor)
{
@@ -74,10 +79,16 @@
for (i = 0 ; i < le16_to_cpu(label->d_npartitions); i++, partition++) {
if ((current_minor & mask) == 0)
break;
- if (le32_to_cpu(partition->p_size))
- add_gd_partition(hd, current_minor,
- first_sector+le32_to_cpu(partition->p_offset),
- le32_to_cpu(partition->p_size));
+ if (le32_to_cpu(partition->p_size)) {
+ add_gd_partition(hd, current_minor,
+ first_sector+le32_to_cpu(partition->p_offset),
+ le32_to_cpu(partition->p_size));
+#if CONFIG_BLK_DEV_MD
+ if (partition->p_fstype == LINUX_RAID_PARTITION) {
+ md_autodetect_dev(MKDEV(hd->major,current_minor));
+ }
+#endif
+ }
current_minor++;
}
printk("\n");
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Root Drive Mirroring and LVM.
2004-01-29 1:01 ` Tom Vier
@ 2004-01-29 7:22 ` Sven Luther
0 siblings, 0 replies; 9+ messages in thread
From: Sven Luther @ 2004-01-29 7:22 UTC (permalink / raw)
To: Tom Vier; +Cc: Sven Luther, linuxppc-dev, linux-raid
On Wed, Jan 28, 2004 at 08:01:01PM -0500, Tom Vier wrote:
> On Tue, Jan 27, 2004 at 10:32:13AM +0100, Sven Luther wrote:
> > Seems ok for me. Also, i guess that there are other partition types,
> > like the amiga partitition table the pegasos boxes mostly use, which has
> > a 32bit identifier for partition types. I guess it is the task of the
> > RAID code to have some per partition type checking for this RAID autodetect
> > magic.
>
> it's done in fs/partitions/. it could be made anything, as long as it's put
> in the raid docs so people know.
Ok, thanks. On amiga filesystem, partitition types are in 32bit ints,
but can also be represented as 4 chars, so maybe `RAID` would be a good
type for that ? I will try patching the kernel, and adding support in
libparted for recognizing such partitions, and try it out.
Does it make sense to do Software Raid on two partititons of the same
disk, just for testing purpose ?
> here's a patch of mine for alpha, to give you an idea.
Ok, thanks.
Friendly,
Sven Luther
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Root Drive Mirroring and LVM.
2004-01-28 1:42 ` Neil Brown
2004-01-28 8:15 ` Sven Luther
@ 2004-02-04 18:23 ` linas
2004-03-23 7:27 ` Atro Tossavainen
1 sibling, 1 reply; 9+ messages in thread
From: linas @ 2004-02-04 18:23 UTC (permalink / raw)
To: Neil Brown; +Cc: Atro.Tossavainen, linuxppc-dev, linux-raid, tas
On Wed, Jan 28, 2004 at 12:42:18PM +1100, Neil Brown wrote:
> solution and is (I think) the preferred long-term solution. However
> you can also boot from raid with kernel-parameters like:
>
> md=0,/dev/hda1,/dev/hdc1 boot=/dev/md0
>
> where '0' indicated which md device (md0 in this case), and the
> remaining words are the devices to assemble it from.
>
> I personally think auto-detect is the wrong approach and have no
> desire to extend it to other partition types (I cannot remove it from
> DOS partitions as that breaks back-compatability).
> Just use "md=..."
What's wrong with autodetect? Its saved my butt a number of times.
My recurring nightmare is involves a failed ide controller. If the
failed controller is on the motherboard, then plugging in a store-bought
ide controller causes the BIOS to "randomly" renumber to hard drives.
(yes, sorry this is a PC issue, but I would guess that similar issues
lurk in open firmware, etc).
Thus, any sort of mounting that explictly references /dev/hdanything
is guarenteed to screw up (sometimes catastrophically) when trying
to recover from failed controllers (and sometimes even failed disks,
if you are trying to bootstrap your way through by temporarily putting
the replacement disk somewhere other than its permanent home).
And I'm a comp sci geek who wrote the original linux RAID HOWTO,
I pity the mere mortal sysadmin who has to go through this ...
So what's wrong with autodetect, again?
--linas
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Root Drive Mirroring and LVM.
2004-02-04 18:23 ` linas
@ 2004-03-23 7:27 ` Atro Tossavainen
0 siblings, 0 replies; 9+ messages in thread
From: Atro Tossavainen @ 2004-03-23 7:27 UTC (permalink / raw)
To: linas; +Cc: Neil Brown, Atro.Tossavainen, linuxppc-dev, linux-raid, tas
On Wed, 4 Feb 2004 12:23:17 -0600, linas@austin.ibm.com wrote:
> On Wed, Jan 28, 2004 at 12:42:18PM +1100, Neil Brown wrote:
>
> > I personally think auto-detect is the wrong approach and have no
> > desire to extend it to other partition types (I cannot remove it from
> > DOS partitions as that breaks back-compatability).
> > Just use "md=..."
>
> What's wrong with autodetect? Its saved my butt a number of times.
>
> My recurring nightmare is involves a failed ide controller. If the
> failed controller is on the motherboard, then plugging in a store-bought
> ide controller causes the BIOS to "randomly" renumber to hard drives.
> (yes, sorry this is a PC issue, but I would guess that similar issues
> lurk in open firmware, etc).
Indeed. Speaking for myself only, the whole issue has only come about
because somewhere after 2.4.20, the handling of Promise add-on IDE
controllers was changed so that where the Promise hard drives on the
Apple Xserve were previously /dev/hde to /dev/hdh and the "mainboard"
IDE (which only handles the CD-ROM) was /dev/hda to /dev/hdd, their
internal order is now reversed, and for some reason I am unable to get
the metadevice to work after the change (so am effectively unable to
update my kernel as root is on md).
--
Atro Tossavainen (Mr.) / The Institute of Biotechnology at
Systems Analyst, Techno-Amish & / the University of Helsinki, Finland,
+358-9-19158939 UNIX Dinosaur / employs me, but my opinions are my own.
< URL : http : / / www . helsinki . fi / %7E atossava / > NO FILE ATTACHMENTS
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2004-03-23 7:27 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <868055F9-5045-11D8-8066-00039382032A@mindspring.com>
2004-01-27 8:01 ` Root Drive Mirroring and LVM Atro Tossavainen
2004-01-27 9:32 ` Sven Luther
2004-01-27 9:50 ` Ethan Benson
2004-01-29 1:01 ` Tom Vier
2004-01-29 7:22 ` Sven Luther
2004-01-28 1:42 ` Neil Brown
2004-01-28 8:15 ` Sven Luther
2004-02-04 18:23 ` linas
2004-03-23 7:27 ` Atro Tossavainen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).