Project

General

Profile

Actions

Feature #18335

closed

rbd-nbd: check /sys/block/nbdX/size to ensure kernel mapped correctly

Added by Jason Dillaman over 7 years ago. Updated almost 7 years ago.

Status:
Resolved
Priority:
Low
Assignee:
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
kraken,jewel
Reviewed:
Affected Versions:
Pull request ID:

Description

There are bugs with some kernel versions that result in large image sizes resulting in an overflow:

# rbd info large
rbd image 'large':
size 3072 GB in 786432 objects
order 22 (4096 kB objects)
block_name_prefix: rbd_data.103774b0dc51
format: 2
features: layering, exclusive-lock, object-map, fast-diff, deep-flatten
flags:

# rbd nbd map large # patched to allow large images
/dev/nbd0

# blockdev --getsize64 /dev/nbd0
18446742974197923840  # 16777215 TB!

# blockdev --getpbsz /dev/nbd0
512

# blockdev --getsz /dev/nbd0
36028794871480320 # nope!

After mapping the image, verify that the kernel agrees with the image size. Know to not work properly on Fedora 24.


Related issues 2 (0 open2 closed)

Copied to rbd - Backport #18910: kraken: rbd-nbd: check /sys/block/nbdX/size to ensure kernel mapped correctlyResolvedNathan CutlerActions
Copied to rbd - Backport #18911: jewel: rbd-nbd: check /sys/block/nbdX/size to ensure kernel mapped correctlyResolvedAlexey SheplyakovActions
Actions #1

Updated by Mykola Golub about 7 years ago

  • Assignee set to Mykola Golub
Actions #2

Updated by Mykola Golub about 7 years ago

  • Status changed from New to Fix Under Review
  • Backport set to kraken,jewel
Actions #3

Updated by Jason Dillaman about 7 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #4

Updated by Loïc Dachary about 7 years ago

  • Copied to Backport #18910: kraken: rbd-nbd: check /sys/block/nbdX/size to ensure kernel mapped correctly added
Actions #5

Updated by Loïc Dachary about 7 years ago

  • Copied to Backport #18911: jewel: rbd-nbd: check /sys/block/nbdX/size to ensure kernel mapped correctly added
Actions #6

Updated by Nathan Cutler almost 7 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF