Discussion:
[linux-lvm] lvcreate - device not cleared Aborting. Failed to wipe start of new LV.
c***@gmail.com
2015-06-19 15:02:02 UTC
Permalink
Hello,

on my Debian Jessie system I want to create a LV with command:
lvcreate --size 10.10G -n var bubba
Rounding up size to full physical extent 10.10 GiB
/dev/bubba/var: not found: device not cleared
Aborting. Failed to wipe start of new LV.
semid 1212424: semop failed for cookie 0xd4d132f: incorrect
semaphore state
Failed to set a proper state for notification semaphore
identified by cookie value 223154991 (0xd4d132f) to initialize
waiting for incoming notifications.

pvdisplay
--- Physical volume ---
PV Name /dev/sda2
VG Name bubba
PV Size 455.43 GiB / not usable 3.65 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 116588
Free PE 108856
Allocated PE 7732
PV UUID SMvR2K-6Z3c-xCgd-jSR2-kb1A-15a2-3RiS6V

The lvm version is:
lvm version
LVM version: 2.02.111(2) (2014-09-01)
Library version: 1.02.90 (2014-09-01)
Driver version: 4.22.0

I'm not sure whether was on this system created the VG 'bubba' with lvm
version 1, so maybe this issue is related to that fact that it was
really created with lvm version 1?

What is the solution for my problem?
--
Regards from Pal
MegaBrutal
2015-06-19 22:55:43 UTC
Permalink
Post by c***@gmail.com
I'm not sure whether was on this system created the VG 'bubba' with lvm
version 1, so maybe this issue is related to that fact that it was
really created with lvm version 1?
That your LVM library version is 1.02.90 (which is afaik the latest on
the Debian line), doesn't mean that you use LVM1 metadata. It is very
likely that you use LVM2. To check, you can see the output of "pvs"
("Fmt" = "lvm2"), or you can check "file -Lks /dev/sda2" where the
output should start with "/dev/sda2: LVM2 PV (Linux Logical Volume
Manager)".
Post by c***@gmail.com
What is the solution for my problem?
Please also try to run lvcreate with "--verbose" and post the output.
c***@gmail.com
2015-06-21 05:49:09 UTC
Permalink
Post by MegaBrutal
Post by c***@gmail.com
I'm not sure whether was on this system created the VG 'bubba' with lvm
version 1, so maybe this issue is related to that fact that it was
really created with lvm version 1?
That your LVM library version is 1.02.90 (which is afaik the latest on
the Debian line), doesn't mean that you use LVM1 metadata. It is very
likely that you use LVM2. To check, you can see the output of "pvs"
("Fmt" = "lvm2"), or you can check "file -Lks /dev/sda2" where the
output should start with "/dev/sda2: LVM2 PV (Linux Logical Volume
Manager)".
# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 bubba lvm2 a-- 455.42g 425.22g

# file -Lks /dev/sda2
/dev/sda2: LVM2 PV (Linux Logical Volume Manager), UUID: \
SMvR2K-6Z3c-xCgd-jSR2-kb1A-15a2-3RiS6V, size: 489009346560

Indeed, my LVM library version is lvm2.
Post by MegaBrutal
Post by c***@gmail.com
What is the solution for my problem?
Please also try to run lvcreate with "--verbose" and post the output.
# lvcreate --verbose --size 10.10G -n var bubba
DEGRADED MODE. Incomplete RAID LVs will be processed.
Setting logging type to disk
Finding volume group "bubba"
Rounding up size to full physical extent 10.10 GiB
Archiving volume group "bubba" metadata (seqno 48).
Creating logical volume var
Creating volume group backup \
"/etc/lvm/backup/bubba" (seqno 49).
Activating logical volume "var".
activation/volume_list configuration setting not defined:
Checking only host tags for bubba/var
Creating bubba-var
Loading bubba-var table (253:2)
Resuming bubba-var (253:2)
/dev/bubba/var: not found: device not cleared
Aborting. Failed to wipe start of new LV.
Removing bubba-var (253:2)
Creating volume group backup \
"/etc/lvm/backup/bubba" (seqno 50).
semid 327688: semop failed for cookie 0xd4d12bb: \
incorrect semaphore state
Failed to set a proper state for notification semaphore \
identified by cookie value 223154875 (0xd4d12bb) to \
initialize waiting for incoming notifications.
--
Regards from Pal
Zdenek Kabelac
2015-06-21 16:43:12 UTC
Permalink
Post by c***@gmail.com
Post by MegaBrutal
Post by c***@gmail.com
I'm not sure whether was on this system created the VG 'bubba' with lvm
version 1, so maybe this issue is related to that fact that it was
really created with lvm version 1?
That your LVM library version is 1.02.90 (which is afaik the latest on
the Debian line), doesn't mean that you use LVM1 metadata. It is very
likely that you use LVM2. To check, you can see the output of "pvs"
("Fmt" = "lvm2"), or you can check "file -Lks /dev/sda2" where the
output should start with "/dev/sda2: LVM2 PV (Linux Logical Volume
Manager)".
Unfortunately Debian is 'known' with it's own rewrite of lvm2 udev rules.
And those rules are not ack-ed by upstream and they are not correct.

