Discussion:
[linux-lvm] Not informative error message, when trying to change unallocatable physical volume
Илья Бока
2016-05-08 15:01:10 UTC
Permalink
#lvcreate -L600M -n test vg-arch
Insufficient free space: 150 extents needed, but only 0 available

but fixed with
#pvchange --allocatable y /dev/mapper/lvm
maybe possibly change message to more usable?


My topic on arch forum
https://bbs.archlinux.org/viewtopic.php?id=212300
Zdenek Kabelac
2016-05-10 08:27:17 UTC
Permalink
Post by Илья Бока
#lvcreate -L600M -n test vg-arch
Insufficient free space: 150 extents needed, but only 0 available
but fixed with|
#pvchange --allocatable y /dev/mapper/lvm
|
|maybe possibly change message to more usable?
Hi

Thanks for report.

I'd say that making PV not allocatable should also be then reflected in
vgs/pvs as not a 'free' space (e.g. having a VG with non-allocatable PVS
should show 0 empty space)
But this change would be surely for a discussion since various
backward compatibility issue needs to be though through...

Recent lvm2 tool shows 'pvs' attribute 'u' with non-allocatable PVs
so at least 'quick' look at pvs output shows this easily.

(that's why I think it would be quite 'straightforward' to see 0 free space in
"VG" and then check 'pvs' and seeing 'u' flag)


The error message you would like to see changed is however at different level.
Its deeply embedded in allocator - so either we would need to provide some
'hint' message checking if there is 0 free allocatable size, but still some
space in (u)sed but not allocatable PV - or the allocator would need to know
about extra 'unallocatable' space and reflect this in error message.


Anyway - please open BZ as it's not a simple change and needs some thinking.

https://bugzilla.redhat.com/enter_bug.cgi?product=LVM%20and%20device-mapper


Regards

Zdenek

Loading...