Re: md (software) RAID missing in the installer for sparc

2007-04-16 Thread Josip Rodin
On Wed, Apr 04, 2007 at 08:26:12PM +0200, Josip Rodin wrote:
[ Fabio M. Di Nitto ]
* RAID cannot be selected if we are on sparc AND the partiton starts at 0
  otherwise there will partition table corruption happening in the first
  512 bytes of the disk.
 
 I found another bit of info, from Fabio:
 
 https://launchpad.net/ubuntu/+source/silo/+bug/66727/comments/2
 
 (Upon further meddling with my setup, I managed to make my system unbootable
 again, so I'm still investigating :)

I wasn't able to reproduce the working condition with a 3.5 GB root (/) md0
partition, or a 2 GB root md0. :( I've finally created a 256 MB /boot md0,
and a 5 GB root (/) md1 partition, and finally PROM found SILO.

Someone who knows PROM and/or SILO could explain which of those variables
causes the boot process to fail.

-- 
 2. That which causes joy or happiness.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: md (software) RAID missing in the installer for sparc

2007-04-16 Thread Chris Newport

On Tue, 17 Apr 2007, Josip Rodin wrote:


I wasn't able to reproduce the working condition with a 3.5 GB root (/) md0
partition, or a 2 GB root md0. :( I've finally created a 256 MB /boot md0,
and a 5 GB root (/) md1 partition, and finally PROM found SILO.

Someone who knows PROM and/or SILO could explain which of those variables
causes the boot process to fail.


There are several factors involved.

1) The OBP does not understand raid, but it should be able to
   cope with a simple mirror.

2) Older OBPs cannot see beyond either 1Gb or 2Gb into a partition
   depending on version. If your installer puts anything needed for
   the initial boot process beyond this point you will not be able
   to boot. [ Affects Sparc32 ]

3) The first cylinder of the disk contains the partition information.
   Most filesystems work around this by not actually using the first
   cylinder, but Linux Raid does not understand this and it will
   overwrite the tables. The solution is simple - just create a small
   partition of one cylinder at cylinder zero and do not use it.
   [ Affects Linux Raid and possibly oddball filesystems such as XFS
 only when they start at cylinder zero ]

4) If the partition table on the disk was first written by an old
   version of the Solaris format command the maximum useable size of
   any partition will be either 1Gb or 2Gb depending on version.
   Linux will probably not notice and allow you to create a larger
   partition which will confuse the OBP even if the OBP does not have
   the limitation in 2) above.
   The workaround for this is to destroy cylinder zero by filling it
   with zeros using dd and then use Linux fdisk to create a new BSD
   table.  [ Affects disks initially formatted with old utilities ]

You could have any combination of the above - best to avoid them all.



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: md (software) RAID missing in the installer for sparc

2007-04-16 Thread Josip Rodin
On Tue, Apr 17, 2007 at 12:56:21AM +0100, Chris Newport wrote:
 2) Older OBPs cannot see beyond either 1Gb or 2Gb into a partition
depending on version. If your installer puts anything needed for
the initial boot process beyond this point you will not be able
to boot. [ Affects Sparc32 ]

I've got a sun4u, so this shouldn't affect me...

 3) The first cylinder of the disk contains the partition information.
Most filesystems work around this by not actually using the first
cylinder, but Linux Raid does not understand this and it will
overwrite the tables. The solution is simple - just create a small
partition of one cylinder at cylinder zero and do not use it.
[ Affects Linux Raid and possibly oddball filesystems such as XFS
  only when they start at cylinder zero ]

I can't quite reproduce this - my current /dev/sda1 and /dev/sdb1, both of
which start at the first cylinder, are in a RAID array, but work fine.

 4) If the partition table on the disk was first written by an old
