LVM2 needs to skip [vectors] memory map found on arm architectures when mlocking. For more info, see https://www.redhat.com/archives/linux-lvm/2012-June/msg00020.html. Briefly, without patching this, the lvm commands end up with error messages like: # lvcreate -s -L 80M -n root-fsck-snapshot marv2-vg/root ffff0000-ffff1000 r-xp 00000000 00:00 0 [vectors]: mlock failed: Cannot allocate memory > ffff0000-ffff1000 r-xp 00000000 00:00 0 [vectors]: mlock failed: Cannot allocate memory > ffff0000-ffff1000 r-xp 00000000 00:00 0 [vectors]: munlock failed: Cannot allocate memory > ffff0000-ffff1000 r-xp 00000000 00:00 0 [vectors]: mlock failed: Cannot allocate memory > ffff0000-ffff1000 r-xp 00000000 00:00 0 [vectors]: mlock failed: Cannot allocate memory The patch is simple one-liner and it has already been posted upstream: http://git.fedorahosted.org/cgit/lvm2.git/commit/?id=d5697b29ee009104a4ed91f79543e22cc8c8d2c4
lvm2-2.02.98-4.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/lvm2-2.02.98-4.fc18
Package lvm2-2.02.98-4.fc18: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing lvm2-2.02.98-4.fc18' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-19873/lvm2-2.02.98-4.fc18 then log in and leave karma (feedback).
[root@localhost ~]# pvcreate /dev/mmcblk0p2 Physical volume "/dev/mmcblk0p2" successfully created [root@localhost ~]# vgcreate sdcard_vg /dev/mmcblk0p2 Volume group "sdcard_vg" successfully created [root@localhost ~]# vgdisplay sdcard_vg --- Volume group --- VG Name sdcard_vg System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 1 VG Access read/write VG Status resizable MAX LV 0 Cur LV 0 Open LV 0 Max PV 0 Cur PV 1 Act PV 1 VG Size 29.52 GiB PE Size 4.00 MiB Total PE 7556 Alloc PE / Size 0 / 0 Free PE / Size 7556 / 29.52 GiB VG UUID oMdw3v-OVtH-mpKO-Ur2q-asM0-GM7T-s031nR [root@localhost ~]# pvdisplay /dev/mmcblk0p2 --- Physical volume --- PV Name /dev/mmcblk0p2 VG Name sdcard_vg PV Size 29.52 GiB / not usable 3.00 MiB Allocatable yes PE Size 4.00 MiB Total PE 7556 Free PE 7556 Allocated PE 0 PV UUID 16466U-jghE-2pKP-NFv4-dzDY-eeui-1YMdf0 [root@localhost ~]# lvcreate -L2048 -nswaplv sdcard_vg Logical volume "swaplv" created [root@localhost ~]# lvcreate -L20480 -nrootlv sdcard_vg Logical volume "rootlv" created [root@localhost ~]# vgdisplay sdcard_vg --- Volume group --- VG Name sdcard_vg System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 3 VG Access read/write VG Status resizable MAX LV 0 Cur LV 2 Open LV 0 Max PV 0 Cur PV 1 Act PV 1 VG Size 29.52 GiB PE Size 4.00 MiB Total PE 7556 Alloc PE / Size 5632 / 22.00 GiB Free PE / Size 1924 / 7.52 GiB VG UUID oMdw3v-OVtH-mpKO-Ur2q-asM0-GM7T-s031nR [root@localhost ~]# lvcreate -l1924 -nhomelv sdcard_vg Logical volume "homelv" created
lvm2-2.02.98-4.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.