On Mon, Sep 29, 2014 at 02:27:50PM +0200, Martin Milata wrote:
On Mon, Sep 29, 2014 at 13:02:07 +0800, Dave Young wrote:
> On 09/25/14 at 12:15pm, Martin Milata wrote:
> > system-config-kdump has hardcoded whitelist of major numbers for block
> > devices that can be used as raw kdump targets. With the current list it
> > does not show virtio disks  as possible targets. The major device
> > number for virtio is assigned dynamically, thus I cannot simply add a
> > new number.
> > I have no idea how the major numbers in the list were chosen. I see
> > these possibilities for fixing the bug:
> > * Do not try to outsmart the user, throw away the list, and offer all
> > devices that are listed in /proc/partitions.
> > * Add all the numbers that can be used for dynamic assignment to the
> > whitelist.
> > * Determine whether a device is suitable by some other means. For
> > example, /sys/dev/block/MAJOR:MINOR/ro should contain 1 if the device
> > is read-only. However it contains 0 for my optical drive, so using
> > this is probably not as useful.
> For CDROM we can not check the /sys/dev/block/MAJOR:MINOR/ro because it
> depends on the media type in the drive. Anyway we do not support writing
> to cdrom so it's safe to skip any devices in /proc/sys/dev/cdrom/info
> The first line should list the cdrom device names.
Thanks for the suggestion. Looks like blacklisting devices instead of
whitelisting makes more sense here.
I agree. Removing devices from list which are not writables makes
> BTW, how about let user provide the device path name manually instead provide
> a list in UI?
I don't know - I guess the point of s-c-kdump is configuring kdump
without much typing?:) I don't see any advantage (except perhaps in the
case when the list is very long).
If it is not too hard, I think it is not a bad idea to provide user
list of devices. To me it just makes configuration easier. Instead
of asking user to figure out the path.