Bug 1412433 - can't create volume group [NEEDINFO]
Summary: can't create volume group
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.5-Alt
Hardware: x86_64
OS: Linux
Target Milestone: rc
: ---
Assignee: LVM and device-mapper development team
QA Contact: cluster-qe@redhat.com
Depends On:
TreeView+ depends on / blocked
Reported: 2017-01-12 02:24 UTC by Sherine Bahader
Modified: 2021-09-03 12:40 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-01-18 09:46:53 UTC
Target Upstream Version:
zkabelac: needinfo? (sbahader)

Attachments (Terms of Use)

Description Sherine Bahader 2017-01-12 02:24:38 UTC
Description of problem:
I created 3 partitions with type Linux LVM, I created physical volume from both but then I tried to create volume group it gives me an error.

Version-Release number of selected component (if applicable):
lvm2.x86_64 7:2.02.166-1.el7_3.1
on Centos 7

How reproducible:
fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes, 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0x2bd2c32a

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     1779711      888832    7  HPFS/NTFS/exFAT
/dev/sda2         1779712   308979711   153600000    7  HPFS/NTFS/exFAT
/dev/sda3       308979712   833267711   262144000   83  Linux
/dev/sda4       833267712   976773119    71752704    5  Extended
/dev/sda5       833269760   875212799    20971520   82  Linux swap / Solaris
/dev/sda6       875214848   883603455     4194304   8e  Linux LVM
/dev/sda7       883605504   891994111     4194304   8e  Linux LVM
/dev/sda8       891996160   896190463     2097152   8e  Linux LVM

Steps to Reproduce:
1. pvcreate /dev/sda6 /dev/sda7 /dev/sda8
  Physical volume "/dev/sda6" successfully created.
  Physical volume "/dev/sda7" successfully created.
  Physical volume "/dev/sda8" successfully created.

2.vgcreate vg0 /dev/sda6 /dev/sda7 /dev/sda8
  Parse error at byte 461 (line 25): unexpected token
  Error parsing metadata for VG vg0.
  Parse error at byte 952 (line 58): unexpected token
  Error parsing metadata for VG vg0.
  Device '/dev/sda6' has been left open (1 remaining references).
  Device '/dev/sda7' has been left open (1 remaining references).
  Device '/dev/sda8' has been left open (1 remaining references).
  Internal error: 3 device(s) were left open and have been closed.

Expected results:
creating the volume group vg0

Additional info:

Comment 2 Zdenek Kabelac 2017-01-12 13:54:21 UTC
Not yet convinced this is an lvm2 issue.

Since this would me lvm2 is fundamentally broken and would not work for anyone.

So what is the hardware in use ?

Is your 'sda' device something special ?
(network attach storage?)

Are you sure you machine has all memory working properly ?
(memtest is OK)

Can you capture and store in file (with 'dd' tool)  first 1MiB of each sda partion   (sda6, sda7, sda8) and attach to this BZ ?

Also attach:

pvcreate -vvvv
vgcreate -vvvv


Comment 3 Alasdair Kergon 2017-01-12 14:33:09 UTC
If you adjusted partitions, make sure they match what the kernel is using (rebooting if necessary).

Otherwise, wipe the start of each device in case it's seeing some old data that's confusing it.

Comment 4 Zdenek Kabelac 2017-01-18 09:46:53 UTC
Since there is no update - assuming this was user error with fdisk usage.
If you have the needed data - please feel free to reopen...

Note You need to log in before you can comment on or make changes to this bug.