Bug 362031 - qdiskd doesn't work with block devices which are not in /proc/partitions
Summary: qdiskd doesn't work with block devices which are not in /proc/partitions
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: cman
Version: 5.1
Hardware: All
OS: Linux
low
low
Target Milestone: ---
: ---
Assignee: Lon Hohberger
QA Contact: GFS Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-01 16:03 UTC by Lon Hohberger
Modified: 2009-04-16 22:55 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-20 21:52:32 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:0189 0 normal SHIPPED_LIVE cman bug-fix and enhancement update 2009-01-20 16:05:55 UTC

Description Lon Hohberger 2007-11-01 16:03:07 UTC
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 18:46:30 UTC
This might be a wontfix for rhel5, but it should be fixed in mainline/head.

Comment 2 Fabio Massimo Di Nitto 2007-11-04 14:22:14 UTC
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 07:39:53 UTC
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-24 00:14:58 UTC
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 05:35:36 UTC
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 05:55:40 UTC
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 07:23:41 UTC
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 15:49:11 UTC
Will do.

Comment 14 errata-xmlrpc 2009-01-20 21:52:32 UTC
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.