Is it at all possible to have lvm on an OpenWrt unit?
If so, how come no such package exists?
Please put it on the whish list for rc6!
/PjK
Topic: Lvm2?
The content of this topic has been archived on 21 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.
Here are old buildroot .mk files for both device-mapper and lvm2.
http://stephan.kochen.nl/proj/initrd/
I'll see if I can turn those buildroot-ng and openwrt friendly, as I would like lvm2 on openwrt myself. It just might be out of my leauge though.
Sounds great! Let me know if I can help!
/PjK
Having looked at this again; I've hit a bump with device-mapper. It seems I need to have it installed towards the system in the stageing dir for the LVM2 compile to complete.
But, with the make file for device-mapper below, how/where do I invoke make install, and how do i reference staging_dir_i386, regardless or architecture?
thanks!
include $(TOPDIR)/rules.mk
PKG_NAME:=device-mapper
PKG_VERSION:=1.02.19
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz
PKG_SOURCE_URL:=ftp://sources.redhat.com/pub/lvm2/
PKG_MD5SUM:=37cb592a1fa8fc31dc00cb437bbb4969
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME).$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION:=utils
CATEGORY:=Utilities
TITLE:=$(PKG_NAME)
DESCRIPTION:=$(PKG_NAME)
URL:=ftp://sources.redhat.com/pub/dm/
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/bin
endef
$(eval $(call BuildPackage,$(PKG_NAME)))
include $(TOPDIR)/rules.mk
PKG_NAME:=LVM2
PKG_VERSION:=2.02.25
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz
PKG_SOURCE_URL:=ftp://sources.redhat.com/pub/lvm2/
PKG_MD5SUM:=42dce454618770aa1754c793cbb1cbbb
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME).$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION:=utils
CATEGORY:=Utilities
TITLE:=$(PKG_NAME)
DESCRIPTION:=$(PKG_NAME)
URL:=ftp://sources.redhat.com/pub/lvm2/
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/vgcreate $(1)/bin/
# .. and so on..
endef
$(eval $(call BuildPackage,$(PKG_NAME)))
Finally got around to sorting out the Makefile for lvm2, but it now complains about libraries and symbols. Full build log @ http://pastebin.com/m83e6057 , and the last few lines for are included below.
I've searched around and found some references to this problem, but nothing that made me any wiser; how about you guys?
http://www.opencascade.org/org/forum/thread_9224/
http://www.raditha.com/blog/archives/001119.html
/home/bjorn/dev/OpenWRT/trunk/staging_dir/toolchain-i386_gcc4.1.2/lib/gcc/i386-linux-uclibc/4.1.2/../../../../i386-linux-uclibc/bin/ld: errno@@GLIBC_PRIVATE: TLS definition in /lib/libc.so.6 section .tbss mismatches non-TLS definition in /home/bjorn/dev/OpenWRT/trunk/staging_dir/toolchain-i386_gcc4.1.2/i386-linux-uclibc/bin/../lib/libc.so.0 section .bss
#
/home/bjorn/dev/OpenWRT/trunk/staging_dir/toolchain-i386_gcc4.1.2/i386-linux-uclibc/bin/../lib/libc.so.0: could not read symbols: Bad value
#
collect2: ld returned 1 exit status
#
make[4]: *** [lvm] Error 1
#
make[4]: Leaving directory `/home/bjorn/dev/OpenWRT/trunk/build_dir/i386/LVM2.2.02.28/tools'
#
make[3]: *** [tools] Error 2
#
make[3]: Leaving directory `/home/bjorn/dev/OpenWRT/trunk/build_dir/i386/LVM2.2.02.28'
#
make[2]: *** [/home/bjorn/dev/OpenWRT/trunk/build_dir/i386/LVM2.2.02.28/.built] Error 2
#
make[2]: Leaving directory `/home/bjorn/dev/OpenWRT/trunk/feeds/http_svn_.assembla.com_svn_test_openwrt_package_/lvm2'
#
make[1]: *** [package/lvm2/compile] Error 2
#
make[1]: Leaving directory `/home/bjorn/dev/OpenWRT/trunk'
#
make: *** [package/lvm2-compile] Error 2
#
#
Script done on Wed 07 Nov 2007 09:04:11 PM CET
Makefile for lvm2 is as follows
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=LVM2
PKG_VERSION:=2.02.28
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME).$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz
PKG_SOURCE_URL:=ftp://sources.redhat.com/pub/lvm2
PKG_MD5SUM:=940a882a71cae84f6befc8069a260ad1
include $(INCLUDE_DIR)/package.mk
define Package/lvm2
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=device-mapper
TITLE:=LVM2
URL:=http://sourceware.org/lvm2/
endef
define Package/lvm2/description
LVM2 userspace toolset
endef
define Build/Configure
$(call Build/Configure/Default, \
--with-dmdir=$(BUILD_DIR)/device-mapper.1.02.22 \
)
endef
define Package/lvm2/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lvm2 $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,lvm2))
edit: bad link
(Last edited by beikeland on 7 Nov 2007, 22:16)
The discussion might have continued from here.