Re: Raid configuration help.

2011-06-28 Thread Nigel Taylor
On 06/28/11 21:53, Zeb Packard wrote:
>> Overwriting file in /etc could cause all sorts of problems, rc
>> scripts corrupted could leave you in single user mode for example.
>> 
>> 
>> Regards
>> 
>> Nigel Taylor
>> 
> 
> Thanks a bunch for the tips and encouragement. I was using the
> tutorial at http://www.argon18.com/raid_openbsd.html This tutorial
> was very useful up until I reached the fstab file, the configuration
> given does not seem to work. My new fstab file is as follows.
> 
> /dev/sd0a / ffs rw 1 1 /dev/sd0b none swap sw 0 0 /dev/raid0d /home
> ffs rw,nodev,nosuid,softdep 1 2
> 
> using either a full raid map (/dev/raid0a / ...) or mapping /home to 
> /dev/sd0d would cause the system to boot single user or call for
> fsck to be run.
Your putting the raid partitions in the fstab of the system recovery
partition. You want to boot without raid partitions to recover the raiddisk.
> 
> Another question regarding the raid0.conf file given in the
> tutorial. It's listed as.
> 
> START array 1 2 0 START disks /dev/sd0d /dev/sd1d START layout 128 1
> 1 1 START queue fifo 100
> 
> My question is why aren't I also raiding the sd0a and sd1a
> partitions?

OpenBSD cannot boot off a RaidFrame disk directly, so what you do is
have a small system boot partition on each disk which is sd0a and sd1a
(backup) 256Mb in the instructions in which a base system is installed.
This contains the bsd which used when OpenBSD boots.

After the initial booting it switches the root partition to the raid
partition raid0a. Normally will display raid0a as the default, but you
could enter sd0a. Or force prompting use boot -a at the Boot> prompt.

sd0a / sd1a partitions are for recovery when something goes wrong with
the raid. They are not used during the normal running of the raid
system, apart from the initial boot.

> Does this mean I need to run a dump -0f- command whenever I make
> changes to the root partition?
If you make changes on the partition sd0a then a backup should be made
on sd1a.

You should have Boot> boot -a
when prompted for the root partition enter sd0a
Then mount /dev/sd1a /mnt etc as per the article.

> The fstab configuration given in the tutorial gets wiped out on
> reboot. So, I can't assume that part of the tutorial is useful, but
> here's the configuration given for the secondary disk.
The fstab is created on the raid root partition raid0a, this is required

You effectively use the recovery system in sd0a, and mount the raid
system under /mnt

Use dump / restore to copy over the system, then setup the raid
partitions to mount in /mnt/etc/fstab which will become /etc/fstab when
running with the raid disks.

There are two fstab's the one for running the raid system, and the one
for recovering the raid system.
> 
> /dev/raid0a / ffs rw 1 1 /dev/raid0b none swap sw 0 0 /dev/raid0d
> /home rw,nodev,nosuid,softdep 1 2
> 
> Right now when I add raid0a to fstab it will boot single user, but
> raid0a is not in my raid0.conf file.
raid0.conf is for the raid0 disk that disk contains partitions such a
raid0a. raid0.conf should contain the two partitions sd0d, sd1d which
make up the raid0 disk.


> 
> 

Note - This is the old raidframe. (OpenBSD tech mail list recently
talked about removing this, you may want to consider switching to softraid).


Regards

Nigel Taylor



Re: Raid configuration help.

2011-06-28 Thread Benny Lofgren
On 2011-06-28 22.53, Zeb Packard wrote:
>> Overwriting file in /etc could cause all sorts of problems, rc scripts
>> corrupted could leave you in single user mode for example.
> Thanks a bunch for the tips and encouragement.
> I was using the tutorial at http://www.argon18.com/raid_openbsd.html
> This tutorial was very useful up until I reached the fstab file, the
> configuration given does not seem to work. My new fstab file is as
> follows.

To make a long story short, I'd abandon the work you've done so far if
I were you, and start over using softraid(4) instead. (man softraid,
man bioctl, man disklabel).

There are some drawbacks to using softraid at the moment - for example
you can't boot from a softraid partition and (IIRC) you can't mirror
the root partition (but see man daily for mentions of /altroot).

But using RAIDframe (raid(4)) as you're doing now is really a pain in
the ***, even if it undoubtedly will do everything you want when properly
set up. It is pathetically tricky to set it up to raid the root partition
and to automount it at boot, but it is doable. Don't know of any up-to-
date guides on how to do it though.

I'm off to bed now, but if you decide to persist with your chosen
path and nobody else have given you a hand by then, I'll help you
tomorrow. :-)


Regards,
/Benny

