Project

General

Profile

Bug #10654

savecore(1M) should be able to work on read-only dump devices

Added by Hans Rosenfeld 7 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Category:
cmd - userland programs
Start date:
2019-04-01
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage

Description

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.

History

#2

Updated by Hans Rosenfeld 5 months 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.

#3

Updated by Electric Monk 5 months ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 466483367c0a97495499f43113a8f44c9eddff03

commit  466483367c0a97495499f43113a8f44c9eddff03
Author: Hans Rosenfeld <hans.rosenfeld@joyent.com>
Date:   2019-05-15T21:38:09.000Z

    10654 savecore(1M) should be able to work on read-only dump devices
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Reviewed by: John Levon <john.levon@joyent.com>
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Reviewed by: Gergő Doma <domag02@gmail.com>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Approved by: Gordon Ross <gordon.w.ross@gmail.com>

Also available in: Atom PDF