Date: Wed, 20 Mar 2013 23:06:38 -0700 From: Jeremy Chadwick <jdc@koitsu.org> To: "Reed A. Cartwright" <cartwright@asu.edu> Cc: freebsd-fs@freebsd.org, Quartz <quartz@sneakertech.com>, freebsd-questions@freebsd.org Subject: Re: ZFS question Message-ID: <20130321060638.GA16997@icarus.home.lan> In-Reply-To: <CALOkxuybLR-kev=DYiP2t6B5s=Kpii0shwGC-gwWs0pEnOg%2BGA@mail.gmail.com> References: <20130321044557.GA15977@icarus.home.lan> <CALOkxuybLR-kev=DYiP2t6B5s=Kpii0shwGC-gwWs0pEnOg%2BGA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Mar 20, 2013 at 10:10:20PM -0700, Reed A. Cartwright wrote: > {snipped stuff about CAM and mps and ZFS deadman} > > Jeremy, I have a question about enabling kernel dumps based on my > current swap config. > > I currently have a 1TB drive split into 4 geli encrypted swap > partitions (Freebsd doesn't like swap partitions over ~250 GB and I > have lots of RAM). > > These partitions are UFS-swap partitions and are > not backed by any mirroing or ZFSing. > > So, how do I best enable crash dumps? If I need to remove encryption, > I can do that. I have zero familiarity with geli(8), gbde(8), and file-based swap. My gut feeling is that you cannot use this to achieve a proper kernel panic dump, but I have not tried it. You can force a kernel panic via "sysctl debug.kdb.panic=1". I'm not sure if an automatic memory dump to swap happens with the stock GENERIC kernel however. I can talk more about that if needed (it involves adding some options to your kernel config, and one rc.conf variable). Regarding "enabling crash dumps" as a general concept: In rc.conf you need to have dumpdev="auto" (or point it to a specific disk slice, but auto works just fine assuming you have a "swap" or "dump" device defines in /etc/fstab -- see savecore(8) man page). Full details are in rc.conf(5). How this works: After a system reboots, during rc script startup, rc.d/savecore runs savecore which examines the configured dumpdev for headers + tries to detect if there was previously a kernel panic. If it finds one, it begins pulling the data out of swap and writing the results directly to /var/crash in a series of files (again, see savecore(8)). It does this ***before*** swapon(8) is run (reason why should be obvious) via rc.d/swapon. After it finishes, swapon is run (meaning anything previously written to the swap slice is effectively lost), and the system continues through the rest of the rc scripts. Purely for educational purposes: to examine system rc script order, see rcorder(8) or run "rcorder /etc/rc.d/*". -- | Jeremy Chadwick jdc@koitsu.org | | UNIX Systems Administrator http://jdc.koitsu.org/ | | Mountain View, CA, US | | Making life hard for others since 1977. PGP 4BD6C0CB |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130321060638.GA16997>