version of the Solaris format command the maximum useable size of
any partition will be either 1Gb or 2Gb depending on version.
Linux will probably not notice and allow you to create a larger
partition which will confuse the OBP even if the OBP does not have
the limitation in 2) above.
The workaround for this is to destroy cylinder zero by filling it
with zeros using dd and then use Linux fdisk to create a new BSD
table.  [ Affects disks initially formatted with old utilities ]

I had Solaris on it previously, but I only had Linux parted and fdisk
trample over it several times, I never filled it with zeros. Is that really
necessary? :)

-- 
 2. That which causes joy or happiness.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: md (software) RAID missing in the installer for sparc

2007-04-16 Thread Chris Newport

On Tue, 17 Apr 2007, Josip Rodin wrote:


4) If the partition table on the disk was first written by an old
   version of the Solaris format command the maximum useable size of
   any partition will be either 1Gb or 2Gb depending on version.
   Linux will probably not notice and allow you to create a larger
   partition which will confuse the OBP even if the OBP does not have
   the limitation in 2) above.
   The workaround for this is to destroy cylinder zero by filling it
   with zeros using dd and then use Linux fdisk to create a new BSD
   table.  [ Affects disks initially formatted with old utilities ]


I had Solaris on it previously, but I only had Linux parted and fdisk
trample over it several times, I never filled it with zeros. Is that really
necessary? :)


Yes, The table is only created when the disk is first labelled.
The table does not change, only the entries in the table.
The table contains version information which must be preserved because
the data format changed between versions to allow larger pointers.
The same problem also shows up on IDE disks, if older utilities were
used to label the disk it will always have a maximum size of 8Gb or 37Gb
until you zap the table and make a new one.

There is also a problem with SILO which I do not fully understand, but
it can also have problems looking more than 2047 Mb into a partition.
This can sneak up on you if you edit any of SILO's files, the new file
can be past the limit and make the system unbootable.

It is always best practice to have a small /boot partition at the
beginning of the disk.

BTW - If you are using RAID for your data you should also mirror swap.

Do not use anything other than a simple mirror for swap and do not have
more than one swap area on the same spindle. Both Solaris and Linux will
try to optimise performance by striping swap data across as many swaps
as you have, so having more than one swap per spindle will guarantee
serious head thrashing.

Maybe someone more knowledgeable will explain the SILO problems.



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: md (software) RAID missing in the installer for sparc

2007-04-04 Thread Josip Rodin
On Sun, Apr 01, 2007 at 03:24:03PM +0200, Josip Rodin wrote:
  It _is_ supported, but the option Use as RAID will not be shown if the 
  current partition starts on sector 0 of the disk because that would 
  overwrite the Sun disklabel info.
 
 | The first partition has to be ext3 or fd, not swap because swap writes
 | from first block and avoid silo block. If swap begins on the cylinder 1,
 | openprom cannot boot (ther is not MBR on sparc architecture).

Further, it seems that this is supported by
http://www.openbsd.org/faq/faq14.html#disklabel which says:

* (sparc/sparc64) Don't put swap at the very beginning of your disk.

-- 
 2. That which causes joy or happiness.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: md (software) RAID missing in the installer for sparc

2007-04-04 Thread Josip Rodin
On Sun, Apr 01, 2007 at 03:24:03PM +0200, Josip Rodin wrote:
  It _is_ supported, but the option Use as RAID will not be shown if the 
  current partition starts on sector 0 of the disk because that would 
  overwrite the Sun disklabel info.
  
  So, to set up RAID on sparc, first create a small (/boot) partition and 
  then create a second partition to set up as RAID.
 
 But... that's not actually supposed to be necessary.
 | The first partition has to be ext3 or fd, not swap

Now I also found that silo-installer postinst knows this, too:

# force -t on raid
if echo $bootfs | grep -q /dev/md; then
raidinstall=y
else
raidinstall=n
fi

If software RAID wasn't supposed to be used on the SILO boot device at all,
then this code wouldn't be here.

Upon finding that if $raidinstall is set, it runs silo with the -t option),
I did that myself and it worked fine.

-- 
 2. That which causes joy or happiness.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: md (software) RAID missing in the installer for sparc

2007-04-04 Thread Frans Pop
On Wednesday 04 April 2007 16:46, Josip Rodin wrote:
 If software RAID wasn't supposed to be used on the SILO boot device at
 all, then this code wouldn't be here.

Please file a BR against silo-installer with a summary of this thread.


pgpTyFbrUdTBq.pgp
Description: PGP signature


Re: md (software) RAID missing in the installer for sparc

2007-04-04 Thread Josip Rodin
On Wed, Apr 04, 2007 at 04:57:11PM +0200, Frans Pop wrote:
  If software RAID wasn't supposed to be used on the SILO boot device at
  all, then this code wouldn't be here.
 
 Please file a BR against silo-installer with a summary of this thread.

But there is no problem with silo-installer, it's partman that needs to take
care of this. I checked the partman-md bug list, and found #411756, where
I've now concurred.

silo-installer could have the different, proper sanity check added, but that
would be extra, because it would cover the corner case where someone goes
behind partman's back, and then returns to d-i just to get silo installed.
That's unlikely, since people who know they way around parted/fdisk probably
also know how to run silo manually.

In fact, even for the less advanced users I think this is a rather small
corner case, because you don't have /dev/md* in the shell until you activate
the md subsystem, and the most straightforward way to do that is to simply
enter partman and through it enter mdcfg :) The main part of mdcfg.sh
runs all the right modprobes and mdadm autoscans.

-- 
 2. That which causes joy or happiness.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: md (software) RAID missing in the installer for sparc

2007-04-04 Thread Frans Pop
On Wednesday 04 April 2007 17:19, Josip Rodin wrote:
 But there is no problem with silo-installer, it's partman that needs to
 take care of this. I checked the partman-md bug list, and found
 #411756, where I've now concurred.

No, the bit that does the check in partman is part of silo-installer!

http://svn.debian.org/wsvn/d-i/trunk/packages/arch/sparc/silo-installer/finish.d/?rev=0sc=0

/me is kind of expected to know what he's talking about :-)


pgpcP585ySZNj.pgp
Description: PGP signature


Re: md (software) RAID missing in the installer for sparc

2007-04-04 Thread Josip Rodin
On Wed, Apr 04, 2007 at 05:39:35PM +0200, Frans Pop wrote:
  But there is no problem with silo-installer, it's partman that needs to
  take care of this. I checked the partman-md bug list, and found
  #411756, where I've now concurred.
 
 No, the bit that does the check in partman is part of silo-installer!
 
 http://svn.debian.org/wsvn/d-i/trunk/packages/arch/sparc/silo-installer/finish.d/?rev=0sc=0
 
 /me is kind of expected to know what he's talking about :-)

Yes, but that check that prevents the first partition to be md isn't there,
it's in packages/partman/partman-md/choose_method/md/choices

-- 
 2. That which causes joy or happiness.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: md (software) RAID missing in the installer for sparc

2007-04-04 Thread Josip Rodin
On Sun, Apr 01, 2007 at 02:18:11PM +0200, Josip Rodin wrote:
   [ Fabio M. Di Nitto ]
   * RAID cannot be selected if we are on sparc AND the partiton starts at 0
 otherwise there will partition table corruption happening in the first
 512 bytes of the disk.

I found another bit of info, from Fabio:

https://launchpad.net/ubuntu/+source/silo/+bug/66727/comments/2

(Upon further meddling with my setup, I managed to make my system unbootable
again, so I'm still investigating :)

-- 
 2. That which causes joy or happiness.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: md (software) RAID missing in the installer for sparc

2007-04-02 Thread BERTRAND Joël

Josip Rodin a écrit :

On Sun, Apr 01, 2007 at 03:39:37PM +0200, Frans Pop wrote:

But... that's not actually supposed to be necessary. Quoting:

[...]

| The first partition has to be ext3 or fd, not swap because swap
| writes from first block and avoid silo block. If swap begins on the
| cylinder 1, openprom cannot boot (ther is not MBR on sparc
| architecture).

This was in reply to another person's question, and that person (who
had a problem) had swap as the first partition.

