You are not logged in.

#1 2010-05-23 06:31:06

area
Member
Registered: 2008-09-18
Posts: 43

AIF configuration for lvm without encryption

First off, props to Dieter@be for AIF, so far its been a great tool.

Unfortunately it appears that I'm missing something in the config files. My goal is to setup sda to have 2 partitions, 1 for boot, 1 for a LVM pv with 1 volume group and 4 volumes. Based on the "fancy" example that comes included in the installer, I've widled away the encrypted volume to come to this:

GRUB_DEVICE=/dev/sda
PARTITIONS='/dev/sda 100:ext2:+ *:ext4'
BLOCKDATA='/dev/sda1 raw no_label ext2;yes;/boot;target;no_opts;no_label;no_params
/dev/sda2  lvm-pv no_label lvm-vg;yes;no_mountpoint;target;no_opts;TheUncleared;/dev/sda2 
/dev/mapper/TheUncleared lvm-vg TheUncleared lvm-lv;yes;no_mountpoint;target;no_opts;swaplv;1G|lvm-lv;yes;no_mountpoint;target;no_opts;rootlv;10G|lvm-lv;yes;no_mountpoint;no_opts;homelv;20G|lvm-lv;yes;no_mountpoint;target;no_opts;foolv;42G
/dev/mapper/TheUncleared-swaplv lvm-lv no_label swap;yes;no_mountpoint;target;no_opts;no_label;no_params
/dev/mapper/TheUncleared-rootlv lvm-lv no_label ext4;yes;/;target;no_opts;no_label;no_params
/dev/mapper/TheUncleared-homelv lvm-lv no_label ext4;yes;/home;target;no_opts;no_label;no_params
/dev/mapper/TheUncleared-foolv lvm-lv no_label ext4;yes;/foo;target;no_opts;no_label;no_params'

Naturally, that doesn't work.

Phase 1: Creating filesystems & blockdevices
Making ext2 filesystem on /dev/sda1
Making lvm-vg filesystem on /dev/sda2
WARNING: process_filesystem error
Error creating filesystem lvm-vg on /dev/sda2.
Making lvm-lv filesysten on /dev/mapper/TheUncleared
WARNING: process_filesystem error
Error creating filesystem lvm-lv on /dev/mapper/TheUncleared

<edited 14:57 5/23>
... and it repeats 10x attempting to gain access to the device.

I'm guessing the problem is somewhere in the first two lines involving sda2 but I've spent the last 3 hrs sifting through the docs and code on github trying to come up with a valid declaration for what I want to accomplish. I would greatly appreciate any corrections to what I have or even just a link to more information about the parameters for each filestystem line.

Thanks
ARea

Last edited by area (2010-05-23 19:56:44)

Offline

#2 2010-05-23 08:46:43

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,001
Website

Re: AIF configuration for lvm without encryption

hmm on a quick glance your config looks okay. I'm assuming the "WARNING: process_filesystem error,Error creating filesystem lvm-pv on /dev/sda2. Failed to read physical volume "/dev/mapper/sda2lvm" error is the first one you get ?
did you do any manual lvm stuff before? if /dev/sda2 is in use (or already marked as PV) this will fail.
I also don't know why it looks for /dev/mapper/sda2lvm, since the PV is clearly /dev/sda2. doublecheck if you got all fields in the right places (in the source code the format is documented).
also, try to figure out why it does this (enabling debug logging can help)


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#3 2010-05-23 20:05:18

area
Member
Registered: 2008-09-18
Posts: 43

Re: AIF configuration for lvm without encryption

My apologies... I incorrectly copied the output from an earlier attempt. I've edited the post above to reflect the actual output from this config.

On to your suggestion....
The log doesn't give any more information. I also cleared the partition tables so that the script would run on a "clean" drive and the issue remains.

Does the PV filesystem actually need to be created or is it simply a matter or flagging the partition as lvm-pv? I came up with another config that more closely resembles the encryption example (essentially just removed the 2 halves of lines that referred to dm_crypt) and it failed trying to create the lvm-pv filesystem.   While it's possible, I doubt this is a case of corrupted install media as I successfully implemented this scheme manually yesterday.

Offline

#4 2010-05-23 20:22:37

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,001
Website

Re: AIF configuration for lvm without encryption

the problem is you're trying to make the lvm VG directly on the raw device
you should put:

/dev/sda2 raw no_label lvm-pv;yes;no_mountpoint;target;no_opts;no_label;no_params
/dev/sda2+ lvm-pv no_label lvm-vg;<your VG specs here>
<your other stuff here>

note that /dev/sda2+ does not actually exist, it's just a representation of the LVM PV.


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#5 2010-09-25 12:29:00

facko
Member
Registered: 2010-09-25
Posts: 2

Re: AIF configuration for lvm without encryption

Hello,

Could you please help me with this? I am still getting errors similar as area had:

GRUB_DEVICE=/dev/sda
PARTITIONS='/dev/sda 100:ext2:+ *:ext4'
BLOCKDATA='/dev/sda1 raw no_label ext2;yes;/boot;target;no_opts;no_label;no_paramso
/dev/sda2 raw no_label lvm-pv;yes;no_mountpoint;target;no_opts;sd2;no_params
/dev/sda2+ lvm-pv no_label lvm-vg;yes;no_mountpoint;target;no_opts;vgbaf;/dev/sda2
/dev/mapper/vgbaf lvm-pv no_label lvm-lv;yes;no_mountpoint;target;no_opts;lvswap;2G|lvm-lv;yes;no_mountpoint;target;no_opts;lvroot;10G|lvm-lv;yes;no_mountpoint;no_opts;lvhome;10G|lvm-lv;yes;no_mountpoint;target;no_opts;lvphoto;100G|lvm-vg;yes;no_mountpoint;target;no_opts;lvmedia;200G
/dev/mapper/vgbaf-lvswap lvm-lv no_label swap;yes;no_mountpoint;target;no_opts;no_label;no_params
/dev/mapper/vgbaf-lvroot lvm-lv no_label ext4;yes;/;target;no_opts;no_label;no_params
/dev/mapper/vgbaf-lvhome lvm-lv no_label ext4;yes;/home;target;no_opts;no_label;no_params
/dev/mapper/vgbaf-lvphoto lvm-lv no_label ext4;yes;/foo;target;no_opts;no_label;no_params
/dev/mapper/vgbaf-lvmedia lvm-lv no_label ext4;yes;/foo;target;no_opts;no_label;no_params'
Phase 1: Creating filesystems & blockdevices
Making ext2 filesystem on /dev/sda1
Making lvm-pv filesystem on /dev/sda2
WARNING: process_filesystem error
Error creating filesystem lvm-pv on /dev/sda2.


thank you!

Last edited by facko (2010-09-25 12:31:58)

Offline

#6 2010-09-28 08:38:38

facko
Member
Registered: 2010-09-25
Posts: 2

Re: AIF configuration for lvm without encryption

Any update please?
Is there even any possibility to install on top of existing LVM so I will not loose any data?

Thank you!

Offline

#7 2010-09-28 13:16:26

area
Member
Registered: 2008-09-18
Posts: 43

Re: AIF configuration for lvm without encryption

facko,

Unfortunately I was never able to get this working when I originally posted. In the end I decided to do the partitioning manually. If I have time in the next week I'll try to revisit the problem but I can make no guarantees.


facko wrote:

Any update please?
Is there even any possibility to install on top of existing LVM so I will not loose any data?

Thank you!


I don't quite follow what you are asking here. Could you restate the question?

Thanks and good luck

Offline

Board footer

Powered by FluxBB