Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 722672 - sys-fs/lvm2 doesn't work on x32 ABI
Summary: sys-fs/lvm2 doesn't work on x32 ABI
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Low major (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-12 11:09 UTC by Burak Çalışkan
Modified: 2020-05-13 23:29 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge-info,4.98 KB, text/plain)
2020-05-12 11:09 UTC, Burak Çalışkan
Details
qlist -ISRv (qlist-isrv,8.61 KB, text/plain)
2020-05-12 11:10 UTC, Burak Çalışkan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Burak Çalışkan 2020-05-12 11:09:56 UTC
Created attachment 638422 [details]
emerge --info

Hi,

x32-lvm2 doesn't work properly on x32 ABI. I've created simple 
test system with latest x32 stage3 image (which is stage3-x32-20200422T214502Z.tar.xz right now) with sys-kernel/gentoo-kernel-bin on my qemu system.


x32test ~ # truncate -s 4G test.img
x32test ~ # losetup -f test.img 
x32test ~ # 
x32test ~ # losetup -l
NAME       SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE      DIO LOG-SEC
/dev/loop0         0      0         0  0 /root/test.img   0     512
x32test ~ # 
x32test ~ # 
x32test ~ # pvcreate /dev/loop0
  WARNING: Failed to connect to lvmetad. Falling back to device scanning.
  Error reading device /dev/loop0 at 0 length 4096.
  Error reading device /dev/sda at 0 length 512.
  Error reading device /dev/sda at 0 length 4096.
  Error reading device /dev/sda1 at 0 length 4096.
  Error reading device /dev/root at 0 length 4096.
  Device /dev/loop0 excluded by a filter.
x32test ~ # 
x32test ~ # lvm
lvm> lvs
  WARNING: Failed to connect to lvmetad. Falling back to device scanning.
lvm> vgs
lvm> pvs
  Error reading device /dev/loop0 at 0 length 4096.
  Error reading device /dev/sda at 0 length 512.
  Error reading device /dev/sda at 0 length 4096.
  Error reading device /dev/sda1 at 0 length 4096.
  Error reading device /dev/root at 0 length 4096.
lvm> exit
  Exiting.
x32test ~ # /etc/init.d/lvmetad start
 * Starting lvmetad ...                                                                                                                                           [ ok ]
x32test ~ # pvcreate /dev/loop0
  Error reading device /dev/loop0 at 0 length 4096.
  Error reading device /dev/loop0 at 0 length 4096.
  Error reading device /dev/sda at 0 length 512.
  Error reading device /dev/sda at 0 length 4096.
  Error reading device /dev/sda1 at 0 length 4096.
  Error reading device /dev/root at 0 length 4096.
  Device /dev/loop0 excluded by a filter.
x32test ~ # 


lvm dev filter is gentoo default filter which works on loop* devices (excluded by the filter)

x32test ~ # lvmconfig  --typeconfig diff
devices {
	filter=["r|/dev/nbd.*|","a/.*/"]
}
x32test ~ # 


and its use flags

x32test ~ # emerge lvm2 -v1p

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] sys-fs/lvm2-2.02.187-r2::gentoo  USE="readline thin udev -device-mapper-only -lvm2create_initrd -sanlock (-selinux) -static -static-libs -systemd" 0 KiB
Comment 1 Burak Çalışkan 2020-05-12 11:10:36 UTC
Created attachment 638424 [details]
qlist -ISRv
Comment 2 Burak Çalışkan 2020-05-12 12:00:01 UTC
It seems, this is libaio issue FEATURES=test dev-libs/libaio-0.3.110:0 failed with only x32 abi. When the, testing version of libaio emerged,

ACCEPT_KEYWORDS=~amd64 FEATURES=test emerge libaio -v1a

x32 tests failed with mem allocs fails, however lvm2 works on sync-io


x32test ~ # truncate -s 4G test.img
x32test ~ # losetup -f test.img 
x32test ~ # losetup -l
NAME       SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE      DIO LOG-SEC
/dev/loop0         0      0         0  0 /root/test.img   0     512
x32test ~ # pvcreate  /dev/loop0
  WARNING: Failed to connect to lvmetad. Falling back to device scanning.
  Failed to set up async io, using sync io.
  Physical volume "/dev/loop0" successfully created.
x32test ~ # 
x32test ~ # pvs
  WARNING: Failed to connect to lvmetad. Falling back to device scanning.
  Failed to set up async io, using sync io.
  PV         VG Fmt  Attr PSize PFree
  /dev/loop0    lvm2 ---  4.00g 4.00g
x32test ~ # qlist -ISv lvm2 libaio
dev-libs/libaio-0.3.112:0
sys-fs/lvm2-2.02.187-r2:0
Comment 3 Mike Gilbert gentoo-dev 2020-05-13 23:29:08 UTC
Making this low priority since I doubt anyone uses x32 for real work.

Patches welcome.