Project

General

Profile

Feature #18335

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

Added by Jason Dillaman 8 months ago. Updated 30 days ago.

Status:
Resolved
Priority:
Low
Assignee:
Target version:
-
Start date:
12/22/2016
Due date:
% Done:

0%

Source:
Tags:
Backport:
kraken,jewel
Reviewed:
User Impact:
Affected Versions:
Release:
Needs Doc:
No

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

Copied to rbd - Backport #18910: kraken: rbd-nbd: check /sys/block/nbdX/size to ensure kernel mapped correctly Resolved
Copied to rbd - Backport #18911: jewel: rbd-nbd: check /sys/block/nbdX/size to ensure kernel mapped correctly Resolved

History

#1 Updated by Mykola Golub 7 months ago

  • Assignee set to Mykola Golub

#2 Updated by Mykola Golub 7 months ago

  • Status changed from New to Need Review
  • Backport set to kraken,jewel

#3 Updated by Jason Dillaman 6 months ago

  • Status changed from Need Review to Pending Backport

#4 Updated by Loic Dachary 6 months ago

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

#5 Updated by Loic Dachary 6 months ago

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

#6 Updated by Nathan Cutler 30 days ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF