Re: Softraid activation on OpenBSD 4.4

2008-11-05 Thread Raimo Niskanen
On Wed, Nov 05, 2008 at 10:45:58AM +0100, Christophe Rioux wrote:
 Hi
 
 I follow my mail from september were I tried to install the soft raid on
 OpenBSD 4.3. As we saw, this couldn't work.

Do not mix up softraid with RaidFrame.
You use RaidFrame (raidctl below).
softraid use bioctl.
They are competing products.

 
 I redone the procedure with the new released version, and it seems to be
 better:
 
 Extraction of dmesg:
 
 softraid0 at root
 root on wd0a swap on wd0b dump on wd0b
 raid0: Component /dev/wd0d being configured at row: 0 col: 0
  Row: 0 Column: 0 Num Rows: 1 Num Columns: 2
  Version: 2 Serial Number: 100 Mod Counter: 128
  Clean: Yes Status: 0
 raid0: Component /dev/wd1d being configured at row: 0 col: 1
  Row: 0 Column: 1 Num Rows: 1 Num Columns: 2
  Version: 2 Serial Number: 100 Mod Counter: 128
  Clean: Yes Status: 0
 raid0 at root
 
 The last question I have is: it seems that I actually boot on wd0a, which is
 not a RAID disk. How can I boot on raid0a ?
 

It seems the raid autoconfig does not work.
What does raidctl -vs raid0 say? An example from an older release:
raid0 Components:
   /dev/wd0d: optimal
   /dev/wd1d: optimal
No spares.
Component label for /dev/wd0d:
   Row: 0, Column: 0, Num Rows: 1, Num Columns: 2
   Version: 2, Serial Number: 2007050900, Mod Counter: 219
   Clean: No, Status: 0
   sectPerSU: 128, SUsPerPU: 1, SUsPerRU: 1
   Queue size: 100, blocksize: 512, numBlocks: 153150336
   RAID Level: 1
   Autoconfig: Yes
   Root partition: Yes
   Last configured as: raid0
Component label for /dev/wd1d:
   Row: 0, Column: 1, Num Rows: 1, Num Columns: 2
   Version: 2, Serial Number: 2007050900, Mod Counter: 219
   Clean: No, Status: 0
   sectPerSU: 128, SUsPerPU: 1, SUsPerRU: 1
   Queue size: 100, blocksize: 512, numBlocks: 153150336
   RAID Level: 1
   Autoconfig: Yes
   Root partition: Yes
   Last configured as: raid0
Parity status: clean
Reconstruction is 100% complete.
Parity Re-write is 100% complete.
Copyback is 100% complete.

Note Autoconfig: Yes and Root Partition: Yes.

Did you build your kernel with RAID autoconfig support?


 I made a test: creating a file after booting on hd0a, and this file doesn't
 exist in hd1a.
 
 The commands I done to build the raid:
 
 raidctl -C /etc/raid0.conf raid0
 raidctl -I 100 raid0
 raidctl -iv raid0
 disklabel -E raid0
 newfs /dev/rraid0a
 newfs /dev/rraid0d
 mount /dev/raid0a /mnt
 cd /mnt
 dump -0f - / | restore -rf -
 raidctl -A yes raid0
 raidctl -A root raid0
 echo /dev/raid0a / ffs rw 1 1  /mnt/etc/fstab
 echo /dev/raid0b none swap sw 0 0  /mnt/etc/fstab
 echo /dev/raid0d /home ffs rw,nodev,nosuid,softdep 1 2  /mnt/etc/fstab
 umount /mnt
 Reboot
 
 Thanks for the reply
 
 Regards

-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB



Re: Softraid activation on OpenBSD 4.4

2008-11-05 Thread Christophe Rioux
  I redone the procedure with the new released version, and 
 it seems to be
  better:
  
  Extraction of dmesg:
  
  softraid0 at root
  root on wd0a swap on wd0b dump on wd0b
  raid0: Component /dev/wd0d being configured at row: 0 col: 0
   Row: 0 Column: 0 Num Rows: 1 Num Columns: 2
   Version: 2 Serial Number: 100 Mod Counter: 128
   Clean: Yes Status: 0
  raid0: Component /dev/wd1d being configured at row: 0 col: 1
   Row: 0 Column: 1 Num Rows: 1 Num Columns: 2
   Version: 2 Serial Number: 100 Mod Counter: 128
   Clean: Yes Status: 0
  raid0 at root
  
  The last question I have is: it seems that I actually boot 
 on wd0a, which is
  not a RAID disk. How can I boot on raid0a ?
  
 
 It seems the raid autoconfig does not work.
 What does raidctl -vs raid0 say? 
= same as your result

raid0 Components:
   /dev/wd0d: optimal
   /dev/wd1d: optimal
No spares.
Component label for /dev/wd0d:
   Row: 0, Column: 0, Num Rows: 1, Num Columns: 2
   Version: 2, Serial Number: 100, Mod Counter: 143
   Clean: No, Status: 0
   sectPerSU: 128, SUsPerPU: 1, SUsPerRU: 1
   Queue size: 100, blocksize: 512, numBlocks: 17799936
   RAID Level: 1
   Autoconfig: Yes
   Root partition: Yes
   Last configured as: raid0
Component label for /dev/wd1d:
   Row: 0, Column: 1, Num Rows: 1, Num Columns: 2
   Version: 2, Serial Number: 100, Mod Counter: 143
   Clean: No, Status: 0
   sectPerSU: 128, SUsPerPU: 1, SUsPerRU: 1
   Queue size: 100, blocksize: 512, numBlocks: 17799936
   RAID Level: 1
   Autoconfig: Yes
   Root partition: Yes
   Last configured as: raid0
