Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

preseeding/partman-auto: LVM expert recipe problem

1,005 views
Skip to first unread message

Thorsten Sperber

unread,
Oct 25, 2011, 7:10:01 AM10/25/11
to
Hi,

I have a problem regarding the partman-auto/expert-recipe. I have this
minimal recipe (very minimal, not really useful at all except to prove
this bug) and it calculates 2200000100 MB (and a lot more in my original
recipe).

: Oct 25 10:25:49 partman-auto: Available disk space (31457) too small
for expert recipe (2200000100); skipping

31457 is the ~30GB sized virtual hard disk I use for testing.

I hope this is fixable, since it is part of the stable installer.

mini recipe here:

<code>
d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string lvm
d-i partman-auto/purge_lvm_from_device boolean true
d-i partman-lvm/confirm boolean true
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-auto-lvm/new_vg_name string SBS_PV
# d-i partman-lvm/vgcreate string SBS_PV
d-i partman-auto/expert_recipe string \
boot-root:: \
100 1000 100 ext3 \
$primary{ } \
$bootable{ } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ ext3 } \
mountpoint{ /boot } \
. \
\
\
100 1000 100 ext3 \
$lvmok{ } \
method{ format } \
format{ } \
use-filesystem{ } \
filesystem{ ext3 } \
mountpoint{ / } \
.
</code>

My desired recipe contains an explicitly declared PV, some more LV with
more defined stuff and follows all the rules I found in the
debian-installer:$doc/debian-installer/devel files (which could really
need some more examples and rules description),

The basic problem is the wrong calculation of the minimum size. I
already tried it with different priorities to see their effect on the
result, but no change.

Thorsten


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/j8648v$mqs$1...@dough.gmane.org

Raf Czlonka

unread,
Oct 25, 2011, 8:50:01 AM10/25/11
to
On Tue, Oct 25, 2011 at 11:49:52AM BST, Thorsten Sperber wrote:
> 100 1000 100 ext3 \
> $lvmok{ } \
> method{ format } \
> format{ } \
> use-filesystem{ } \
> filesystem{ ext3 } \
> mountpoint{ / } \

