SUSE Support

Here When You Need Us

Device /dev/rbd0 not found (or ignored by filtering).

This document (000001008) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Enterprise Storage 5.5
SUSE Enterprise Storage 6
 

Situation

Customer is attempting to create lvm volume on a "rbd mapped" device and gets the following message when running " pvcreate /dev/rbd ":
 
linuxnode4:/dev # pvcreate /dev/rbd0
  Device /dev/rbd0 not found (or ignored by filtering). Please run with -vvv option for more details

 

Resolution

Add the following line to /etc/lvm/lvm.conf :
types = [ "rbd", 1024 ]

Please note: This should be done in the "devices" section of the file.
Sample taken from a SLES12 SP3 lvm.conf file:
# List of pairs of additional acceptable block device types found
# in /proc/devices with maximum (non-zero) number of partitions.
# types = [ "fd", 16 ]
types = [ "rbd", 1024 ]

 

Cause

lvm filter is filtering out /dev/rbd devices. 

Additional Information

Example :

linuxnode4:/etc/lvm # rbd list rbd-images
RBD-01

linuxnode4:/etc/lvm # rbd map --pool rbd-images RBD-01
/dev/rbd0

linuxnode4:/etc/lvm # rbd showmapped
id pool       image  snap device
0  rbd-images RBD-01 -    /dev/rbd0

> You need to add a line to /etc/lvm/lvm.conf:
>
> types = [ "rbd", 1024 ]
>
> It should be in the "devices" section of the file.

    # List of pairs of additional acceptable block device types found
    # in /proc/devices with maximum (non-zero) number of partitions.
    # types = [ "fd", 16 ]
    types = [ "rbd", 1024 ]

linuxnode4:/etc/lvm # vi lvm.conf

linuxnode4:/etc/lvm # pvcreate /dev/rbd0 -vvv
        DEGRADED MODE. Incomplete RAID LVs will be processed.
      Setting activation/monitoring to 1
        Processing: pvcreate /dev/rbd0 -vvv
        system ID:
        O_DIRECT will be used
      Setting global/locking_type to 1
      Setting global/wait_for_locks to 1
      File-based locking selected.
      Setting global/prioritise_write_locks to 1
      Setting global/locking_dir to /run/lvm/lock
      metadata/pvmetadataignore not found in config: defaulting to 0
      metadata/pvmetadatasize not found in config: defaulting to 255
      metadata/pvmetadatacopies not found in config: defaulting to 1
      Locking /run/lvm/lock/P_orphans WB
        _do_flock /run/lvm/lock/P_orphans:aux WB
        _do_flock /run/lvm/lock/P_orphans WB
        _undo_flock /run/lvm/lock/P_orphans:aux
        Metadata cache has no info for vgname: "#orphans"
        Asking lvmetad for complete list of known PVs
      Setting response to OK
      Setting response to OK
        /dev/rbd0: Added to device cache
        Using /dev/rbd0
        Opened /dev/rbd0 RO O_DIRECT
      /dev/rbd0: size is 20971520 sectors
        Closed /dev/rbd0
        Opened /dev/rbd0 RO O_DIRECT
        /dev/rbd0: block size is 4096 bytes
        /dev/rbd0: physical block size can't be determined, using logical block size of 512 bytes
        Closed /dev/rbd0
        Opened /dev/rbd0 RO O_DIRECT
        Closed /dev/rbd0
      /dev/rbd0: size is 20971520 sectors
        Opened /dev/rbd0 RO O_DIRECT
        /dev/rbd0: block size is 4096 bytes
        /dev/rbd0: physical block size can't be determined, using logical block size of 512 bytes
        Closed /dev/rbd0
        Using /dev/rbd0
        Opened /dev/rbd0 RW O_EXCL O_DIRECT
        Closed /dev/rbd0
      Setting allocation/use_blkid_wiping to 1
        Opened /dev/rbd0 RO O_DIRECT
      /dev/rbd0: size is 20971520 sectors
        Closed /dev/rbd0
        Opened /dev/rbd0 RO O_DIRECT
        /dev/rbd0: block size is 4096 bytes
        /dev/rbd0: physical block size can't be determined, using logical block size of 512 bytes
        Closed /dev/rbd0
        Opened /dev/rbd0 RO O_DIRECT
        Closed /dev/rbd0
      /dev/rbd0: size is 20971520 sectors
        Opened /dev/rbd0 RO O_DIRECT
        /dev/rbd0: block size is 4096 bytes
        /dev/rbd0: physical block size can't be determined, using logical block size of 512 bytes
        Closed /dev/rbd0
        Using /dev/rbd0
        Opened /dev/rbd0 RO O_DIRECT
        Closed /dev/rbd0
      /dev/rbd0: size is 20971520 sectors
      Setting devices/data_alignment to 0
      devices/default_data_alignment not found in config: defaulting to 1
      Setting devices/md_chunk_alignment to 1
      Setting devices/data_alignment_detection to 1
      Device /dev/rbd0: queue/minimum_io_size is 4194304 bytes.
      Device /dev/rbd0: queue/optimal_io_size is 4194304 bytes.
      /dev/rbd0: Setting PE alignment to 8192 sectors.
      Setting devices/data_alignment_offset_detection to 1
      Device /dev/rbd0: alignment_offset is 0 bytes.
      /dev/rbd0: Setting PE alignment offset to 0 sectors.
        Opened /dev/rbd0 RW O_DIRECT
        Wiping /dev/rbd0 at sector 8 length 8 sectors
        /dev/rbd0: block size is 4096 bytes
        /dev/rbd0: physical block size can't be determined, using logical block size of 512 bytes
        Closed /dev/rbd0
    Set up physical volume for "/dev/rbd0" with 20971520 available sectors
      Scanning for labels to wipe from /dev/rbd0
        Opened /dev/rbd0 RW O_DIRECT
        /dev/rbd0: block size is 4096 bytes
        /dev/rbd0: physical block size can't be determined, using logical block size of 512 bytes
        Closed /dev/rbd0
    Zeroing start of device /dev/rbd0
        Opened /dev/rbd0 RW O_DIRECT
        Wiping /dev/rbd0 at sector 0 length 4 sectors
        /dev/rbd0: block size is 4096 bytes
        /dev/rbd0: physical block size can't be determined, using logical block size of 512 bytes
        Closed /dev/rbd0
    Writing physical volume data to disk "/dev/rbd0"
        lvmcache: /dev/rbd0: now in VG #orphans_lvm2 (#orphans_lvm2) with 0 mdas
        Creating metadata area on /dev/rbd0 at sector 8 size 8184 sectors
        Opened /dev/rbd0 RW O_DIRECT
        /dev/rbd0: block size is 4096 bytes
        /dev/rbd0: physical block size can't be determined, using logical block size of 512 bytes
        /dev/rbd0: Preparing PV label header AhT7C8-HKGY-sMiS-78OF-N68Y-2gNm-zNygii size 10737418240 with da1 (8192s, 0s) mda1 (8s, 8184s)
      /dev/rbd0: Writing label to sector 1 with stored offset 32.
        Telling lvmetad to store PV /dev/rbd0 (AhT7C8-HKGY-sMiS-78OF-N68Y-2gNm-zNygii)
      Setting response to OK
      Setting response to OK
  Physical volume "/dev/rbd0" successfully created
      Unlocking /run/lvm/lock/P_orphans
        _undo_flock /run/lvm/lock/P_orphans
        Metadata cache has no info for vgname: "#orphans"
        Closed /dev/rbd0
        Completed: pvcreate /dev/rbd0 -vvv

