savecore(1M) should be able to work on read-only dump devices
Currently savecore(1M) can't operate on read-only dump devices. When reading from a dump device it normally also updates the dump header on the device (to indicate a dump has already been saved etc.), and to do that savecore(1M) opens the dump device read-write and fails if it can't. This is a bit surprising as its core functionality is to read a dump from the dump device, and that shouldn't really require write access. At least there should be a flag to indicate read-only operation.
I found this immensely helpful when I had ZFS issues where a pool could only be imported read-only and I wanted to retrieve a core from its dump zvol.
Updated by Hans Rosenfeld about 3 years ago
Testing (on SmartOS):
I forced a crash dump with "uadmin 5 0" and then rebooted in recovery mode. I imported the pool read-only and verified that the core dump could be extracted manually with "savecore
rf /dev/zvol/dsk/zones/dump /tmp". I also verified that -r doesn't work with -L, -m, and -c. – -
Next I imported the pool read-write and ran savecore with -m, -c, and without arguments to verify that normal operation still works as before.
Updated by Electric Monk about 3 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit 466483367c0a97495499f43113a8f44c9eddff03 Author: Hans Rosenfeld <firstname.lastname@example.org> Date: 2019-05-15T21:38:09.000Z 10654 savecore(1M) should be able to work on read-only dump devices Reviewed by: Robert Mustacchi <email@example.com> Reviewed by: John Levon <firstname.lastname@example.org> Reviewed by: Andy Stormont <email@example.com> Reviewed by: Gergő Doma <firstname.lastname@example.org> Reviewed by: Toomas Soome <email@example.com> Approved by: Gordon Ross <firstname.lastname@example.org>