0

I am trying to install LVM2 on my Raspberry Pi. I can not use apt-get, yum, or rpm since none of these package managers are installed on my system.

I have downloaded lvm2-2_02_70-1_fc14.tar.gz from here. I unpacked the tar.gz file in /bin (is that the correct place to unpack?) but am not sure what to do next. There is no ./configure that was unpacked for me to run. I have the following in the directory:

root@raspberrypi3:/bin/lvm2-2_02_70-1_fc14# ls
LVM2.2.02.70.tgz.asc                    lvm2-set-default-preferred_names.patch  mirrors                                 upstream
Makefile                                lvm2.spec                               sources                                 upstream-key.gpg

I need to be able to use the lvextend, vgdisplay, lvresize, and other LVM commands. How can I finish installing LVM2?

2
  • Is that package built for the Raspberry Pi architecture? If not, it won't be very useful. The source code is here: sourceware.org/git/?p=lvm2.git You'll also need to ensure the kernel has support for LVM2. Commented Jun 20, 2017 at 20:23
  • @EmmanuelRosa I am pretty new to this stuff. How can I check if the kernel has support for LVM2? Also I am not sure exactly what I am supposed to do with the source code. Commented Jun 20, 2017 at 21:00

1 Answer 1

0

You downloaded the Fedora package source, which isn’t going to be much use to you.

You need to download a source archive from the LVM2 project, e.g. on the kernel.org mirror; currently the latest version is LVM2.2.02.171.tgz:

cd /tmp
wget http://mirrors.kernel.org/sourceware/lvm2/LVM2.2.02.171.tgz

Once you have that, extract it

tar xf LVM2.2.02.171.tgz
cd LVM2.2.02.171

and build it

./configure && make

and finally install it (as root)

make install

You might want to adjust options to configure depending on the tools you need and where you want the binaries to end up.

2
  • I am stuck on the ./configure && make step. I am getting an error that says "no acceptable C compiler". From what I can tell I don't have a compiler installed yet. When I try to unpack the gcc.tar.gz file I have downloaded I get an error that says "No space left on device". I have a 8G SD card that looks like it is only using ~2G. From the the searching I have done it seems like the solution to this is to use LVM to make more usable space on my SD card. But I don't have LVM installed yet. Now I am back where I started...Any suggestions or should this be asked as a new question? Commented Jun 20, 2017 at 22:07
  • 1
    It sounds like you’d be better off installing a Raspberry Pi distribution (with packages) instead of trying to build stuff from source... Commented Jun 20, 2017 at 22:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .