Re: Does anyone have software RAID 1 mirroring of / set up on Sparc?

2006-04-09 Thread Simon Heywood
On Wed,  5 Apr 2006 12:20:17 +0100, Ashley Hooper wrote:
> Everything's working now, but I find those messages about UUIDs being
> different between the various RAID members a bit annoying - anyone
> know how to fix that?

Hmm, that doesn't sound right. What does 'mdadm --examine '
say for a relevant pair of component devices? Also, what's the output of
'cat /proc/mdstat'?

S.


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



Re: Does anyone have software RAID 1 mirroring of / set up on Sparc?

2006-04-05 Thread Simon Heywood
On Tue,  4 Apr 2006 23:11:13 +0100, Ashley Hooper wrote:
> > It is quite tricky to get right. You might find this old post (about
> > setting up Sarge with root on RAID-1 on my Netra) helpful:
> > 
> > http://lists.debian.org/debian-sparc/2005/07/msg00143.html
> 
> I tried something along the lines of what you advised, but can you
> confirm that you have to create your 1st partition (in my case /boot)
> starting at cylinder 1?  I am unable to boot the system without doing a
> 'boot disk0:x' (where x is the partition containing /boot).

If it's going to be part of a RAID set (rather than, say, containing n
ext3 filesystem) then the first partition needs to start at cylinder 1.
This is because RAID uses the whole partition (and hence the bit at the
start of the disk that the boot loader would normally inhabit).

> When trying a straight 'boot' (i.e. boot disk0) I get the error message
> 'The file just loaded does not appear to be executable'.

Hmm, 'something along the lines of' might not be enough. ;-) SILO can be
quite picky in subtle ways. Did you do the throw-away installation on a
completely separate partition, and create both halves of your RAID-1
mirrors (root and /boot) before re-running SILO?

Also, it's a long time since I did this, but I think 'boot' gets
interpreted as something like 'boot disk0:1', which isn't what you want.
You need 'boot disk0:3' (partition 3 is the 'Whole disk' partition,
which always starts at cylinder 0).

> Also, the Silo docs say for the -t option:
> 
> "Stores the boot block into the same partition as the second stage
> loader.  By default, when using a SCSI or an IDE disk, SILO writes the
> boot block  into the master boot (the boot block of the partition
> starting at cylinder 0). This behaviour can be changed with the "-t"
> argument."
> 
> Of course, I don't have any partition starting at cylinder 0.

Well, partition 3 (Whole disk) starts at cylinder 0. Anyway, the order I
did things in meant that I didn't need any command line arguments when
running SILO.

S.


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



Re: Does anyone have software RAID 1 mirroring of / set up on Sparc?

2006-04-04 Thread Simon Heywood
On Tue,  4 Apr 2006 11:50:53 +0100, Ashley Hooper wrote:
> Hi all,

Hi. Please don't start a new thread by replying to an existing one.

> I've been struggling with this for the last few days but no matter
> what I do I cannot get a mirrored root filesystem on my V240.
> Generally what happens is that SILO refuses to boot from the partition
> as soon as it's changed to type 'fd' (RAID autodetect).  Other times
> it starts to boot but only gets as far as single user mode and then
> cannot mount root properly.

It is quite tricky to get right. You might find this old post (about
setting up Sarge with root on RAID-1 on my Netra) helpful:

http://lists.debian.org/debian-sparc/2005/07/msg00143.html

S.


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



Re: Silo and Raid1

2005-12-14 Thread Simon Heywood
On Wed, 14 Dec 2005 11:01:47 +0100, Turbo Fredriksson wrote:
> If you're going to use RAID on the disk, the first partition MUST start
> on block 1 (one!), not 0 (zero). Can't remember exactly why (usually I
> forget 'obvious reasons' :) but it have something to do with with ext2/3
> inode list, the boot block or with the RAID system needing block zero for
> something...

The first few blocks of an ext2 or ext3 filesystem are unused, so
putting one at the start of the disk doesn't matter - the SILO code and
the disk label in block 0 of the disk are untouched.

A partition that's part of an MD array will have data written to it from
its first block, so if it starts on block 0 of the disk then SILO and
the disk label be overwritten.

> NOTE: This is true EVEN if the first partition isn't an MD!

Why's that?

S.


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



Re: Software RAID on SPARC64

2005-07-18 Thread Simon Heywood
On Mon, 18 Jul 2005 17:57:22 +0100, David Johnson wrote:
> I've been having problems with software RAID (using mdadm) on Sarge on
> an Ultra Enterprise 450. There seems to be a bug somewhere causing
> corruption of Sun disk labels.
> 
> I start with 8 SCSI disks with valid Sun disk labels and one partition
> filling each disk. The partition types are set to "Linux RAID
> autodetect".

What do the partition tables look like?

You may know this already, but you need to start the first partition on
each disk at cylinder 1 instead of cylinder 0 to leave room for the disk
label.  Apparently, Ext2/3 leaves some free space at the start of
partitions for this sort of thing, but RAID doesn't.

S.


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



Re: debianinstaller root+raid+lvm on U30

2005-07-11 Thread Simon Heywood
On Mon, 11 Jul 2005 13:58:09 -0500, Adam Snodgrass wrote:
> Is SILO aware of RAID or LVM?  I guess I could go back and blow all this
> stuff away and create a non-RAID, non-LVM partition at the start of both
> disks for /boot; suboptimal but I guess I'll take what I can get.

I've had no end of trouble with SILO and RAID-1.  On my first few
attempts to install Debian on the Netra, I ran into what I thought was a
bug in silo.c, and hacking around with it produced varying degrees of
success.  As far as I can tell, the problem resulted from trying to
install the boot block for a degraded /boot array (only /dev/sdb1
active).

Anyway, using the method I described in my previous post, the SILO
installation worked fine.  I can boot from disk0:3 or disk1:3, which is
what I wanted all along (the system can completely survive the loss of
one disk).

S.


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



Re: debianinstaller root+raid+lvm on U30

2005-07-11 Thread Simon Heywood
On Mon, 11 Jul 2005 08:53:55 -0500, Adam Snodgrass wrote:
> I've been trying unsuccessfully for days now to install Debian onto a
> U30 with 2x 9GB Cheetahs using RAID+LVM.  (FWIW, a "normal" install
> works fine).  The major problem is that, no matter which version
> (stable, testing, testing daily image) of the DebianInstaller I use,
> it *refuses* to permit me to create any RAID devices.

I seem to remember (maybe from a previous thread on this list) that the
RAID features of the Debian-Installer don't work on SPARC machines.
I've certainly not been able to do that on my Netra T1 105.  However, a
RAID-1 + LVM set-up is both possible and fairly easy to achieve.  You
just need the benefit of hindsight. :-)

Root on LVM on RAID-1 is slightly harder, but I believe it's possible.
I opted for the simpler arrangement of having my root partition on a
plain RAID-1 array and a separate RAID-1 array containing various LVM
volumes.  I might get round to writing a Web page about it at some
point, but here's the gist of it.

1. Boot the 2.6 Debian-Installer image over the network and install a
minimal system on /dev/sdb.

2. Boot to the new installation and partition and partition /dev/sda
like this:

Disk /dev/sda (Sun disk label): 255 heads, 63 sectors, 17849 cylinders
Units = cylinders of 16065 * 512 bytes

   Device FlagStart   EndBlocks   Id  System
   /dev/sda1 1   523   4192965   fd  Linux raid autodetect
   /dev/sda2   523   654   1052257+  fd  Linux raid autodetect
   /dev/sda3 0 17849 143372092+   5  Whole disk
   /dev/sda4   654 17849 138118837+  fd  Linux raid autodetect

Note that the first partition starts at cylinder 1.  This is to leave
room for the Sun disk label and bootloader.

3. Install Sarge onto an ext3 filesystem in /dev/sda4.  Don't bother
with swap.

4. Boot to this installation ('boot disk0:3' at the OpenBootPROM prompt)
and set things up as desired.  Install lvm2 and mdadm (removing
/etc/mdadm/mdadm.conf).  Build a custom kernel (non-initrd is much
easier) that supports RAID-1 and LVM.  Repartition /dev/sdb to match
/dev/sda, and correct the partition types for /dev/sda.  Reboot.

5. Create RAID-1 arrays: /dev/md0 = /dev/sda1 + /dev/sdb1, /dev/md1 =
/dev/sda2 + /dev/sdb2.  Create an ext3 filesystem in /dev/md0 and create
a swap area in /dev/md1.  Mount /dev/md0 somewhere and copy your root
filesystem there ('cp -ax / /mnt).  Edit /mnt/etc/fstab, and add an
entry to /etc/silo.conf with /dev/md0 as the root filesystem (and
everything else unchanged).  Reboot and select this new boot entry.

6. You should now have /dev/md0 mounted as root.  Complete the root
filesystem switch by editing /etc/silo.conf accordingly, and running
silo.  You may be able to acheive the same effect by running 'silo -r
/mnt' in the previous step.  Add /dev/md1 as swap in /etc/fstab.  Reboot
and make sure everything works.  Convince yourself that you're booting
with the SILO configuration file in /dev/md0, not the one in /dev/sda4.

7. Create the final RAID-1 array (/dev/md2 = /dev/sda4 + /dev/sdb4).
Set it up as an LVM volume group ('pvcreate /dev/md2; vgcreate /dev/md2)
and create whatever logical volumes you wish.

Of course, there's nothing to stop you from putting your swap partition
on LVM.  And as I said before, I believe it's possible to have your root
partition on LVM; you just need to be careful.  Finally, this reply may
not solve your problem at all, but if it helps someone else to achieve
what I spent a few weeks scratching my head over then all is not lost.
:-)

S.


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