Bug 947636

Summary: journalctl indexing by block device
Product: Red Hat Enterprise Linux 7 Reporter: Tom Coughlan <coughlan>
Component: systemdAssignee: systemd-maint
Status: CLOSED ERRATA QA Contact: Branislav Blaškovič <bblaskov>
Severity: high Docs Contact: Milan Navratil <mnavrati>
Priority: high    
Version: 7.0CC: agk, amulhern, bblaskov, emilne, fge, harald, jscotka, jsynacek, kay, lnykryn, mlombard, mnavrati, msekleta, myroslav, systemd-maint-list
Target Milestone: betaFlags: mnavrati: needinfo-
Target Release: 7.0   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: systemd-219-20.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 947660 998695 1357058 (view as bug list) Environment:
Last Closed: 2016-11-04 00:40:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 998695    
Bug Blocks: 727046, 947660, 1289485, 1313485    

Description Tom Coughlan 2013-04-02 22:13:33 UTC
We are trying to move users away from using non-persistent device names, like /dev/sda, toward the use persistent names, like /dev/disk/by-*. One of the complaints we get is "well, all the messages in the system log use sda, so we have no choice". The other problem, of course, is that when you look at the log it is not always clear which physical device corresponds to sda at that particular point in time. 

The ability to index the journal by a persistent device name, mentioned in this  blog:

 http://0pointer.de/blog/projects/journalctl.html

provides a solution to the problem. A sysadmin will to be able to say:

"display all the messages related to this disk: 
wwn-0x5000cca5b7d39e46 regardless of what its temporary 'sd' name
happened to be" 

...and variations on that theme, continuing to move people away from
depending on the temporary 'sd' name. 

This is an important feature for RHEL 7. (We will plan to document it in the Storage Admin. Guide, in the Persistent Device Names section.) 

The blog mentions that there is a kernel dependency for this. If that dependency is not in the 3.9 kernel, please open a kernel BZ, marked as a blocker for this BZ, with a pointer to the kernel change that is needed. 

Thanks.

Comment 1 Jacquelynn East 2013-04-03 00:15:16 UTC
Cloned to track documentation progress. Bug 947660

Comment 2 Tom Coughlan 2013-08-19 19:33:52 UTC
In answer to an email query, Kay indicated that this feature will not be available in 7.0 because the prerequisite kernel work has not been done yet. 

In order for structured logging queries to work, printk statements in the kernel must be converted to dev_printk() (or a custom variant of it, that attaches the same structured data), to export the needed data to the journal to store away.

One example patch is posted here:

http://www.spinics.net/lists/linux-scsi/msg62499.html

Ideally the whole kernel would be converted, but it should
be fine to convert only the ones which are interesting here,
which is probably: most of SCSI, dm, md, parts of the block
layer, and possibly some interesting filesystem logging messages.

I will move this BZ to 7.1, and I will clone it to a new BZ, get the kernel portion of the work done.

Comment 6 Maurizio Lombardi 2015-05-11 07:12:41 UTC
The kernel patches required by this BZ are available in the latest RHEL7 kernel (kernel-3.10.0-250)

Comment 12 Michal Sekletar 2016-02-07 19:13:45 UTC
https://github.com/lnykryn/systemd-rhel/pull/8

Comment 32 errata-xmlrpc 2016-11-04 00:40:07 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2216.html

Comment 33 Red Hat Bugzilla 2023-09-14 01:43:06 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days