I don't see how you conclude one from the other.


The man said that it works for him(tm)... that sounds relevant :)


I confirm ;-)

	I have several Sparc (U1, U2, U60, U80, U420) that run fine for a very 
long time with raid1 partition /boot that start on the first cylinder 
(Sun disklabel). Silo is installed on partitions, not on whole disk.


Regards,

JKB


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



md (software) RAID missing in the installer for sparc

2007-04-01 Thread Josip Rodin
Hi,

I couldn't help but notice that there is no support for software RAID arrays
in the sparc installer.

All I found to document it was:

partman-md (24) unstable; urgency=low

  [ Fabio M. Di Nitto ]
  * RAID cannot be selected if we are on sparc AND the partiton starts at 0
otherwise there will partition table corruption happening in the first
512 bytes of the disk.
(NOTE: this will work only once patch for sparc/raid support will make it
   in parted)
[...]
 -- Frans Pop [EMAIL PROTECTED]  Sat, 29 Apr 2006 03:30:04 +0200

Oddly enough, I can't seem to find the problem there, because parted code
doesn't seem to have exceptions for sparc...

Some more digging excavated me the bug #315009, saying the Use as: physical
volume for RAID option is missing. That bug was closed with:

Date: Thu, 20 Apr 2006 17:45:22 -0300
[...]
 parted (1.6.25.1-3) unstable; urgency=low
[...]
   * Apply patch to fix RAID usage in SPARC. Thanks to Fabio Di Nitto
 [EMAIL PROTECTED] (Closes: #355467)

So how come this didn't propagate into debian-installer for etch?

-- 
 2. That which causes joy or happiness.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: md (software) RAID missing in the installer for sparc

2007-04-01 Thread Frans Pop
On Sunday 01 April 2007 14:18, Josip Rodin wrote:
 I couldn't help but notice that there is no support for software RAID
 arrays in the sparc installer.

It _is_ supported, but the option Use as RAID will not be shown if the 
current partition starts on sector 0 of the disk because that would 
overwrite the Sun disklabel info.

So, to set up RAID on sparc, first create a small (/boot) partition and 
then create a second partition to set up as RAID.


pgpSfROIOywgU.pgp
Description: PGP signature


Re: md (software) RAID missing in the installer for sparc

2007-04-01 Thread Josip Rodin
On Sun, Apr 01, 2007 at 02:36:15PM +0200, Frans Pop wrote:
  I couldn't help but notice that there is no support for software RAID
  arrays in the sparc installer.
 
 It _is_ supported, but the option Use as RAID will not be shown if the 
 current partition starts on sector 0 of the disk because that would 
 overwrite the Sun disklabel info.
 
 So, to set up RAID on sparc, first create a small (/boot) partition and 
 then create a second partition to set up as RAID.

But... that's not actually supposed to be necessary. Quoting:

| Date: Tue, 04 Apr 2006 13:12:52 +0200
| From: BERTRAND Joël [EMAIL PROTECTED]
| To: debian-sparc@lists.debian.org
| 
| The first partition has to be ext3 or fd, not swap because swap writes
| from first block and avoid silo block. If swap begins on the cylinder 1,
| openprom cannot boot (ther is not MBR on sparc architecture).

This was in reply to another person's question, and that person (who had
a problem) had swap as the first partition.

-- 
 2. That which causes joy or happiness.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: md (software) RAID missing in the installer for sparc

2007-04-01 Thread Frans Pop
On Sunday 01 April 2007 15:24, Josip Rodin wrote:
 But... that's not actually supposed to be necessary. Quoting:
