How To Identify Block Volumes and Block Hosting Volumes in Openshift Container Storage?

Solution Verified - Updated

Environment

  • OCS 3.X

Issue

  • How To Identify Block Volumes and Block Hosting Volumes in Openshift Container Storage.
  • How to check block hosting volume for a block volume

Resolution

  • gluster-block volumes are volumes that can be mounted over iSCSI. This is done by creating a file on an existing GlusterFS volume and then presenting that file as a block device via an iSCSI target.
  • Such GlusterFS volumes which are hosting block volumes are called block-hosting volumes.

Follow the below steps:

  • Login to heketi pod and set secret key and value
# oc rsh <heketi-pod>
# export HEKETI_CLI_KEY=$HEKETI_ADMIN_KEY
# export HEKETI_CLI_USER=admin
  • Run below command:
# heketi-cli volume list

It will give you list of all gluster volumes and if its a block hosting volume, it will show it by [block] tag.

Ex.:

# heketi-cli volume list
Id:1f3e774ddcc8cc4d63358801ad2a4404    Cluster:057d017194a230af064f3d09baf7c3c9    Name:vol_1f3e774ddcc8cc4d63358801ad2a4404
Id:6ad55da534a9af53dae7208856283a9d    Cluster:057d017194a230af064f3d09baf7c3c9    Name:vol_6ad55da534a9af53dae7208856283a9d [block]

Here, as we can see [block] tag for vol_6ad55da534a9af53dae7208856283a9d, thus it is block hosting volume.

  • To check more information about this volume, check it from below command:
# heketi-cli volume info <Block-hosting-volume-id>

Ex.:
# heketi-cli volume info 6ad55da534a9af53dae7208856283a9d
Name: vol_6ad55da534a9af53dae7208856283a9d
Size: 5
Volume Id: 6ad55da534a9af53dae7208856283a9d
Cluster Id: 057d017194a230af064f3d09baf7c3c9
Mount: XXX:vol_6ad55da534a9af53dae7208856283a9d
Mount Options: backup-volfile-servers=YYY,ZZZ
Block: true
Free Size: 3
Reserved Size: 1
Block Hosting Restriction: (none)
Block Volumes: [b95ee0684308bce5b77a4a6163bb2f5a]                              
Durability Type: replicate
Distributed+Replica: 3
  • It shows Block Hosting Volume vol_6ad55da534a9af53dae7208856283a9d is hosting a block volume: b95ee0684308bce5b77a4a6163bb2f5a .

  • To check more information about the block volume, run the below command:

# heketi-cli blockvolume info <Block-Volume-Id>

# heketi-cli blockvolume info b95ee0684308bce5b77a4a6163bb2f5a
Name: blockvol_b95ee0684308bce5b77a4a6163bb2f5a
Size: 1
Volume Id: b95ee0684308bce5b77a4a6163bb2f5a
Cluster Id: 057d017194a230af064f3d09baf7c3c9
Hosts: [XXX  YYY ZZZ]
IQN: iqn.2016-12.org.gluster-block:f1168495-b92a-467f-a81f-61ba234bc682
LUN: 0
Hacount: 3
Username: f1168495-b92a-467f-a81f-61ba234bc682
Password: b695920a-3d79-4cfb-93c4-2f30ddca6a87
Block Hosting Volume: 6ad55da534a9af53dae7208856283a9d
  • You can check information of block volume from below command as well:
# oc rsh <gluster-pod>

# gluster-block info <Block-Hosting-Volume-Name>/<Block-Volume-Name>

sh-4.2# gluster-block info vol_6ad55da534a9af53dae7208856283a9d/blockvol_b95ee0684308bce5b77a4a6163bb2f5a
NAME: blockvol_b95ee0684308bce5b77a4a6163bb2f5a
VOLUME: vol_6ad55da534a9af53dae7208856283a9d
GBID: f1168495-b92a-467f-a81f-61ba234bc682
SIZE: 1.0 GiB
HA: 3
PASSWORD: b695920a-3d79-4cfb-93c4-2f30ddca6a87
EXPORTED ON: XXX YYY ZZZ

XXX, YYY, ZZZ are Ip's of storage nodes.

Root Cause

N/A

Diagnostic Steps

N/A

SBR
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.