Parity status: clean
Reconstruction is 100% complete.
Parity Re-write is 100% complete.
Copyback is 100% complete.


 Did you build your kernel with RAID autoconfig support?

I build the kernel with following options:
option RAID_AUTOCONFIG
pseudo-device raid 4
 
And my /etc/raid0.conf:

START array
1 2 0
START disks
/dev/wd0d
/dev/wd1d
START layout
128 1 1 1
START queue
fifo 100

The creation of the RAID:
raidctl -C /etc/raid0.conf raid0
raidctl -I 100 raid0
raidctl -iv raid0



Re: : Softraid activation on OpenBSD 4.4

2008-11-05 Thread 'Raimo Niskanen'
On Wed, Nov 05, 2008 at 12:30:58PM +0100, Christophe Rioux wrote:
   I redone the procedure with the new released version, and 
  it seems to be
   better:
   
   Extraction of dmesg:
   
   softraid0 at root
   root on wd0a swap on wd0b dump on wd0b
   raid0: Component /dev/wd0d being configured at row: 0 col: 0
Row: 0 Column: 0 Num Rows: 1 Num Columns: 2
Version: 2 Serial Number: 100 Mod Counter: 128
Clean: Yes Status: 0
   raid0: Component /dev/wd1d being configured at row: 0 col: 1
Row: 0 Column: 1 Num Rows: 1 Num Columns: 2
Version: 2 Serial Number: 100 Mod Counter: 128
Clean: Yes Status: 0
   raid0 at root
   
   The last question I have is: it seems that I actually boot 
  on wd0a, which is
   not a RAID disk. How can I boot on raid0a ?
   
  
  It seems the raid autoconfig does not work.
  What does raidctl -vs raid0 say? 
 = same as your result
 
 raid0 Components:
/dev/wd0d: optimal
/dev/wd1d: optimal
 No spares.
 Component label for /dev/wd0d:
Row: 0, Column: 0, Num Rows: 1, Num Columns: 2
Version: 2, Serial Number: 100, Mod Counter: 143
Clean: No, Status: 0
sectPerSU: 128, SUsPerPU: 1, SUsPerRU: 1
Queue size: 100, blocksize: 512, numBlocks: 17799936
RAID Level: 1
Autoconfig: Yes
Root partition: Yes
Last configured as: raid0
 Component label for /dev/wd1d:
Row: 0, Column: 1, Num Rows: 1, Num Columns: 2
Version: 2, Serial Number: 100, Mod Counter: 143
Clean: No, Status: 0
sectPerSU: 128, SUsPerPU: 1, SUsPerRU: 1
Queue size: 100, blocksize: 512, numBlocks: 17799936
RAID Level: 1
Autoconfig: Yes
Root partition: Yes
Last configured as: raid0
 Parity status: clean
 Reconstruction is 100% complete.
 Parity Re-write is 100% complete.
 Copyback is 100% complete.
 
 
  Did you build your kernel with RAID autoconfig support?
 
 I build the kernel with following options:
 option RAID_AUTOCONFIG
 pseudo-device raid 4
  
 And my /etc/raid0.conf:
 
 START array
 1 2 0
 START disks
 /dev/wd0d
 /dev/wd1d
 START layout
 128 1 1 1
 START queue
 fifo 100
 
 The creation of the RAID:
 raidctl -C /etc/raid0.conf raid0
 raidctl -I 100 raid0
 raidctl -iv raid0

Have you tried boot -a to see if you can select raid0a?
http://marc.info/?l=openbsd-miscm=122153087119929w=2

If that works it seems raidframe root disk is still
not operational.
http://marc.info/?l=openbsd-miscm=120855938821758w=2

Note that you can still create a setup that does not
raid the root disk, just all others. And then use
the /altroot backup for the root disk, preferably
/altroot on wd1a. Raided root disk might be regarded
as a doubtful feature anyway since the kernel will
be loaded from wd0 anyway, and if it dies you need
a bootable wd1.

-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB



Re: : Softraid activation on OpenBSD 4.4

2008-11-05 Thread Christophe Rioux
 Note that you can still create a setup that does not
 raid the root disk, just all others. And then use
 the /altroot backup for the root disk, preferably
 /altroot on wd1a. Raided root disk might be regarded
 as a doubtful feature anyway since the kernel will
 be loaded from wd0 anyway, and if it dies you need
 a bootable wd1.

Nice information. I know what I'll do:
* wd0a  wd1a: OpenBSD 4.4
* raid0a: mount point /etc
* raid0d: mount point /home
* raid0e: mount point /usr
* raid0f: mount point /root
* raid0g: mount point /var

= so I can start on both wd0a and wd1a and after booting my mount points
are on the raid disk.

Thanks for the information and idea



Re: : Softraid activation on OpenBSD 4.4

2008-11-05 Thread Stuart Henderson
On 2008-11-05, Christophe Rioux [EMAIL PROTECTED] wrote:
 Note that you can still create a setup that does not
 raid the root disk, just all others. And then use
 the /altroot backup for the root disk, preferably
 /altroot on wd1a. Raided root disk might be regarded
 as a doubtful feature anyway since the kernel will
 be loaded from wd0 anyway, and if it dies you need
 a bootable wd1.

 Nice information. I know what I'll do:
 * wd0a  wd1a: OpenBSD 4.4
 * raid0a: mount point /etc

/etc lives on the root filesystem.