LVM problem

I had met problem with LVM, I tried to select LVM during installation, but when the installation is processing, it was failed to create the LVM partition, the installation is aborted. my partition prepare for opensuse are /sda2(/boot), /sda5(/home), /sda6(/), /sda8(/swap), encrypt all of them without /boot, are they not in the right order?

LVM is a container and those partitions should be defined inside it not as separate partitions

What you say above on how you try to use partitions on the disk is completely contradictionary with using LVM. There is no LVM anywhere in thadescription.

Ma be you better describe what disk(s) you have, what you want to keep (a Windows installation maybe?) and what you try to achieve and why you think that LVM plays a role in that achievement.

I’ll describe how I am using an encrypted LVM. Perhaps that will help you.

First, here is what my disk partitioning looks like:

# fdisk -l /dev/sda

Disk /dev/sda: 640.1 GB, 640135028736 bytes
255 heads, 63 sectors/track, 77825 cylinders, total 1250263728 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x7ac063a6

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      401407      199680   83  Linux
/dev/sda2          401408   231094271   115346432   8e  Linux LVM
/dev/sda3       231094272  1250263039   509584384   83  Linux

As you can see, I have only 3 partitions. They are:

“/dev/sda1” - mounted as “/boot”. This is unencrypted, and used for booting.

“/dev/sda2” - this is the partition used as an LVM. Inside that LVM, it is divided into three volumes (the “root” volume, the “swap” volume and the “home” volume). So almost all of linux is inside that LVM. This partition is encrypted.

“/dev/sda3” - this is mounted as “/shared”. I use that with both NFS and Samba, for sharing that partition across the home network. I put mp3 music files there. And I put some downloaded stuff there. Most recently I put the installer for firefox 20.0 (Windows version) in the shared partition. That way, Windows boxes on the home network can install it from there. Incidentally, I have also encrypted “/shared”.

Now let’s look at the LVM (the partition “/dev/sda2”. I found the installer a bit too inflexible for creating an LVM the way that I would like. So I booted from a live KDE image (installed on a USB). While running that live KDE system, I started Yast, and went into the Yast partitioner.

Yast –> System –> Partitioner

In the partitioner, I clicked on “Volume Management”.

I’m not sure if I remember exactly what I did, and I would have to start with a new disk to repeat.

The first step, as I recall, was to assign a partition to use as an LVM. I assigned “/dev/sda2” for this. I had previously created that partition (I think with “fdisk”). I had to give the LVM a name, so I used “homesys”.

Once I had configured that partition to be an LVM, there was a box I could check to set the LVM to be encrypted. I checked that box. I was prompted for an encryption key (which I had to enter twice).

Next, I saw a screen listing the logical volumes. It was empty. I clicked on the button to add a logical volume (I think it was an “Add” button). Then I gave the logical volume an name (“root”), and set its size to what I wanted.

I repeated that for the “home” and “swap” logical volumes.

Then I clicked “Finish”. And that is when Yast did all of the actual work for setting up the LVM.

So now we get to installing opensuse.

After booting the install media (I used the 64 bit DVD image, written to a USB), I first had to accept the license agreement.

The next screen said that there were encrypted volumes, and did I want to provide a key. I clicked “yes” to that (not sure of the exact wording). Then I was prompted for the key, which I entered.

A few screens later, we got to the partitioning section of install. There was a proposed partition, which would have made a mess of the way that I had setup the disk. So, instead, I selected the expert button (I think it may have been “create partitioning”).

That took me to a screen that listed existing partitions. The list included:


For each of those lines, I could select the line, right click, select edit.

I edited the entry for “/dev/sda1” to set it to be formatted for “/boot”.
I edited the entry for “/dev/mapper/root” and set it to be formatted for “/” (the root file system).
I edited the entry for “/dev/mapper/swap” and set it to be formatted and mounted as swap.

Similarly for “/dev/mapper/home” and “/dev/sda3”, I indicated where I wanted them mounted and whether I wanted them to be formatted.

I hope the above helps.

Create partition sda2. Set it to not mount, type LVM and encrypted.
Add partition to volume group
Create volumes in this volume group

All with stock installer, no magic involved.

thank for all the replies, it really helps, working very well