Re: Where/how can I set the flags for savecore during boot?

2007-11-30 Thread Jason McIntyre
On Fri, Nov 30, 2007 at 09:19:37AM -0800, Don Jackson wrote:
 
 When I boot the machine, I see:
 
 root on wd0a swap on wd0b dump on wd0b
 
 I guess the kernel devaults to wd0b for swap and dump?
 

it defaults to root disk, partition b (wd0b for you).

 
 But later in the boot messages I see:
 
 savecore: /dev/wd0b: Device not configured
 

you do not actually have a /dev/wd0b, right? i think that is causing the
problem.

 
 How can I configure savecore to use the real swap partition on this system?
 

i don;t think the error message comes from savecore.
the problem is there is no wd0b (i'm guessing).

i think you have two solutions:

- create a minimal /dev/wd0b
- build a kernel telling it to use sd0b as swap. look at the
  config bsd root on dev [swap on dev] ... line in config(8).

jmc



Where/how can I set the flags for savecore during boot?

2007-11-30 Thread Don Jackson
I'm running OpenBSD 4.2/amd64 on an Opteron machine.
I boot off of wd0, which is a flash disk.

I also have sd0, which I use for more frequently writable partitons (swap,
var, tmp, etc)  (sdo is really a set of raid disks managed by an areca disk
controller)

Here is my /etc/fstab:

# more /etc/fstab
/dev/wd0a / ffs rw 1 1
/dev/wd0g /home ffs rw,nodev,nosuid 1 2
/dev/sd0f /home2 ffs rw,nodev,nosuid 1 2
/dev/sd0d /tmp ffs rw,nodev,nosuid 1 2
/dev/wd0e /usr ffs rw,nodev 1 2
/dev/sd0e /var ffs rw,nodev,nosuid 1 2
/dev/sd0b none swap sw 0 0

Note wd0b is not specified, and sd0b is.

When I boot the machine, I see:

root on wd0a swap on wd0b dump on wd0b

I guess the kernel devaults to wd0b for swap and dump?

Anyway, the next log line is:

swapctl: adding /dev/sd0b as swap device at priority 0

So that seems good, it is picking up the real swap space out of /etc/fstab

(after the machine boots, I run:
# swapctl -l
Device  512-blocks UsedAvail Capacity  Priority
/dev/sd0b  84019320  8401932 0%0
so that seems consistent that the kernel is using sd0b for swap)

But later in the boot messages I see:

savecore: /dev/wd0b: Device not configured

Presumably this is because

rc.conf has:

savecore_flags= # -z to compress

and /etc/rc has:
if [ -d /var/crash ]; then
savecore ${savecore_flags} /var/crash
fi

So, how can fix it so savecore executes successfully in the rc script?

After the machine booted, I tried running

# savecore /dev/sd0b
savecore: /dev/wd0b: Device not configured

thinking that if I just specified the actual swap partition it would work,
but clearly it didn't.

How can I configure savecore to use the real swap partition on this system?

Don