[...]
 | The first partition has to be ext3 or fd, not swap because swap
 | writes from first block and avoid silo block. If swap begins on the
 | cylinder 1, openprom cannot boot (ther is not MBR on sparc
 | architecture).

 This was in reply to another person's question, and that person (who
 had a problem) had swap as the first partition.

I don't see how you conclude one from the other. AFAIK RAID also writes 
its signatures on the first block and this causes the same problem as 
swap does. (No idea what fd stands for.)

Anyway, I trust the sparc porters (Fabio in this case) on this.
I may have confused disklabel with silo data.

The fact remains that RAID is only supported in D-I on partitions that do 
not start at the beginning of the disk.


pgpfhmnXioxFg.pgp
Description: PGP signature


Re: md (software) RAID missing in the installer for sparc

2007-04-01 Thread Josip Rodin
On Sun, Apr 01, 2007 at 03:39:37PM +0200, Frans Pop wrote:
  But... that's not actually supposed to be necessary. Quoting:
 [...]
  | The first partition has to be ext3 or fd, not swap because swap
  | writes from first block and avoid silo block. If swap begins on the
  | cylinder 1, openprom cannot boot (ther is not MBR on sparc
  | architecture).
 
  This was in reply to another person's question, and that person (who
  had a problem) had swap as the first partition.
 
 I don't see how you conclude one from the other.

The man said that it works for him(tm)... that sounds relevant :)

 AFAIK RAID also writes its signatures on the first block and this causes
 the same problem as swap does. (No idea what fd stands for.)

fd is the partition table designation of a 'Linux raid autodetect' partition
(like 83 is ext2/3).

 The fact remains that RAID is only supported in D-I on partitions that do 
 not start at the beginning of the disk.

I didn't notice it, because I went for the first partition, saw it was not
there, and didn't try for the rest. I can't imagine many other users doing
anything differently. Perhaps an error is in order, rather than omitting
the option altogether :)

-- 
 2. That which causes joy or happiness.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: md (software) RAID missing in the installer for sparc

2007-04-01 Thread Andrew Sharp
On Sun, Apr 01, 2007 at 04:19:19PM +0200, Josip Rodin wrote:
 On Sun, Apr 01, 2007 at 03:39:37PM +0200, Frans Pop wrote:
   But... that's not actually supposed to be necessary. Quoting:
  [...]
   | The first partition has to be ext3 or fd, not swap because swap
   | writes from first block and avoid silo block. If swap begins on the
   | cylinder 1, openprom cannot boot (ther is not MBR on sparc
   | architecture).
  
   This was in reply to another person's question, and that person (who
   had a problem) had swap as the first partition.
  
  I don't see how you conclude one from the other.
 
 The man said that it works for him(tm)... that sounds relevant :)

Relevance wasn't questioned; your conclusion was questioned.

Regardless of this quote, I can tell you from experience that it does
not work to have the first partition be a raid partition and start from
cylinder 0.

This is the first time I've heard that you can't boot if the first
partition is swap and starts at cyl 1.  Sounds bogus to me.

a


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: md (software) RAID missing in the installer for sparc

2007-04-01 Thread Josip Rodin
On Sun, Apr 01, 2007 at 12:56:19PM -0700, Andrew Sharp wrote:
| The first partition has to be ext3 or fd [...]
  
  The man said that it works for him(tm)... that sounds relevant :)
 
 Relevance wasn't questioned; your conclusion was questioned.

My conclusion was that he said that a separate non-RAID partition is not
actually necessary, which is exactly what he wrote...

See the whole post at http://lists.debian.org/debian-sparc/2006/04/msg00021.html

 Regardless of this quote, I can tell you from experience that it does
 not work to have the first partition be a raid partition and start from
 cylinder 0.
 
 This is the first time I've heard that you can't boot if the first
 partition is swap and starts at cyl 1.  Sounds bogus to me.

I guess I'll just have to test and see.

-- 
 2. That which causes joy or happiness.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]