Bug 142870 - invalid block and sector sizes reported by gnbd devices
invalid block and sector sizes reported by gnbd devices
Status: CLOSED CURRENTRELEASE
Product: Red Hat Cluster Suite
Classification: Red Hat
Component: gnbd (Show other bugs)
4
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Ben Marzinski
Cluster QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-12-14 15:55 EST by Corey Marthaler
Modified: 2009-04-16 15:57 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-12-14 18:09:31 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)

  None (edit)
Description Corey Marthaler 2004-12-14 15:55:13 EST
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 17:30:27 EST
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 18:09:31 EST
fix verified.

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