Page fault, GEOM problem??

Michal Mertl mime at traveller.cz
Fri Nov 18 23:31:08 GMT 2005


Parv wrote:
> in message <1132353600.903.19.camel at genius1.i.cz>, wrote Michal
> Mertl thusly...
> >
> > Johan Ström wrote:
> > > 
> > > On 18 nov 2005, at 18.43, Xin LI wrote:
> ...
> > > So, it seems it does run savecore after running dumpon and
> > > mounting  disks etc... Is that wrong?
> > 
> > No, this is normal. When you run savecore you need to have mounted
> > filesystems. In order to mount the filesystems they may have to be
> > checked. The fsck program requires big amount of memory to check
> > larger filesystems so the swap has to be enabled. Core dumps are
> > written to the dump device (swap) from the end whereas the swap is
> > normally used from the beginning (or the other way around).
> > Therefore there's quite a big chance that, even when the swap has
> > to be used for fsck, the core dump is intact and usable.
> 
> Is there any formula to calculate the size of swap to account for
> fsck & core dump while assigning swap size (short of having two swap
> partitions)?

None that I know of. Someone posted to some FreeBSD mailing list some
figures about the fsck consumption of memory. I really don't remember,
but I think it was something like some MBs of memory per quite a lot of
GB of file system space. E.g. that the fsck on "normally" sized file
systems (e.g. at most a couple of hundred GB) doesn't normally cosume
all of "normally" sized memory (>=256MB) and thus doesn't need to swap.

> > If the usage of the swap file by fsck corrupts the core dump you
> > may start after next crash in single user mode and run the
> > commands manually (without enabling swap).
> 
> Is that after kernel (re)boots?  And would the commands to be
> executed be savecore followed by swapon?

If the dump got corrupted by fsck, you would have to wait for another
crash and dump. Then you would reboot and start in single user mode,
repair the file systems without swap enabled (fsck would crash on the
large file system(s)) and then run savecore. Swapon is then irrelevant,
you probably don't need swap for savecore. After running savecore you
can start normally multi user (exit from the single user shell).

I didn't try all of that but I believe it should work.

Michal



More information about the freebsd-stable mailing list