Can't Create Volume for Instance: Volume Status Showing Error

Bug #1746783 reported by Nureni Adekunle Adeyemo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Incomplete
Undecided
Unassigned

Bug Description

Guys,

Kindly assist me to look into this issue. I am trying to create a volume which is to be attached to an instance. The volume was created with an error status. I tried to update the metadata and successfully change the status to available but could still not attach it to an instance (I know it is not advisable to do this). I am running on Ubuntu 16.04 with Openstack Pike.

Cinder scheduler and volume are both up on my controller node after a lot of issues as shown below:

Openstack volume service list
+-----------------+-----------------+------+---------+-------+-----------------+
| Binary | Host | Zone | Status | State | Updated At |
+-----------------+-----------------+------+---------+-------+-----------------+
| cinder- | controller | nova | enabled | up | 2018-02-01T17:1 |
| scheduler | | | | | 2:12.000000 |
| cinder-volume | blockstorage@lv | nova | enabled | up | 2018-02-01T17:1 |
| | m | | | | 2:21.000000 |
+-----------------+-----------------+------+---------+-------+-----------------+

Dashboard Showing the status of the volume:

Displaying 1 item
 Name Description Size Status Type Attached To Availability Zone Bootable Encrypted Actions
 data_volume - 5GiB Error - nova No No
Displaying 1 item

However, pvcreate command for preparing storage device on my storage node(as seen in the installation guide) is not working. In the process of creating volume from my Dashboard, I observed that the device location should be /dev/vdb or /dev/vda depending on which instance is selected for attachment. Unfortunately, none of these devices is available on my storage node as I only have sda1, sd2, sd5(Type: Linux LVM). I guess this might be where my issue is but I will appreciate if you can guide me.

I have attached a file containing the two relevant logs to this ticket: /var/log/cinder/cinder-scheduler.log(on the controller) and /var/log/cinder/cinder-volume.log.

Revision history for this message
Nureni Adekunle Adeyemo (adeyemo) wrote :
summary: - Can't Create Volume for Instance: Volume Staus Showing Error
+ Can't Create Volume for Instance: Volume Status Showing Error
Revision history for this message
Sean McGinnis (sean-mcginnis) wrote :

Looks like you may have a configuration error:

ImportError: Class LVMISCSIDriver cannot be found

Also, your statement of "pvcreate command for preparing storage device on my storage node ... is not working" is a concern. If you can't even create the LVM for Cinder to use, neither Cinder nor Nova are even interesting to look at at that point.

The /dev/vd* devices are what show up in virtual machine instances. On the compute host they will be the normal /dev/sd* devices.

Revision history for this message
Nureni Adekunle Adeyemo (adeyemo) wrote :

Thank you Sean for the quick response. I saw the error 'Class LVMISCSIDriver cannot be found' in the log file before I created the trouble ticket but when I changed it to 'LVMVolumeDriver' as stated in the installation guide, cinder-volume status is showing 'Down' on my controller node.

As regards pvcreate, I tried using /dev/sda5 since it has type 'Linux LVM' when I run fdisk -l command on my storage node. But, what it was asking me 'sda5 filesystem unmounted'.

What do you suggest that I do in these two cases? I need your assistance as I have spent days trying to fix these issues.

Thank you.

Revision history for this message
Nureni Adekunle Adeyemo (adeyemo) wrote :

I want to add that I have separate nodes for compute and storage.The storage node has only one disk only have a disk as shown below:

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 999423 997376 487M 83 Linux
/dev/sda2 1001470 1952446463 1951444994 930.5G 5 Extended
/dev/sda5 1001472 1952446463 1951444992 930.5G 8e Linux LVM

The output of the pvcreate command:

#pvcreate -ff /dev/sda5
WARNING: Ignoring duplicate config value: filter
WARNING: Ignoring duplicate config value: filter
Really INITIALIZE physical volume "/dev/sda5" of volume group "blockstorage-vg" [y/n]? y
  Can't open /dev/sda5 exclusively. Mounted filesystem?

Revision history for this message
Brin Zhang (zhangbailin) wrote :

Do not know your real environment configuration, try to configure your lvm.conf file open try to add sda5 global_filter inside? as in the following example:

global_filter = [ "a|.*/|", "a|sda5|", "r|.*|" ]

Or others, this is a suggestion.:)
I have encountered similar problems before but this is not the same.

Revision history for this message
Nureni Adekunle Adeyemo (adeyemo) wrote :
Download full text (28.0 KiB)

Thank you Brin for your suggestion but I think the command did not work for me or maybe I did not do it well.

Both the configuration of /etc/lvm/lvm.conf's 'devices section' and the verbose output of pvcreate command are provided below for your assistance. I have commented out other two filters that I have in that section before.

I think maybe you will have an idea of what I need to do based of the attachment and the pvcreate output.

# How LVM uses block devices.
devices {

 # Configuration option devices/dir.
 # Directory in which to create volume group device nodes.
 # Commands also accept this as a prefix on volume group names.
 # This configuration option is advanced.
 dir = "/dev"

 # Configuration option devices/scan.
 # Directories containing device nodes to use with LVM.
 # This configuration option is advanced.
 scan = [ "/dev" ]

 # Configuration option devices/obtain_device_list_from_udev.
 # Obtain the list of available devices from udev.
 # This avoids opening or using any inapplicable non-block devices or
 # subdirectories found in the udev directory. Any device node or
 # symlink not managed by udev in the udev directory is ignored. This
 # setting applies only to the udev-managed device directory; other
 # directories will be scanned fully. LVM needs to be compiled with
 # udev support for this setting to apply.
 obtain_device_list_from_udev = 1

 # Configuration option devices/external_device_info_source.
 # Select an external device information source.
 # Some information may already be available in the system and LVM can
 # use this information to determine the exact type or use of devices it
 # processes. Using an existing external device information source can
 # speed up device processing as LVM does not need to run its own native
 # routines to acquire this information. For example, this information
 # is used to drive LVM filtering like MD component detection, multipath
 # component detection, partition detection and others.
 #
 # Accepted values:
 # none
 # No external device information source is used.
 # udev
 # Reuse existing udev database records. Applicable only if LVM is
 # compiled with udev support.
 #
 external_device_info_source = "none"

 # Configuration option devices/preferred_names.
 # Select which path name to display for a block device.
 # If multiple path names exist for a block device, and LVM needs to
 # display a name for the device, the path names are matched against
 # each item in this list of regular expressions. The first match is
 # used. Try to avoid using undescriptive /dev/dm-N names, if present.
 # If no preferred name matches, or if preferred_names are not defined,
 # the following built-in preferences are applied in order until one
 # produces a preferred name:
 # Prefer names with path prefixes in the order of:
 # /dev/mapper, /dev/disk, /dev/dm-*, /dev/block.
 # Prefer the name with the least number of slashes.
 # Prefer a name that is a symlink.
 # Prefer the path with least value in lexicographical order.
 #
 # Example
 # preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]
 #
 # This configuration option does not have a default value ...

Revision history for this message
Nureni Adekunle Adeyemo (adeyemo) wrote :

My major problem is how to create physical and logical volumes for my LVM partition which in this case is /dev/sda5. When I use pvcreate and vgcreate with /dev/sda5, it always says the partition is in use despite deleting and creating another one. I think this is why I am getting the error 'Can't open /dev/sda5 exclusively. Mounted filesystem?' Do you guys know how to handle this?

Eric Harney (eharney)
Changed in cinder:
status: New → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.