The result is simple - the lvm2 tool is not properly synchronizing with device
activation and is not able to clear device header.
Post by c***@gmail.com
# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 bubba lvm2 a-- 455.42g 425.22g
# file -Lks /dev/sda2
/dev/sda2: LVM2 PV (Linux Logical Volume Manager), UUID: \
SMvR2K-6Z3c-xCgd-jSR2-kb1A-15a2-3RiS6V, size: 489009346560
Indeed, my LVM library version is lvm2.
Post by MegaBrutal
Post by c***@gmail.com
What is the solution for my problem?
Install upstream udev rules (and remove those provided by Debian package) -
but I've no idea what else will then break this way.

If you are not creating volumes too often - let's create LV without zeroing
and clear it yourself with i.e. 'dd' or run mkfs.

'lvcreate -Zn....'


Regards

Zdenek
c***@gmail.com
2015-06-21 17:10:42 UTC
Permalink
Post by Zdenek Kabelac
Post by c***@gmail.com
Post by MegaBrutal
Post by c***@gmail.com
I'm not sure whether was on this system created the VG 'bubba' with lvm
version 1, so maybe this issue is related to that fact that it was
really created with lvm version 1?
That your LVM library version is 1.02.90 (which is afaik the latest on
the Debian line), doesn't mean that you use LVM1 metadata. It is very
likely that you use LVM2. To check, you can see the output of "pvs"
("Fmt" = "lvm2"), or you can check "file -Lks /dev/sda2" where the
output should start with "/dev/sda2: LVM2 PV (Linux Logical Volume
Manager)".
Unfortunately Debian is 'known' with it's own rewrite of lvm2 udev rules.
And those rules are not ack-ed by upstream and they are not correct.
The result is simple - the lvm2 tool is not properly synchronizing
with device activation and is not able to clear device header.
Post by c***@gmail.com
# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 bubba lvm2 a-- 455.42g 425.22g
# file -Lks /dev/sda2
/dev/sda2: LVM2 PV (Linux Logical Volume Manager), UUID: \
SMvR2K-6Z3c-xCgd-jSR2-kb1A-15a2-3RiS6V, size: 489009346560
Indeed, my LVM library version is lvm2.
Post by MegaBrutal
Post by c***@gmail.com
What is the solution for my problem?
Install upstream udev rules (and remove those provided by Debian package) -
but I've no idea what else will then break this way.
If you are not creating volumes too often - let's create LV without zeroing
and clear it yourself with i.e. 'dd' or run mkfs.
'lvcreate -Zn....'
I shall follow this advice, to use -Zn option. Thanks!
--
Regards from Pal
MegaBrutal
2015-06-23 03:48:12 UTC
Permalink
Post by c***@gmail.com
# lvcreate --verbose --size 10.10G -n var bubba
DEGRADED MODE. Incomplete RAID LVs will be processed.
Hey, I just notice, your VG is in degraded mode. This is not a normal
condition and it can also cause unexpected things. Why is your VG
degraded? Does it have missing PVs?
c***@gmail.com
2015-06-23 06:22:51 UTC
Permalink
Post by MegaBrutal
Post by c***@gmail.com
# lvcreate --verbose --size 10.10G -n var bubba
DEGRADED MODE. Incomplete RAID LVs will be processed.
Hey, I just notice, your VG is in degraded mode. This is not a normal
condition and it can also cause unexpected things. Why is your VG
degraded? Does it have missing PVs?
# vgdisplay -vvv
DEGRADED MODE. Incomplete RAID LVs will be processed.

Indeed.
I don't know why is mine VG degraded.
How can I know does it have missing PVs?
What can I do to fix this problem?
--
Regards from Pal
Zdenek Kabelac
2015-06-23 08:44:42 UTC
Permalink
Post by c***@gmail.com
Post by MegaBrutal
Post by c***@gmail.com
# lvcreate --verbose --size 10.10G -n var bubba
DEGRADED MODE. Incomplete RAID LVs will be processed.
Hey, I just notice, your VG is in degraded mode. This is not a normal
condition and it can also cause unexpected things. Why is your VG
degraded? Does it have missing PVs?
# vgdisplay -vvv
DEGRADED MODE. Incomplete RAID LVs will be processed.
Indeed.
I don't know why is mine VG degraded.
How can I know does it have missing PVs?
What can I do to fix this problem?
Hi

There is nothing to fix for a user in this case.

This message is only 'informational' - probably it could be formulated
somehow differently and less 'stressful'

Also it's location is currently wrong, since it's the 'activation' could which
could recognize this case - however proper fix is not so trivial and will take
time.

So basically - this message tells you - that command operates in mode it will
process incomplete RAID LVs - and it likely should be printed only in case
there IS some raid LV....

Regards

Zdenek

Alasdair G Kergon
2015-06-19 23:09:10 UTC
Permalink
Post by c***@gmail.com
lvcreate --size 10.10G -n var bubba
Rounding up size to full physical extent 10.10 GiB
/dev/bubba/var: not found: device not cleared
The device wasn't created by udev before LVM tried to access it to wipe it.

Look in your system message log to see if the kernel gave any errors.
Otherwise check your udev configuration conforms to the way that
particular version of Debian expects things to work.

Alasdair
Loading...