You're using 100MB as both the minimum and the maximum size of the "/"
(root) partition. It probably (I'm almost 100% sure) is not enough
space even for a basic installation - read point 7 in the document you
quoted.

> My desired recipe contains an explicitly declared PV, some more LV
> with more defined stuff and follows all the rules I found in the
> debian-installer:$doc/debian-installer/devel files (which could
> really need some more examples and rules description),

In the same document read points 5-6.

> The basic problem is the wrong calculation of the minimum size. I
> already tried it with different priorities to see their effect on
> the result, but no change.

I guess it's not the priority - it's the size.

Regards,
--
Raf


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/2011102512...@linuxstuff.pl

Tom H

unread,
Oct 25, 2011, 9:40:01 AM10/25/11
to
(You don't need the "\" within the recipes)

Can the installer's partitioning algorithm really do that?!

>From "partman-auto-recipe.txt":

6. HOW THE ACTUAL PARTITION SIZES ARE COMPUTED
----------------------------------------------

Suppose we have to create N partitions and min[i], max[i] and
priority[i] are the minimal size, the maximal size and the priority of
the partition #i as described in section 1.

Let free_space be the size of the free space to partition.

Then do the following:

for(i=1;i<=N;i++) {
factor[i] = priority[i] - min[i];
}
ready = FALSE;
while (! ready) {
minsum = min[1] + min[2] + ... + min[N];
factsum = factor[1] + factor[2] + ... + factor[N];
ready = TRUE;
for(i=1;i<=N;i++) {
x = min[i] + (free_space - minsum) * factor[i] / factsum;
if (x > max[i])
x = max[i];
if (x != min[i]) {
ready = FALSE;
min[i] = x;
}
}
}

Then min[i] will be the size of partition #i.


7. APPENDIX
-----------

On May 25th 2004, it was noted that on i386 systems, the very minimum size of
a Debian installation on a classical (/, /usr, /usr, /home) setup was:
48MB on / (6MB on /boot)
77MB on /usr
17MB on /var
It is thus wise to use minimum values with this consideration in mind.

#261244: 70MB are required for /var
#265290: 1.8GB are not enough for / with desktop


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/CAOdoSwoCzeUXvg_QOdM4v3C...@mail.gmail.com

Thorsten Sperber

unread,
Oct 25, 2011, 10:00:02 AM10/25/11
to
On 25.10.2011 14:44, Raf Czlonka wrote:
> On Tue, Oct 25, 2011 at 11:49:52AM BST, Thorsten Sperber wrote:
>> 100 1000 100 ext3 \
>> $lvmok{ } \
>> method{ format } \
>> format{ } \
>> use-filesystem{ } \
>> filesystem{ ext3 } \
>> mountpoint{ / } \
>
> You're using 100MB as both the minimum and the maximum size of the "/"
> (root) partition. It probably (I'm almost 100% sure) is not enough
> space even for a basic installation - read point 7 in the document you
> quoted.
>

For the sole purpose of testing.

>> My desired recipe contains an explicitly declared PV, some more LV
>> with more defined stuff and follows all the rules I found in the
>> debian-installer:$doc/debian-installer/devel files (which could
>> really need some more examples and rules description),
>
> In the same document read points 5-6.

I did, and again: the values are for testing. I am aware that 100MB
(fixed size, therefore both min and max) is far to small.

>
>> The basic problem is the wrong calculation of the minimum size. I
>> already tried it with different priorities to see their effect on
>> the result, but no change.
>
> I guess it's not the priority - it's the size.
>
> Regards,

So, here is the complete thing:

<code>
d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string lvm
d-i partman-auto/purge_lvm_from_device boolean true
d-i partman-lvm/confirm boolean true
d-i partman-lvm/device_remove_lvm boolean true

d-i partman-auto-lvm/new_vg_name string SBS_PV
# d-i partman-lvm/vgcreate string SBS_PV

d-i partman-auto/expert_recipe string \
boot-root:: \
100 500 200 ext3 \
$primary{ } \
$bootable{ } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ ext3 } \
mountpoint{ /boot } \
. \
\
# physical-volume:: \
# 15000 1000 40000 ext3 \
# $defaultignore{ } \
# $primary{ } \
# method{ lvm } \
# vg_name{ SBS_PV } \
# device{ /dev/sda } \
# . \
\
logical-volumes:: \
1000 1000 2000 ext4 \
$lvmok{ } \
#in_vg{ SBS_PV } \
lv_name{ lvroot } \
method{ format } \
format{ } \
use-filesystem{ } \
filesystem{ ext4 } \
mountpoint{ / } \
. \
\
3000 1000 4000 ext4 \
$lvmok{ } \
#in_vg{ SBS_PV } \
lv_name{ lvusr } \
method{ format } \
format{ } \
use-filesystem{ } \
filesystem{ ext4 } \
mountpoint{ /usr } \
. \
\
5000 1000 6000 ext4 \
$lvmok{ } \
#in_vg{ SBS_PV } \
lv_name{ lvvar } \
method{ format } \
format{ } \
use-filesystem{ } \
filesystem{ ext4 } \
mountpoint{ /var } \
. \
\
1000 1000 2000 ext4 \
$lvmok{ } \
#in_vg{ SBS_PV } \
lv_name{ lvtmp } \
method{ format } \
format{ } \
use-filesystem{ } \
filesystem{ ext4 } \
mountpoint{ /tmp } \
. \
\
1000 1000 2000 ext4 \
$lvmok{ } \
#in_vg{ SBS_PV } \
lv_name{ lvhome } \
method{ format } \
format{ } \
use-filesystem{ } \
filesystem{ ext4 } \
mountpoint{ /home } \
. \
\
64 1000 300% linux-swap \
$lvmok{ } \
#in_vg{ SBS_PV } \
lv_name{ lvswap } \
method{ swap } \
format{ } \
. \
\
# 10 1000 -1 ext4 \
# $defaultignore{ } \
# $lvmok{ } \
# in_vg{ SBS_PV } \
# lv_name{ lvdummy } \
# . \


d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition \
select Finish partitioning and write changes to disk
d-i partman/confirm boolean true

</code>

Disabled parts were tested, too.

Result of the above:

Oct 25 13:48:03 partman-auto: Available disk space (31457) too small for
expert recipe (4400010064); skipping



--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/j86etr$7eu$1...@dough.gmane.org

Thorsten Sperber

unread,
Oct 25, 2011, 10:10:02 AM10/25/11
to
On 25.10.2011 15:38, Tom H wrote:
> On Tue, Oct 25, 2011 at 6:49 AM, Thorsten Sperber <li...@aero2k.de> wrote:

>
> (You don't need the "\" within the recipes)

Thank you, I read about that and wasn't sure, because so many people's
examples contained them.

>
> Can the installer's partitioning algorithm really do that?!

Hm, I have a pretty similiar recipe with raid and this works..raid &
lvm. I just tested it again to be really sure. There is no
exabyte-recipe result.

>
>>From "partman-auto-recipe.txt":
>
> 6. HOW THE ACTUAL PARTITION SIZES ARE COMPUTED
> ----------------------------------------------
> -snip-
>

Well, I have to admit that I didn't make this calculation by hand.

>
> 7. APPENDIX
> -----------
>
> On May 25th 2004, it was noted that on i386 systems, the very minimum size of
> a Debian installation on a classical (/, /usr, /usr, /home) setup was:
> 48MB on / (6MB on /boot)
> 77MB on /usr
> 17MB on /var
> It is thus wise to use minimum values with this consideration in mind.
>
> #261244: 70MB are required for /var
> #265290: 1.8GB are not enough for / with desktop
>
>

Sure. See my reply to Raf Czlonka with the "real" recipe. I thought that
100MB would tell me something about the error, something quicker/easier
than proving it with 9 partitions/elements for the formula. At this time
of the installation, no information about the wanted packages are
available and even if 100MB are not enough for a base system, it has
*nothing* to do with this calculation.

Thorsten


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/j86fsk$gao$1...@dough.gmane.org

Thorsten Sperber

unread,
Oct 27, 2011, 6:00:01 AM10/27/11
to

>
> Oct 25 13:48:03 partman-auto: Available disk space (31457) too small for
> expert recipe (4400010064); skipping
>
>
>

ehm, bump?


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/4EA92742...@aero2k.de

Tom H

unread,
Oct 27, 2011, 5:30:02 PM10/27/11
to
On Thu, Oct 27, 2011 at 5:41 AM, Thorsten Sperber <li...@aero2k.de> wrote:
>>
>> Oct 25 13:48:03 partman-auto: Available disk space (31457) too small for
>> expert recipe (4400010064); skipping
>
> ehm, bump?

How about using just this?

It's the beginning of your full recipe but I've removed
"logical-volumes::" because it doesn't make sense to me.

d-i partman-auto/expert_recipe string
boot-root::
100 500 200 ext3
$primary{ }
$bootable{ }
method{ format }
format{ }
use_filesystem{ }
filesystem{ ext3 }
mountpoint{ /boot }
.
1000 1000 2000 ext4
$lvmok{ }
#in_vg{ SBS_PV }
lv_name{ lvroot }
method{ format }
format{ }
use-filesystem{ }
filesystem{ ext4 }
mountpoint{ / }
.


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/CAOdo=SwT2BSh-9ivCvx=T7XuJPE8q9_pCNx...@mail.gmail.com
0 new messages