Bug 142870 - invalid block and sector sizes reported by gnbd devices
Summary: invalid block and sector sizes reported by gnbd devices
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Cluster Suite
Classification: Retired
Component: gnbd
Version: 4
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ben Marzinski
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-12-14 20:55 UTC by Corey Marthaler
Modified: 2009-04-16 19:57 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-12-14 23:09:31 UTC
Embargoed:


Attachments (Terms of Use)

Description Corey Marthaler 2004-12-14 20:55:13 UTC
Description of problem:
I exported and then imported a whole disk (/dev/sda) and then just a
partition of that disk, half the size (dev/sda1). The sectors and
blocks reported for the whole disk seem a bit high.

exporter:

[root@morph-01 root]# gnbd_export -l
Server[1] : sda1
--------------------------
      file : /dev/sda1
   sectors : 2147472809
  readonly : no
    cached : yes
   timeout : no

Server[2] : sda
--------------------------
      file : /dev/sda
   sectors : 18446744073709535232
  readonly : no
    cached : yes
   timeout : no

[root@morph-01 root]# cat /proc/partitions
major minor  #blocks  name

   3     0   39082680 hda
   3     1     104391 hda1
   3     2   37929465 hda2
   3     3    1044225 hda3
   8     0 2147475456 sda
   8     1 1073736404 sda1
   8     2 1073736405 sda2


importer:

root@morph-02 root]# gnbd_import -l
Device name : sda
----------------------
    Minor # : 0
  Proc name : /dev/gnbd0
     Server : morph-01
       Port : 14567
      State : Close Connected Clear
   Readonly : No
    Sectors : 18446744073709535232

Device name : sda1
----------------------
    Minor # : 1
  Proc name : /dev/gnbd1
     Server : morph-01
       Port : 14567
      State : Close Connected Clear
   Readonly : No
    Sectors : 2147472809

[root@morph-02 root]# cat /proc/partitions
major minor  #blocks  name

   3     0   39082680 hda
   3     1     104391 hda1
   3     2   37929465 hda2
   3     3    1044225 hda3
 252     0 9223372036854767616 gnbd0
 252     1 1073736404 gnbd1

Comment 1 Ben Marzinski 2004-12-14 22:30:27 UTC
I was using a large, when I meant to use an unsigned large variable,
so the size flipped over into negative when I was converting from
u32 to u64. This is now fixed

Comment 2 Corey Marthaler 2004-12-14 23:09:31 UTC
fix verified.


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