Date: Sat, 4 Jan 2025 21:33:04 -0800 From: Chris Torek <chris.torek@gmail.com> To: Craig Leres <leres@freebsd.org> Cc: Karl Denninger <karl@denninger.net>, freebsd-hackers@freebsd.org Subject: Re: curious crashes when under memory pressure Message-ID: <CAPx1GvfftEFiqe6D19V1tUBx_MEuMKDyLjXhDiCVtrCXrrgedw@mail.gmail.com> In-Reply-To: <04794cad-eda5-4ab8-ae29-4cc4d53ac033@freebsd.org> References: <CAPx1GvfwqFqvMm0RkTvxa4BJStvOdG0=pNx2dCuWEzCXsqhqHw@mail.gmail.com> <slrnvnij2h.26bu.pmc@disp.intra.daemon.contact> <CAPx1GvfOh4g1AeOcYXC26W5jbPAgA_E_t7CW9chg4miC8c15-w@mail.gmail.com> <9e71d8eb-74c3-4bcb-89b1-90d4f9746168@quip.cz> <33db3282-25c4-42fb-8d97-1918d52fa9e2@denninger.net> <4094b79b-c54a-4953-b693-1b4e8387cf9f@freebsd.org> <slrnvnj05d.27gd.pmc@disp.intra.daemon.contact> <87928610-fcad-400e-b7b3-076c6d3f1200@freebsd.org> <12dcc55d-67ae-467b-9249-3d60047d05f0@denninger.net> <04794cad-eda5-4ab8-ae29-4cc4d53ac033@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jan 4, 2025 at 2:04=E2=80=AFPM Craig Leres <leres@freebsd.org> wrot= e: > Chris said he was "swapping to a zfs mirror" but I'm swapping to a gmirro= r. I thought I was, but now I'm not sure any more :-) (I set this up many months ago). Poking around, it looks like I have a three way geom mirror (why 3? I have no idea, well, some vague idea, but, well...). I have `/dev/mirror/swap` as the swapon device in `/etc/fstab`, and `gmirror list` says: Geom name: swap State: COMPLETE Components: 3 Balance: load Slice: 4096 Flags: NONE GenID: 0 SyncID: 1 ID: 777312945 Type: AUTOMATIC Providers: 1. Name: mirror/swap Mediasize: 137438952960 (128G) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 0 Mode: r1w1e0 Consumers: 1. Name: ada2p3 Mediasize: 137438953472 (128G) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 0 Mode: r1w1e1 State: ACTIVE Priority: 2 Flags: NONE GenID: 0 SyncID: 1 ID: 466179938 [repeat for ada1p3 and ada0p3 but with priorities counting down to 0 and with different IDs.] So I guess I'm swapping to a geom mirror. I suspect it has three drives in it because I was originally thinking I had to swap to a zfs vdev mirror. You can stop here, but if not: MORE DETAILS I originally put four drives in the machine (3 8TB + 1 old 2 TB), and only three were working (ada0 through 2), so I set up a three-way zfs file system on it. The fourth one worked on Linux but not on FreeBSD. Eventually I moved it to a different channel and it started working fine and I still don't know what that's all about, though there were several kernel updates along the way (patch releases of FreeBSD 14) as well. At some point I discovered you can't crash-dump to a mirror, so I set up a 64 GB partition on ada3 and made it the dump device. It might not be working, I haven't forcibly tested it yet. Worse, `gpart show -l` shows it as `swap2`, a duplicate of ada2's `swap2` except half the size (??). It shows up fine as /dev/label/crash though. `geom swap list -a` says: Geom name: swap Consumers: 1. Name: mirror/swap Mediasize: 137438952960 (128G) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 0 Mode: r1w1e0 Strippng `geom -t` output a bit (egrep disk\|swap): ada3p2 LABEL gpt/swap2 gpt/swap2 DEV swap MIRROR mirror/swap mirror/swap DEV swap SWAP swap MIRROR mirror/swap mirror/swap DEV swap SWAP swap MIRROR mirror/swap mirror/swap DEV swap SWAP swap.sync MIRROR Here's `gpart show -p | grep swap`: 2048 134217728 ada3p2 freebsd-swap (64G) 534528 268435456 ada2p3 freebsd-swap (128G) 534528 268435456 ada1p3 freebsd-swap (128G) 534528 268435456 ada0p3 freebsd-swap (128G) and `gpart show -l | grep swap`: 2048 134217728 2 swap2 (64G) 534528 268435456 3 swap2 (128G) 534528 268435456 3 swap1 (128G) 534528 268435456 3 swap0 (128G) I went straight from an original FreeBSD 9 setup with an ancient MBR (persisting unchanged through several upgrades) to FreeBSD 14 (now 15) at home, so I get a bit lost between gpart, geom, and zfs/zpool differences at times. Chris
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPx1GvfftEFiqe6D19V1tUBx_MEuMKDyLjXhDiCVtrCXrrgedw>