linuxnode4:/etc/lvm # pvdisplay
  "/dev/rbd0" is a new physical volume of "10.00 GiB"
  --- NEW Physical volume ---
  PV Name               /dev/rbd0
  VG Name
  PV Size               10.00 GiB
  Allocatable           NO
  PE Size               0
  Total PE              0
  Free PE               0
  Allocated PE          0
  PV UUID               AhT7C8-HKGY-sMiS-78OF-N68Y-2gNm-zNygii

linuxnode4:/etc/lvm # vgcreate rbd_vg /dev/rbd0
  Volume group "rbd_vg" successfully created

linuxnode4:/etc/lvm # vgdisplay
  --- Volume group ---
  VG Name               rbd_vg
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  1
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                0
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               10.00 GiB
  PE Size               4.00 MiB
  Total PE              2559
  Alloc PE / Size       0 / 0
  Free  PE / Size       2559 / 10.00 GiB
  VG UUID               FRtgNC-PCy9-icG2-8yP7-p6Am-TGNh-pUoCot

linuxnode4:/etc/lvm # lvcreate -L 10000 -n rbd-vol1 rbd_vg
  Logical volume "rbd-vol1" created.

linuxnode4:/etc/lvm # mkfs.xfs /dev/rbd_vg/rbd-vol1
meta-data=/dev/rbd_vg/rbd-vol1   isize=256    agcount=17, agsize=159744 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=0        finobt=0, sparse=0
data     =                       bsize=4096   blocks=2560000, imaxpct=25
         =                       sunit=1024   swidth=1024 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal log           bsize=4096   blocks=2560, version=2
         =                       sectsz=512   sunit=8 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0

linuxnode4:/etc/lvm # parted -s /dev/rbd_vg/rbd-vol1 unit GB print free
Model: Linux device-mapper (linear) (dm)
Disk /dev/dm-0: 10.5GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:

Number  Start   End     Size    File system  Flags
1      0.00GB  10.5GB  10.5GB  xfs

 

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000001008
  • Creation Date: 23-Oct-2020
  • Modified Date:23-Oct-2020
    • SUSE Enterprise Storage

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.