Bug 362031 - qdiskd doesn't work with block devices which are not in /proc/partitions
qdiskd doesn't work with block devices which are not in /proc/partitions
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: cman (Show other bugs)
5.1
All Linux
low Severity low
: ---
: ---
Assigned To: Lon Hohberger
GFS Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-01 12:03 EDT by Lon Hohberger
Modified: 2009-04-16 18:55 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-20 16:52:32 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Fixes broken device size checking (619 bytes, patch)
2008-01-23 19:14 EST, Lon Hohberger
no flags Details | Diff

  None (edit)
Description Lon Hohberger 2007-11-01 12:03:07 EDT
Description of problem:

If a block device exists on a system but is not in /proc/partitions, qdiskd
doesn't find it with its primitive matching algorithm.

Version-Release number of selected component (if applicable): 5.1

How reproducible: Unknown

Steps to Reproduce:
1. Try to use nbd as a host for qdiskd
  
Actual results: Finding label on nbd fails
Comment 1 Lon Hohberger 2007-11-01 14:46:30 EDT
This might be a wontfix for rhel5, but it should be fixed in mainline/head.
Comment 2 Fabio Massimo Di Nitto 2007-11-04 09:22:14 EST
I did look into this and will try to prepare a patch sometime soon.

The best approach is to use the one we discussed around the table, by scanning
/sys/block/* and mknod.

My suggestion would be to make the location of the mknod configurable and to
defaul to /dev/.qdiskd/.tmp-major-minor during the scanning and settle it to
/dev/.qdiskd/.label-major-minor when we start using it. This is totally
transparent to the user as we don't lock the device while running qdiskd and it
will solve our problem retaining backwards compatibility by first checking
/sys/block and then /proc/partitons if we don't find the label in the first run.

There might be a little overhead using this approach.

Fabio

PS Lon, i will work on this next week or so.
Comment 3 Fabio Massimo Di Nitto 2007-11-15 02:39:53 EST
A patch to fix this issue has been committed to CVS HEAD:

https://www.redhat.com/archives/cluster-devel/2007-November/msg00101.html

Could somebody be so kind to update the bug status? I am not familiar with the
procedure and bug status sequence you use in this bugzilla.

Thanks
Fabio
Comment 6 Lon Hohberger 2008-01-23 19:14:58 EST
Created attachment 292716 [details]
Fixes broken device size checking

This is required to make qdisk work with the previous patch.
Comment 7 Fabio Massimo Di Nitto 2008-01-24 00:35:36 EST
The patch in HEAD is not good enough yet. We a discussion later on the mailing
list and needs some rework, so please hold on to apply it on stable release
branches.

Thanks
Fabio
Comment 8 Fabio Massimo Di Nitto 2008-02-20 00:55:40 EST
A proposed fix has been posted to cluster-devel mailing list:

https://www.redhat.com/archives/cluster-devel/2008-February/msg00092.html

Fabio
Comment 9 Fabio Massimo Di Nitto 2008-06-12 03:23:41 EDT
Hi Lon,

the code in master/stable2 is working fine for me.

By removing /proc, the output from scandisk doesn't change.

Can you please backport the fixes to RHEL5 branches?

(x86_64)root@node1:~# umount /proc 
(x86_64)root@node1:~# mkqdisk -L
mkqdisk v1212040374

[QDISK] /dev/etherd/e0.0p1:
[QDISK]         Magic:                eb7a62c2
[QDISK]         Label:                qdisk
[QDISK]         Created:              Thu Apr 24 09:43:57 2008
[QDISK]         Host:                 node1
[QDISK]         Kernel Sector Size:   512
[QDISK]         Recorded Sector Size: 512

[QDISK] /dev/nbd0:
[QDISK]         Magic:                eb7a62c2
[QDISK]         Label:                test
[QDISK]         Created:              Thu Jun 12 09:20:35 2008
[QDISK]         Host:                 node1
[QDISK]         Kernel Sector Size:   512
[QDISK]         Recorded Sector Size: 512
Comment 10 Lon Hohberger 2008-06-12 11:49:11 EDT
Will do.
Comment 14 errata-xmlrpc 2009-01-20 16:52:32 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0189.html

Note You need to log in before you can comment on or make changes to this bug.