> /dev/sd0a / ffs rw 1 1
> /dev/sd0b none swap sw 0 0
> /dev/raid0d /home ffs rw,nodev,nosuid,softdep 1 2
> 
> using either a full raid map (/dev/raid0a / ...) or mapping /home to
> /dev/sd0d would cause the system to boot single user or call for fsck
> to be run.
> 
> Another question regarding the raid0.conf file given in the tutorial.
> It's listed as.
> 
> START array
> 1 2 0
> START disks
> /dev/sd0d
> /dev/sd1d
> START layout
> 128 1 1 1
> START queue
> fifo 100
> 
> My question is why aren't I also raiding the sd0a and sd1a partitions?
> Does this mean I need to run a dump -0f- command whenever I
> make changes to the root partition?
> 
> The fstab configuration given in the tutorial gets wiped out on reboot.
> So, I can't assume that part of the tutorial is useful, but here's the
> configuration given for the secondary disk.
> 
> /dev/raid0a / ffs rw 1 1
> /dev/raid0b none swap sw 0 0
> /dev/raid0d /home rw,nodev,nosuid,softdep 1 2
> 
> Right now when I add raid0a to fstab it will boot single user, but raid0a
> is not in my raid0.conf file.
> 

-- 
internetlabbet.se / work:   +46 8 551 124 80  / "Words must
Benny Lvfgren/  mobile: +46 70 718 11 90 /   be weighed,
/   fax:+46 8 551 124 89/not counted."
   /email:  benny -at- internetlabbet.se



Re: Raid configuration help.

2011-06-28 Thread Zeb Packard
> Overwriting file in /etc could cause all sorts of problems, rc scripts
> corrupted could leave you in single user mode for example.
>
>
> Regards
>
> Nigel Taylor
>

Thanks a bunch for the tips and encouragement.
I was using the tutorial at http://www.argon18.com/raid_openbsd.html
This tutorial was very useful up until I reached the fstab file, the
configuration given does not seem to work. My new fstab file is as
follows.

/dev/sd0a / ffs rw 1 1
/dev/sd0b none swap sw 0 0
/dev/raid0d /home ffs rw,nodev,nosuid,softdep 1 2

using either a full raid map (/dev/raid0a / ...) or mapping /home to
/dev/sd0d would cause the system to boot single user or call for fsck
to be run.

Another question regarding the raid0.conf file given in the tutorial.
It's listed as.

START array
1 2 0
START disks
/dev/sd0d
/dev/sd1d
START layout
128 1 1 1
START queue
fifo 100

My question is why aren't I also raiding the sd0a and sd1a partitions?
Does this mean I need to run a dump -0f- command whenever I
make changes to the root partition?

The fstab configuration given in the tutorial gets wiped out on reboot.
So, I can't assume that part of the tutorial is useful, but here's the
configuration given for the secondary disk.

/dev/raid0a / ffs rw 1 1
/dev/raid0b none swap sw 0 0
/dev/raid0d /home rw,nodev,nosuid,softdep 1 2

Right now when I add raid0a to fstab it will boot single user, but raid0a
is not in my raid0.conf file.



Re: Raid configuration help.

2011-06-28 Thread Nigel Taylor
On 06/28/11 01:36, Zeb Packard wrote:
> Hello all, I'm new so if I do anything rude please let me know so I can 
> adjust.
> 
> I set up an openbsd file server using sftp, with a raid 1
> configuration and failover with Carp. My plan was to use rsync to sync
> up the file sharing directories and I believe I got a little bit ahead
> of myself when I thought I could rsync the /etc folder to streamline
> the configuration of my servers. It's quite possible that one of my
> systems was broken from an earlier attempt at reinstalling (which
> synced a functional, yet broken configuration with a good system), at
> the time I thought the raid automatically fixed the attempt at
> reinstalling, but after looking at my fstab file I'm pretty certain
> the raid hadn't been functioning properly for a while. (very stable
> system though that fails so gracefully) Anyways, long story short, I
> have a lot of work on that system, I'm not hoping to recover the
> beast, I just want to copy my files off of it and transfer them to a
> working system, but it is booting read-only with /etc/nologin in place
> and I cannot figure out why.
> 
> Please help.
> 
> Zeb Packard
> 
> 
Hi,

More details are required - like what type of raid?

softraid, raidframe, or raid controller.

A dmesg would help.

Read-only root partition suggests your in single user mode.
Single user mode is entered if the boot scrip fails, an error is being
detected, for example the root partition fsck failed and needs you to
run fsck manually.

Until you get past single user mode the /etc/nologin will not be removed
by the /etc/rc script.

Look at the dmesg for errors, or any messages on the console.

Overwriting file in /etc could cause all sorts of problems, rc scripts
corrupted could leave you in single user mode for example.


Regards

Nigel Taylor