Re: OpenBSD ESXi VMware image on Soekris Net5501

2009-05-26 Thread Chris Harries
I know that VMware does all that, I even hear the next release makes you
coffee while you use it and not just instant, as in proper Columbian brewed
coffee...fantastic. But still yes, every once in a while a smart arse pops
his head up and claims he has "heard of this "VMWARE" blah blah blah. It's
nice to know I can bring a little with of laughter to people's lives though,
it sure beats everyone moaning at me as they cannot read e-mails clearly
marked IMPORTANT, DO THIS OR YOUR E-MAIL WONT WORK, then moaning when their
email doesn't work

-Original Message-
From: owner-m...@openbsd.org [mailto:owner-m...@openbsd.org] On Behalf Of
Bob Beck
Sent: 26 May 2009 17:35
To: Michal
Cc: misc@openbsd.org
Subject: Re: OpenBSD ESXi VMware image on Soekris Net5501

* Michal  [2009-05-21 11:01]:

> Oh I didnt realise it was that under-poweredoh now I just feel stupid
> :(

Well, we are all laughing at you. but only because too many of us get hit
with
this bullshit at work.

http://a2.vox.com/6a00d09e512cfdbe2b00f30f5b193a0001-pi

I mean everyone knows Vmware makes everything run faster, use less
power, more securely, gives blowjobs under the table, etc.. And the
great part about your only tool being a hammer is you sure spend less
time deciding what to use so it's more efficient :)



Re: Booting from softraid

2009-05-12 Thread Chris Harries
I went through a massive tonne of pain trying to set up two 1TB hard drives
in mirrored RAID with data and OS. I eventually found out my hardware just
wouldn't work with OpenBSD and RAID but trying on a different machine of
VMware and it worked. Check the archives for mine journey and everyone's
replies to this, it goes back about month-two months. Also, this guide will
help a lot, this is basically how to do it, it worked in 4.4, the only thing
is, he says to use b in the raid (which of course is usually swap, I changed
this to d.

OpenBSD 3.8 cannot boot a kernel on a RAIDframe array, though future
versions of OpenBSD should be able to, so for now we need to split the new
partition into two slices: wd1a, with type 4.2BSD and size around 64MB, from
which we'll boot, and wd1b, with type RAID, which will hold the RAID array.
We will create these partitions with disklabel's -E option:

disklabel -E wd1 

 Also, when you create the partitions with disklabel -E raid0, make sure you
set them to RAID as the type

http://www.linux.com/articles/52713

If you need anymore help, give me a shout, I didn't go through all of that
headache and work for nothing

Chris

-Original Message-
From: owner-m...@openbsd.org [mailto:owner-m...@openbsd.org] On Behalf Of
Stefan Unterweger
Sent: 12 May 2009 11:48
To: misc@openbsd.org
Subject: Booting from softraid

Hello!

I've recently started playing around with the softraid(4) driver, as I
recently noticed that bsd.rd already comes with support for it. What I
want to accomplish is to place as much as possible into the RAID set
(RAID 1, of course), ideally (almost) booting from it.

Up until now I have used ccd(4). Since it isn't possible to create
ccd-containers at install, I've always made disklabel with some space
for the root mount, then one big slice for "the rest", and as soon as
the base install was done bring up the ccd-container, set up the "real"
disklabel there, and move /usr, /var, etc. there, relying on daily(8) to
keep my / mirrored in /altroot.

Now I'm wondering if this whole process could be simplified precisely
with softraid. I've already been able to construct a mirror set at
install. My first naive try was to make a sort of pseudo-disklabel on
the "real" disks, so that the 'a' slice just spans the entire disk,
typed "RAID". Then I instructed bioctl to build a RAID 1-set out of
those two slices. Reboot, bsd.rd still finds it, and now install into
the new sd0.

Of course, this didn't work and fails first thing at boot giving
"ERR M". Reading up about the boot process, I'm now quite sure that it
coulnd't possibly work this way ever since /boot has no way of knowing
about the softraid-container until the kernel is loaded, which precisely
would be /boot's function.

What I now tried was allocating just a very tiny "boot" slice (just
enough space for boot and the kernel), and having installboot(8)
instructed to use *this* bootloader (outside of the RAID-set) to boot.
I now get the kernel to load without problem, just as expected, and the
kernel also finds the RAID-set at sd0 as bsd.rd did, so in theory it
could just go on and boot from there. But instead, it tries to use this
"boot-slice" (wd0a) as it's root device, which of course must fail (and
does so, quite spectacularily).

The boot(8) manpage gives the hint of using '-a' to be able to specify
which drive the kernel should use as it's root drive. This way, I *am*
able to successfully boot into my newly installed system. So this looks
like my idea could at least theoretically work. However, I have not yet
found any way of somehow storing this device somewhere so that I *don't*
have to physically sit there and type in 'sd0' whenever I just happen to
be wanting to boot.

Now, what I want to ask: Is there a way to somehow "force" the root
device of my choice into the kernel, e.g. ` la config(8)? Or is there
maybe a way of specifying it into a boot.conf-stub placed into my
"boot-slice"? Or am I simply wasting my time and should stick to a root
*outside* the RAID-set which daily mirroring into /altroot?


Thanks for any advice,
  Stefan



No OS safe??

2009-05-08 Thread Chris Harries
This is more of a grammar/wording question, but it does go on to the
security of OS's in general. 

 

Was having a read of this;

http://www.cbc.ca/technology/story/2009/04/15/ibotnet-trojan.html

 

And the last comment made me think about OpenBSD. The article closes by
saying "this shows that no OS in inherently safe" but they are comparing Mac
and Windows. Could the same also be said about OpenBSD. This here problem of
downloading a dodgy copy of Photoshop which opens you up for a BotNet is
something that can effect all OS's.but is that completely true? Can the same
thing happen to an OpenBSD machine and is there no way around this?

 

An OS is ultimately about the user as well, My XP machine is fine, but my
friends are all ridden to shit, not so much these days with new'er Windows,
but few years ago everyone's PC was a nightmare, so you take the risk
downloading a file from BitTorrent of course, but is there measures to
prevent this happening in the first place, is OpenBSD as open to this as
Mac/Windows or is it inherently more secure (of course I know it is but im
aiming that question more specifically at this kind of scenario)

 

Chris



Raid + OpenBSD Problem

2009-04-21 Thread Chris Harries
Misc,

 

For several weeks I was battering with Raid 1 and OpenBSD. I had some help
from a few people, specifically Alexis de BRUYN who frequents this list
often, but I never managed to get it working. Basically what happened was it
would seam to work all the way up to copying the data and parity using these
two commands;

 

raidctl -vF component0 raid0
raidctl -vP raid0

 

 When I run the first command, I would get the "quiescence reached." but the
ETA bar wouldn't appear, the system would then hang and just stopped, not
panic or crash.just sit there. Being quite new to OpenBSD I was sure this
was me being stupid, typing a command wrong or something, I was following
this guide http://www.linux.com/articles/52713 so I wasn't sure if something
was wrong in the guide. Eventually, I had to give up and put it down to
hardware problems but never getting a full answer. Alexis de BRUYN was sure
what I was doing was correct, so yesterday I fired up VMware and tried it
again, it worked, the ETA bar came up, I even managed to run the raidctl -vP
raid0 command (something I never got to do before).

 

So, it is a hardware problem; now the motherboard I am using is a Q35
chipset board, quite new chipset really, it's the Gigabyte GA-Q35M-S2 which,
again, isn't a particularly old board. Being very anal, I believe any server
running should have RAID 1 for the OS unless it's doing nothing special at
all, so for RAID to not be working, especially on a board which isn't that
old, is a bit worrying for me. Ok, the board is a desktop board not a server
board (it suffices for this project) but I still think it should be working
with a popular chipset such as this. I want to help out the community if I
can and I wondered if I doing some testing was worth it. Someone could have
a simple answer of "it's not a highly used board so we don't bother" or
something along those lines, but I thought as I've spent some time
investigating this and I have a second Q35 board lying around I can test it
on again, if someone thinks I should carry out some tests of RAID and this
board/chipset, I will go ahead and report my findings. I can send any info
on the board if anyone wants it, to check the details over.

 

Let me know what you think

 

Chris



FW: FW: raidctl -vF component0 raid0

2009-04-14 Thread Chris Harries
Hi Alexis,

No, I didnt try building from source...I think this is something I should
try although having a skim over I'm not seeing what's different but I will
have a detailed look over this late. I am going to start this again with a
different machine hopefully tomorrow just to make sure this isn't hardware
related

Many Thanks
Chris

-Original Message-
From: Alexis de BRUYN [mailto:ale...@de-bruyn.fr]
Sent: 14 April 2009 16:10
To: Chris Harries
Cc: misc@openbsd.org
Subject: Re: FW: raidctl -vF component0 raid0

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Chris,

Did you try to build your system as describe in the FAQ (5.3 - Building
OpenBSD from source, http://www.openbsd.org/faq/faq5.html#Bld), instead
of your following steps ?

>>> Patch source tree to 4.4 PATCH:
>>> cd /usr/src
>>> mount /dev/cd0a /mnt
>>> tar -zxvpf /mnt/src.tar.gz -C /usr/src ./sys
>>> umount /mnt
>>> cvs -qd anon...@anoncvs.ca.openbsd.org:/cvs get -rOPENBSD_4_4 -P src
>>>
>>> Create new kernel with patches:
>>> cd /usr/src
>>> cvs -d anon...@anoncvs.uk.openbsd.org:/cvs up -Pd
>>> make -k cleandir
>>> rm -rf /usr/obj/*
>>> make obj
>>>
>>>
>>> cd /usr/src/etc/mtree
>>> install -c -o root -g wheel -m 660 special /etc/mtree
>>> install -c -o root -g wheel -m 444 4.4BSD.dist /etc/mtree
>>> mtree -qdef /etc/mtree/4.4BSD.dist -p / -u
>>> cd /usr/src/etc
>>> env DESTDIR=/ make distrib-dirs
>>>
>>> cd /usr/src/sys/arch/sparc64/conf/
>>> config GENERIC
>>> cd ../compile/GENERIC
>>> make clean && make depend && make
>>> cp /bsd /bsd.old
>>> cp bsd /bsd
>>> chown root:wheel /bsd
>>> reboot
>>>
>>> cd /usr/src/
>>> make build
>>> cd /dev
>>> cp /usr/src/etc/etc.sparc64/MAKEDEV ./
>>> ./MAKEDEV all
>>>
>>> Sysmerge
>>> reboot
>>>

Did you also try your whole steps on another machine?


Chris Harries a icrit :
> Ok well a d e f g h I are all RAID in disklabel
>
> I did newfs for all parts and raidctl -A root raid brings back;
> Raid0: Autoconfigure: Yes
> Raid0: Root: Yes
>
> So that's seams present and correct. I am guessing I make it autoconfig
then
> do newfs on the parts? But then I guess it doesn't matter which way round
it
> happens does it? Well I did it after newfs and it displayed same output.
>
> And..ermmm yes :( missed that typo out, it should say i386 but you guessed
> that correctly :)
>
> Chris
>
> -Original Message-
> From: owner-m...@openbsd.org [mailto:owner-m...@openbsd.org] On Behalf Of
> Alexis de BRUYN
> Sent: 02 April 2009 21:44
> To: Chris Harries
> Cc: misc@openbsd.org
> Subject: Re: FW: raidctl -vF component0 raid0
>
>>From raidctl(8) :
> "-A root dev
> [snip]
> All components of the set must be of type RAID in the disklabel.
> [Snip]
> the RAID set must have its `a' partition (aka raid[0..n]a) set up.
> "
>
>>> raidctl -A root raid0
>>>
>>> At this point, everything seams as expected
>>>
>>> Create radi0's partitions:
>>> Disklabel -E raid0
>>>
> [snip]
>>> Create the new filesystems:
>>> For x in a d e f g h I; do newfs raid0${x}; done
>>>
>>> Seams to work fine.
>
> Now that your components are of type RAID, you must create your
> filesystems before making the RAID set auto-configurable:
>
> raidctl -A root raid0
>
> and then:
>
> For x in a d e f g h I; do newfs raid0${x}; done
>
> I also noticed:
>
>>> Install 4.4 i386 on to sd0
> [snip]
>>> cd /usr/src/sys/arch/sparc64/conf/
> [snip]
>>> cp /usr/src/etc/etc.sparc64/MAKEDEV ./
>
> Wrong copy/paste?
>
> Chris Harries a icrit :
>> Good call, did that, Still same problem, hangs at same place.
>>
>> All seams correct now:
>>
>> # disklabel -E raid0
>> Initial label editor (enter '?' for help at any prompt)
>>> p
>> OpenBSD area: 0-1952459648; size: 1952459648; free: 719334272
>> #size   offset  fstype [fsize bsize  cpg]
>>   a: 104857600RAID
>>   b:  4194304 10485760swap
>>   c:   19524596480  unused  0 0
>>   d:104857600 14680064RAID
>>   e:   1048576000119537664RAID
>>   f: 20971520   1168113664RAID
>>   g:  2097152   1189085184RAID
>>   h: 20971520   1191182336R

Re: How start Gnome

2009-04-07 Thread Chris Harries
Have you installed gnome-desktop and gdm as well? You can start by simply
typing gdm and enter


Chris

-Original Message-
From: owner-m...@openbsd.org [mailto:owner-m...@openbsd.org] On Behalf Of
Jose P.G
Sent: 07 April 2009 17:17
To: misc@openbsd.org
Subject: How start Gnome

I have installed OpenBSD 4.4 and i have downloaded gnome-session (and
dependences), but i don't know how can i start gnome. Somebody could help
me?

Thank you very much



Re: Using 2 internet connections on OpenBSD Gateway

2009-04-03 Thread Chris Harries
I have heard of some ISP's combining 2 network connections for you. I'm not
sure how this worked or how they did it however, and I fear it could have
just bee 2 lines but going in to 1 when it got to your house, so you still
have 2 IP address's. Unless you combine the 2 lines into 2 outgoing IP
address's, each line has it's own IP Address, but you have 1 singular IP
address as your out going, but you would still be going over different
paths, so problems and you would need to get a 3rd IP address from your ISP,
which they may not give you

-Original Message-
From: owner-m...@openbsd.org [mailto:owner-m...@openbsd.org] On Behalf Of
(private) HKS
Sent: 02 April 2009 22:03
To: misc
Subject: Re: Using 2 internet connections on OpenBSD Gateway

On Thu, Apr 2, 2009 at 4:52 AM, LeiV  wrote:
> Hi,
> I have a openbsd firewall/gateway and behind a webserver, users arrive to
my
webserver via 1 domain name, I have a cable connection 12Mbps down/500Kbps
upthe down speed is OK I dont have so many incoming requests ...but the
up
speed is saturated easily with those requests as my pages have images,
etc...
> I would like to add another internet connection to my openbsd box so I can
increase my upstream bandwitch...it is possible? all my incoming requests
will
come with the same internet connection as I only have 1 domain namecan I
send back the requested pages with both connections to use both upstream
bandwitch ? is so, how can i do it ? any howto?
>
> Thanks
>
> --
> View this message in context:
http://n2.nabble.com/Using-2-internet-connections-on-OpenBSD-Gateway-tp25740
7
5p2574075.html
> Sent from the OpenBSD Misc mailing list archive at Nabble.com.


In a nutshell, no you can't.

Unless your ISP can bond a pair of connections to a single IP, or load
balance incoming traffic over two IPs. Or if you want to do
round-robin DNS load balancing (bad idea) so some incoming requests
hit one IP, some hit the other. Or if you get your own AS and talk BGP
with your providers.

But you can't take requests in to one IP and send the reply out from
another (think about state). A good ISP won't let you send traffic
over their network from an IP they didn't assign you, so you can't
spoof the from-address of the reply.

So unless you're willing to do some heavy lifting on network configuration,
no.

Instead of mucking about with this, you're better off buying a decent
VPS or dedicated server somewhere with a real network connection.

-HKS



Re: FW: raidctl -vF component0 raid0

2009-04-03 Thread Chris Harries
Ok well a d e f g h I are all RAID in disklabel

I did newfs for all parts and raidctl -A root raid brings back;
Raid0: Autoconfigure: Yes
Raid0: Root: Yes

So that's seams present and correct. I am guessing I make it autoconfig then
do newfs on the parts? But then I guess it doesn't matter which way round it
happens does it? Well I did it after newfs and it displayed same output.

And..ermmm yes :( missed that typo out, it should say i386 but you guessed
that correctly :)

Chris

-Original Message-
From: owner-m...@openbsd.org [mailto:owner-m...@openbsd.org] On Behalf Of
Alexis de BRUYN
Sent: 02 April 2009 21:44
To: Chris Harries
Cc: misc@openbsd.org
Subject: Re: FW: raidctl -vF component0 raid0

>From raidctl(8) :
"-A root dev
[snip]
All components of the set must be of type RAID in the disklabel.
[Snip]
the RAID set must have its `a' partition (aka raid[0..n]a) set up.
"

>> raidctl -A root raid0
>>
>> At this point, everything seams as expected
>>
>> Create radi0's partitions:
>> Disklabel -E raid0
>>
[snip]
>>
>> Create the new filesystems:
>> For x in a d e f g h I; do newfs raid0${x}; done
>>
>> Seams to work fine.

Now that your components are of type RAID, you must create your
filesystems before making the RAID set auto-configurable:

raidctl -A root raid0

and then:

For x in a d e f g h I; do newfs raid0${x}; done

I also noticed:

>> Install 4.4 i386 on to sd0
[snip]
>> cd /usr/src/sys/arch/sparc64/conf/
[snip]
>> cp /usr/src/etc/etc.sparc64/MAKEDEV ./

Wrong copy/paste?

Chris Harries a icrit :
> Good call, did that, Still same problem, hangs at same place.
> 
> All seams correct now:
> 
> # disklabel -E raid0
> Initial label editor (enter '?' for help at any prompt)
>> p
> OpenBSD area: 0-1952459648; size: 1952459648; free: 719334272
> #size   offset  fstype [fsize bsize  cpg]
>   a: 104857600RAID
>   b:  4194304 10485760swap
>   c:   19524596480  unused  0 0
>   d:104857600 14680064RAID
>   e:   1048576000119537664RAID
>   f: 20971520   1168113664RAID
>   g:  2097152   1189085184RAID
>   h: 20971520   1191182336RAID
>   i: 20971520   1212153856RAID
> 
> Noticed this in dmesg, not sure if at the half way point reboot though
it's
> anything to worry about.
> 
> Kernelized RAIDframe activated
> cd0(atapiscsi0:0:0): Check Condition (error 0x70) on opcode 0x0
> SENSE KEY: Not Ready
>  ASC/ASCQ: Medium Not Present
> raid0 at root: (RAID Level 1) total number of sectors is 1952459648
(953349
> MB) as root
> softraid0 at root
> softraid0: sd0d can not read metadata version 1847620201, expected 3
> softraid0: sd1d can not read metadata version 8, expected 3
> softraid0: raid0a can not read metadata version 8, expected 3
> softraid0: raid0d can not read metadata version 8, expected 3
> softraid0: raid0e can not read metadata version 8, expected 3
> softraid0: raid0f can not read metadata version 8, expected 3
> softraid0: raid0g can not read metadata version 8, expected 3
> softraid0: raid0h can not read metadata version 8, expected 3
> softraid0: raid0i can not read metadata version 8, expected 3
> root on raid0a
> filesystem type 19 not known.. assuming ffs
> WARNING: / was not properly unmounted
> swapmount: no device
> raid0: Error re-writing parity!
> 
> Chris
> 
> -Original Message-
> From: Alexis de BRUYN [mailto:ale...@de-bruyn.fr]
> Sent: 02 April 2009 14:58
> To: Chris Harries
> Cc: misc@openbsd.org
> Subject: Re: FW: raidctl -vF component0 raid0
> 
>> Create radi0's partitions:
>> Disklabel -E raid0
>>
>> A: 5G / 4.2BSD
>> B: 2048M swap
>> D: 50G /var/mysql 4.2bsd
>> E: 500G /var/vmail 4.2bsd
>> F: 10G /var  4.2bsd
>> G: 1G /tmp   4.2bsd
>> H: 10G /usr  4.2bsd
>> I: 10G /home 4.2bsd
> 
> FS Type must be "RAID" instead of "4.2BSD".
> 
> Chris Harries a icrit :
>> All typoes checked. Now correct...finally,
>>
>> Apologies
>>
>> Chris
>>
>> -Original Message-
>> From: Chris Harries [mailto:ch...@sharescope.co.uk]
>> Sent: 02 April 2009 14:07
>> To: 'Alexis de BRUYN'
>> Subject: RE: raidctl -vF component0 raid0
>>
>> Afternoon,
>>
>> Well on an i386 system with 2 x 1 TB Seagate hard drives, I generally
> follow
>> this method from what I know and have learnt:
>>
>> Install 4.4 i386 on to sd0
>> Reboot
>>
>> Patch source tree to 4.

Re: FW: raidctl -vF component0 raid0

2009-04-02 Thread Chris Harries
Good call, did that, Still same problem, hangs at same place.

All seams correct now:

# disklabel -E raid0
Initial label editor (enter '?' for help at any prompt)
> p
OpenBSD area: 0-1952459648; size: 1952459648; free: 719334272
#size   offset  fstype [fsize bsize  cpg]
  a: 104857600RAID
  b:  4194304 10485760swap
  c:   19524596480  unused  0 0
  d:104857600 14680064RAID
  e:   1048576000119537664RAID
  f: 20971520   1168113664RAID
  g:  2097152   1189085184RAID
  h: 20971520   1191182336RAID
  i: 20971520   1212153856RAID

Noticed this in dmesg, not sure if at the half way point reboot though it's
anything to worry about.

Kernelized RAIDframe activated
cd0(atapiscsi0:0:0): Check Condition (error 0x70) on opcode 0x0
SENSE KEY: Not Ready
 ASC/ASCQ: Medium Not Present
raid0 at root: (RAID Level 1) total number of sectors is 1952459648 (953349
MB) as root
softraid0 at root
softraid0: sd0d can not read metadata version 1847620201, expected 3
softraid0: sd1d can not read metadata version 8, expected 3
softraid0: raid0a can not read metadata version 8, expected 3
softraid0: raid0d can not read metadata version 8, expected 3
softraid0: raid0e can not read metadata version 8, expected 3
softraid0: raid0f can not read metadata version 8, expected 3
softraid0: raid0g can not read metadata version 8, expected 3
softraid0: raid0h can not read metadata version 8, expected 3
softraid0: raid0i can not read metadata version 8, expected 3
root on raid0a
filesystem type 19 not known.. assuming ffs
WARNING: / was not properly unmounted
swapmount: no device
raid0: Error re-writing parity!

Chris

-Original Message-
From: Alexis de BRUYN [mailto:ale...@de-bruyn.fr]
Sent: 02 April 2009 14:58
To: Chris Harries
Cc: misc@openbsd.org
Subject: Re: FW: raidctl -vF component0 raid0

> Create radi0's partitions:
> Disklabel -E raid0
>
> A: 5G / 4.2BSD
> B: 2048M swap
> D: 50G /var/mysql 4.2bsd
> E: 500G /var/vmail 4.2bsd
> F: 10G /var   4.2bsd
> G: 1G /tmp4.2bsd
> H: 10G /usr   4.2bsd
> I: 10G /home 4.2bsd

FS Type must be "RAID" instead of "4.2BSD".

Chris Harries a icrit :
> All typoes checked. Now correct...finally,
>
> Apologies
>
> Chris
>
> -Original Message-
> From: Chris Harries [mailto:ch...@sharescope.co.uk]
> Sent: 02 April 2009 14:07
> To: 'Alexis de BRUYN'
> Subject: RE: raidctl -vF component0 raid0
>
> Afternoon,
>
> Well on an i386 system with 2 x 1 TB Seagate hard drives, I generally
follow
> this method from what I know and have learnt:
>
> Install 4.4 i386 on to sd0
> Reboot
>
> Patch source tree to 4.4 PATCH:
> cd /usr/src
> mount /dev/cd0a /mnt
> tar -zxvpf /mnt/src.tar.gz -C /usr/src ./sys
> umount /mnt
> cvs -qd anon...@anoncvs.ca.openbsd.org:/cvs get -rOPENBSD_4_4 -P src
>
> Create new kernel with patches:
> cd /usr/src
> cvs -d anon...@anoncvs.uk.openbsd.org:/cvs up -Pd
> make -k cleandir
> rm -rf /usr/obj/*
> make obj
>
>
> cd /usr/src/etc/mtree
> install -c -o root -g wheel -m 660 special /etc/mtree
> install -c -o root -g wheel -m 444 4.4BSD.dist /etc/mtree
> mtree -qdef /etc/mtree/4.4BSD.dist -p / -u
> cd /usr/src/etc
> env DESTDIR=/ make distrib-dirs
>
> cd /usr/src/sys/arch/sparc64/conf/
> config GENERIC
> cd ../compile/GENERIC
> make clean && make depend && make
> cp /bsd /bsd.old
> cp bsd /bsd
> chown root:wheel /bsd
> reboot
>
> cd /usr/src/
> make build
> cd /dev
> cp /usr/src/etc/etc.sparc64/MAKEDEV ./
> ./MAKEDEV all
>
> Sysmerge
> reboot
>
> Now we have a full patched system, add raidframe:
> cd /sys/arch/i386/conf
> cat >> GENERIC.RAID << EOF
> include "arch/'uname -m'/conf/GENERIC
> option RAID_AUTOCONFIG
> pseudo-device raid 4
> EOF
>
> Re-create the kernel with patches and raidframe:
> config GENERIC.RAID
> cd ../compile/GENERIC.RAID
> make clean depend && make
> cp /bsd /bsd.noraid
> install -o root -g wheel -m 644 bsd /
>
> Test it boots ok, no problems. Now on to raidframe:
> fdisk -i sd1
> (Yes to the MBR question)
>
> disklabel -E sd1
> Create 512mb A: 4.2BSD
> Create *(rest of space) D: RAID
>
> Create new filesystem and mount:
> newfs sd1a
> mount /dev/sd1a /mnt
> cp /bsd /usr/mdec/boot /mnt
> /usr/mdec/installboot -v /mnt/boot /usr/mdec/biosboot sd1
> umount /mnt
>
> Create raid0.conf
> cat >> /root/raid0.conf << EOF
> START array
> 1 2 0
>
> START disks
> /dev/sd2d
> /dev/sd1d
>
> START layout
> 128 1 1 1
>
&

FW: raidctl -vF component0 raid0

2009-04-02 Thread Chris Harries
All typoes checked. Now correct...finally,

Apologies

Chris

-Original Message-
From: Chris Harries [mailto:ch...@sharescope.co.uk]
Sent: 02 April 2009 14:07
To: 'Alexis de BRUYN'
Subject: RE: raidctl -vF component0 raid0

Afternoon,

Well on an i386 system with 2 x 1 TB Seagate hard drives, I generally follow
this method from what I know and have learnt:

Install 4.4 i386 on to sd0
Reboot

Patch source tree to 4.4 PATCH:
cd /usr/src
mount /dev/cd0a /mnt
tar -zxvpf /mnt/src.tar.gz -C /usr/src ./sys
umount /mnt
cvs -qd anon...@anoncvs.ca.openbsd.org:/cvs get -rOPENBSD_4_4 -P src

Create new kernel with patches:
cd /usr/src
cvs -d anon...@anoncvs.uk.openbsd.org:/cvs up -Pd
make -k cleandir
rm -rf /usr/obj/*
make obj


cd /usr/src/etc/mtree
install -c -o root -g wheel -m 660 special /etc/mtree
install -c -o root -g wheel -m 444 4.4BSD.dist /etc/mtree
mtree -qdef /etc/mtree/4.4BSD.dist -p / -u
cd /usr/src/etc
env DESTDIR=/ make distrib-dirs

cd /usr/src/sys/arch/sparc64/conf/
config GENERIC
cd ../compile/GENERIC
make clean && make depend && make
cp /bsd /bsd.old
cp bsd /bsd
chown root:wheel /bsd
reboot

cd /usr/src/
make build
cd /dev
cp /usr/src/etc/etc.sparc64/MAKEDEV ./
./MAKEDEV all

Sysmerge
reboot

Now we have a full patched system, add raidframe:
cd /sys/arch/i386/conf
cat >> GENERIC.RAID << EOF
include "arch/'uname -m'/conf/GENERIC
option RAID_AUTOCONFIG
pseudo-device raid 4
EOF

Re-create the kernel with patches and raidframe:
config GENERIC.RAID
cd ../compile/GENERIC.RAID
make clean depend && make
cp /bsd /bsd.noraid
install -o root -g wheel -m 644 bsd /

Test it boots ok, no problems. Now on to raidframe:
fdisk -i sd1
(Yes to the MBR question)

disklabel -E sd1
Create 512mb A: 4.2BSD
Create *(rest of space) D: RAID

Create new filesystem and mount:
newfs sd1a
mount /dev/sd1a /mnt
cp /bsd /usr/mdec/boot /mnt
/usr/mdec/installboot -v /mnt/boot /usr/mdec/biosboot sd1
umount /mnt

Create raid0.conf
cat >> /root/raid0.conf << EOF
START array
1 2 0

START disks
/dev/sd2d
/dev/sd1d

START layout
128 1 1 1

START queue
fifo 100
EOF

raidctl -C /root/raid0.conf raid0
raidctl -I 0904020 (the date) raid0

Check and add arrays:
raidctl -s raid0
raidctl -A root raid0

At this point, everything seams as expected

Create radi0's partitions:
Disklabel -E raid0

A: 5G / 4.2BSD
B: 2048M swap
D: 50G /var/mysql 4.2bsd
E: 500G /var/vmail 4.2bsd
F: 10G /var 4.2bsd
G: 1G /tmp  4.2bsd
H: 10G /usr 4.2bsd
I: 10G /home 4.2bsd

Create the new filesystems:
For x in a d e f g h I; do newfs raid0${x}; done

Seams to work fine.

Mount and copy RAID:
mount /dev/raid0a /mnt
cd /mnt
mkdir usr tmp home var var/mysql var/vmail
mount /dev/raid0d /mnt/var/mysql
mount /dev/raid0e /mnt/var/vmail
mount /dev/raid0f /mnt/var
mount /dev/raid0g /mnt/tmp
mount /dev/raid0h /mnt/usr
mount /dev/raid0i /mnt/home

Transfer raid:
cd /mnt
tar -Xcpf - / | tar -xvpf -
rm /mnt/etc/fstab
cat >> /mnt/etc/fstab << EOF
/dev/raid0a / ffs rw 1 1
/dev/raid0d /var/mysql ffs rw 1 2
/dev/raid0e /var/vmail ffs rw 1 2
/dev/raid0f /var ffs rw 1 2
/dev/raid0g /tmp ffs rw 1 2
/dev/raid0h /usr ffs rw 1 2
/dev/raid0i /home ffs rw 1 2
EOF

Umount partitions and reboot:
umount /mnt/*; umount /mnt
halt (reboot)

boot> boot sd1a:/bsd to boot to 2nd hard disk

Check, mirror, hot add, reconstruct:
mount && uname -v && raidctl -s raid0
disklabel sd1 > /root/disklabel.sd1
disklabel -R sd0 /root/disklabel.sd1
raidctl -a /dev/sd0d raid0
raidctl -vF component0 raid0

And there is hangs, and displays

> RECON: initiating reconstruction on row - col 0 -> spare at row 0 col 2.
> Quiescence reached...

How does this differ from what you do?

Many thanks, again
Chris

-Original Message-
From: Alexis de BRUYN [mailto:ale...@de-bruyn.fr]
Sent: 02 April 2009 13:39
To: Chris Harries
Cc: misc@openbsd.org
Subject: Re: raidctl -vF component0 raid0

Hello Chris,

Before setting up your mirror, I recommanded you to read "RAID options
for OpenBSD" from the OpenBSD FAQ
(http://www.openbsd.org/faq/faq14.html#RAID) and then the following
manuals (which I did when I teached myself making a RAIDFRAME mirror on
4.2) :

* raid(4),
* raidctl(8),
* newfs(8),
* disklabel(8),
* fdisk(8),
* boot(8),
* installboot(8),
* dd(1),

With the same steps, my configuration is working on 4.3 & 4.4 (amd64).

You can also *precisely* describe your steps (commands and traces), and
in this case, I could easely help you.

Best regards,

Chris Harries a icrit :
> Thank you for your advice Alexis, I have now tried to do this using wd2d
and
> it does indeed make sense. I am still having problems however. Everything
> seams to go fine, to what the 2 guides I am following suggest, but when
> reconstructing the data is where I get stuck!
>
> When running raidctl -vF component0 raid0 I see
>
> RECON: initiati

Re: raidctl -vF component0 raid0

2009-04-02 Thread Chris Harries
Mr Roberts,

I just wanted to verify something which you stated in this e-mail

If you *only* want to do RAID 1 (mirroring), and you are not booting
to the volume, you might be better off looking at `man softraid`

I am looking at softraid, and can make a mirroed raid of 2 HDD's with a 3rd
holding the OS, but I am guessing you meant I cannot have 2 drives in
mirror, built with softraid and bioctl, that the OS is on?

Many Thanks
Chris

-Original Message-
From: owner-m...@openbsd.org [mailto:owner-m...@openbsd.org] On Behalf Of
J.C. Roberts
Sent: 30 March 2009 14:01
To: Chris Harries
Cc: misc@openbsd.org
Subject: Re: raidctl -vF component0 raid0

On Mon, 30 Mar 2009 13:32:41 +0100 "Chris Harries"
 wrote:

> Thank you for your time.
> 
> This I did find weird, wondering why on this guide, it is setting B
> to RAID and not swap...on boot it does say it cannot find swap but
> this guide did come recommended...
> 
> It says
> 
> A: 144522 4.2BSD (this is the 64MB drive to boot off
> B: 1953375480 RAID (this is the RAID data partition
> C: 1953523055 UNUSED
> 
> I am guessing you meant wd0 and wd1, the guide suggested making wd2
> as the fake device as I am creating the install on wd0, putting over
> to wd1 then booting to wd1 and initializing wd0 again and create the
> raid, in a very cut way to explain it
> 
> Chris
> 
> > -Original Message-
> > From: J.C. Roberts [mailto:list-...@designtools.org] 
> > Sent: 30 March 2009 13:16
> > To: Chris Harries
> > Cc: misc@openbsd.org
> > Subject: Re: raidctl -vF component0 raid0
> > 
> > On Mon, 30 Mar 2009 09:43:31 +0100 "Chris Harries"
> >  wrote:
> > 
> > START disks
> > /dev/wd2b # the fake device
> > /dev/wd1b
> >  
> > 
> > The above looks weird. The 'b' partition is typically swap.
> > 
> > What do the following commands tell you?
> > 
> > $ sudo disklabel -n wd1
> > 
> > $ sudo disklabel -n wd2
> > 
> > 
> > -- 
> > J.C. Roberts
> > 


No. I meant what I said. You have wd1b and wd2b clearly stated in your
config file, "/root/raid0.conf". Unless you've already disklabel'd
the wd1 and wd2 disks to have a 'b' partition, then something is
terribly wrong.

There is a very good reason why many people around here have a bad view
of "how-to" documents. Theses supposed "how-to" documents you find on
the web are often completely wrong. OpenBSD strives to have accurate and
useful documentation in it's manuals. You should always start by reading
the OpenBSD manuals first.

$ man raidctl

If you *only* want to do RAID 1 (mirroring), and you are not booting
to the volume, you might be better off looking at `man softraid` --This
is the new RAID functionality being built into OpenBSD. Using softraid
will save you from building a custom kernel with RAIDframe support,
but be sure to read the CAVEATS section of the softraid man page to make
sure softraid fits your needs.

-- 
J.C. Roberts



Re: raidctl -vF component0 raid0

2009-04-01 Thread Chris Harries
Thank you for your advice Alexis, I have now tried to do this using wd2d and
it does indeed make sense. I am still having problems however. Everything
seams to go fine, to what the 2 guides I am following suggest, but when
reconstructing the data is where I get stuck!

When running raidctl -vF component0 raid0 I see

RECON: initiating reconstruction on row - col 0 -> spare at row 0 col 2.
Quiescence reached...

And that is where it stops, just sitting there. I am guessing when you do
the command it brings up a bar of how much it has reconstructed with maybe
an ETA, but I don't see this, no hard drive light flashing.

Befor that command I do

disklabel wd1 > /root/disklabel.wd1
disklabel -R wd0 /root/disklabel.wd1
raidctl -a /dev/wd0b raid0

Which seams fine with me. Did you following a guide to teach your self this?
I have tried reading over man raidctl but it's now showing me anything more
then I know already and what I am not doing correct to cause this
reconstruction to just hang...? Any ideas

Many Thanks
Chris
-Original Message-
From: Alexis de BRUYN [mailto:ale...@de-bruyn.fr]
Sent: 31 March 2009 12:33
To: Chris Harries
Cc: misc@openbsd.org
Subject: Re: raidctl -vF component0 raid0

> > A: 144522 4.2BSD (this is the 64MB drive to boot off
> > B: 1953375480 RAID (this is the RAID data partition
> > C: 1953523055 UNUSED

Using 'b' (even 'c') is not a good idea for me too.

Try on your second disk (mirror), before configuring RAID, with the two
following partitions:

 a:512M  4.2BSD   Boot partition
 c:   -  unused   Entire drive
 d:   *  RAID Everything except boot kernel


>> >> START disks
>> >> /dev/wd2b # the fake device
>> >> /dev/wd1b
>> >>

And then:

START disks
/dev/wd2d
/dev/wd1d

It works for my several configurations all the times.

Chris Harries a icrit :
> Thank you for your time.
>
> This I did find weird, wondering why on this guide, it is setting B to
RAID
> and not swap...on boot it does say it cannot find swap but this guide did
> come recommended...
>
> It says
>
> A: 144522 4.2BSD (this is the 64MB drive to boot off
> B: 1953375480 RAID (this is the RAID data partition
> C: 1953523055 UNUSED
>
> I am guessing you meant wd0 and wd1, the guide suggested making wd2 as the
> fake device as I am creating the install on wd0, putting over to wd1 then
> booting to wd1 and initializing wd0 again and create the raid, in a very
cut
> way to explain it
>
> Chris
>
> -Original Message-
> From: J.C. Roberts [mailto:list-...@designtools.org]
> Sent: 30 March 2009 13:16
> To: Chris Harries
> Cc: misc@openbsd.org
> Subject: Re: raidctl -vF component0 raid0
>
> On Mon, 30 Mar 2009 09:43:31 +0100 "Chris Harries"
>  wrote:
>
>> START disks
>> /dev/wd2b # the fake device
>> /dev/wd1b
>>
>
> The above looks weird. The 'b' partition is typically swap.
>
> What do the following commands tell you?
>
>   $ sudo disklabel -n wd1
>
>   $ sudo disklabel -n wd2
>
>

--
Alexis de BRUYN
email : ale...@de-bruyn.fr



Re: raidctl -vF component0 raid0

2009-03-31 Thread Chris Harries
Thank you for your reply Alexis, I did suspect with it being B it was an
issue and I should use D, so I did this, but when issuing raidctl -vF
component0 raid0

It still just sits there and says about quescience reached but doesn't bring
up the reconstruction bar or seam to reconstruct it. I'm learning more as I
do along, but still having a hard time working out where I am going wrong,
every guide I have seen has been similar to this one other then a few
details here and there

chris

-Original Message-
From: Alexis de BRUYN [mailto:ale...@de-bruyn.fr]
Sent: 31 March 2009 12:33
To: Chris Harries
Cc: misc@openbsd.org
Subject: Re: raidctl -vF component0 raid0

> > A: 144522 4.2BSD (this is the 64MB drive to boot off
> > B: 1953375480 RAID (this is the RAID data partition
> > C: 1953523055 UNUSED

Using 'b' (even 'c') is not a good idea for me too.

Try on your second disk (mirror), before configuring RAID, with the two
following partitions:

 a:512M  4.2BSD   Boot partition
 c:   -  unused   Entire drive
 d:   *  RAID Everything except boot kernel


>> >> START disks
>> >> /dev/wd2b # the fake device
>> >> /dev/wd1b
>> >>

And then:

START disks
/dev/wd2d
/dev/wd1d

It works for my several configurations all the times.

Chris Harries a icrit :
> Thank you for your time.
>
> This I did find weird, wondering why on this guide, it is setting B to
RAID
> and not swap...on boot it does say it cannot find swap but this guide did
> come recommended...
>
> It says
>
> A: 144522 4.2BSD (this is the 64MB drive to boot off
> B: 1953375480 RAID (this is the RAID data partition
> C: 1953523055 UNUSED
>
> I am guessing you meant wd0 and wd1, the guide suggested making wd2 as the
> fake device as I am creating the install on wd0, putting over to wd1 then
> booting to wd1 and initializing wd0 again and create the raid, in a very
cut
> way to explain it
>
> Chris
>
> -Original Message-
> From: J.C. Roberts [mailto:list-...@designtools.org]
> Sent: 30 March 2009 13:16
> To: Chris Harries
> Cc: misc@openbsd.org
> Subject: Re: raidctl -vF component0 raid0
>
> On Mon, 30 Mar 2009 09:43:31 +0100 "Chris Harries"
>  wrote:
>
>> START disks
>> /dev/wd2b # the fake device
>> /dev/wd1b
>>
>
> The above looks weird. The 'b' partition is typically swap.
>
> What do the following commands tell you?
>
>   $ sudo disklabel -n wd1
>
>   $ sudo disklabel -n wd2
>
>

--
Alexis de BRUYN
email : ale...@de-bruyn.fr



Re: raidctl -vF component0 raid0

2009-03-30 Thread Chris Harries
Thank you for your time.

This I did find weird, wondering why on this guide, it is setting B to RAID
and not swap...on boot it does say it cannot find swap but this guide did
come recommended...

It says

A: 144522 4.2BSD (this is the 64MB drive to boot off
B: 1953375480 RAID (this is the RAID data partition
C: 1953523055 UNUSED

I am guessing you meant wd0 and wd1, the guide suggested making wd2 as the
fake device as I am creating the install on wd0, putting over to wd1 then
booting to wd1 and initializing wd0 again and create the raid, in a very cut
way to explain it

Chris

-Original Message-
From: J.C. Roberts [mailto:list-...@designtools.org] 
Sent: 30 March 2009 13:16
To: Chris Harries
Cc: misc@openbsd.org
Subject: Re: raidctl -vF component0 raid0

On Mon, 30 Mar 2009 09:43:31 +0100 "Chris Harries"
 wrote:

> START disks
> /dev/wd2b # the fake device
> /dev/wd1b
>  

The above looks weird. The 'b' partition is typically swap.

What do the following commands tell you?

$ sudo disklabel -n wd1

$ sudo disklabel -n wd2


-- 
J.C. Roberts



raidctl -vF component0 raid0

2009-03-30 Thread Chris Harries
List,

 

I am having problems building my 2 x 1 TB mirror RAID in openBSD.

 

When I run this command "raidctl -vF component0 raid0" on the screen it says
"quiescence reached" and the system hangs. I can type commands but they do
nothing, type top and enter and it just sits there, press ctrl C and it just
says ^C, I can ping it fine, I can press returns till the cows come home but
nothing happens. If I try ssh'ing in, putty just sits there.it doesn't time
out, but no login prompt comes up. I was thinking, it would take a long time
to do as it is 2 x 1TB drives but I started this Saturday afternoon, back in
the office Monday morning and it's still like this. 
 
I am following the guide from this site
http://www.linux.com/articles/52713#commentthis running OpenBSD 4.4 and they
are SATA drives. They have no problem running singularly.
 
The guide is pretty much followed word for word, I've never setup software
RAID on OpenBSD before so I don't know any better. Here is some info that
might be useful
 
cat >> GENERIC.RAID << EOF
include "arch/'uname -m'/conf/GENERIC # include GENERIC configuration
option RAID_AUTOCONFIG # automatically configure RAIDframe arrays on boot
pseudo-device raid 4 # RAIDframe disk driver
EOF
 
config GENERIC.RAID
cd ../compile/GENERIC.RAID
make clean depend && make
cp /bsd /bsd.noraid
install -o root -g wheel -m 644 bsd /
 
newfs wd1a
mount /dev/wd1a /mnt
cp /bsd /usr/mdec/boot /mnt
/usr/mdec/installboot -v /mnt/boot /usr/mdec/biosboot wd1
umount /mnt
 
cat >> /root/raid0.conf << EOF
START array
# numRow numCol numSpare
1 2 0
 
START disks
/dev/wd2b # the fake device
/dev/wd1b
 
START layout
128 1 1 1
 
START queue
fifo 100
EOF
 
raidctl -C /root/raid0.conf raid0
raidctl -I 0903270 raid0
 

Any more information, please do not hesitate to ask :-)

 

Many Thanks

Chris