preseeding/partman-auto: LVM expert recipe problem

October 25th, 2011 - 07:10 am ET by Thorsten Sperber | Report spam
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-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/j8648v$mqs$1@dough.gmane.org
email Follow the discussionReplies 6 repliesReplies Make a reply

Similar topics

Replies

#1 Raf Czlonka
October 25th, 2011 - 08:50 am ET | Report spam
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
with a subject of "unsubscribe". Trouble? Contact
Archive: http://lists.debian.org/
Replies Reply to this message
#2 Tom H
October 25th, 2011 - 09:40 am ET | Report spam
On Tue, Oct 25, 2011 at 6:49 AM, Thorsten Sperber wrote:

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.



(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
with a subject of "unsubscribe". Trouble? Contact
Archive: http://lists.debian.org/CAOdo=SwoCz...qPukAJDRm+
Replies Reply to this message
#3 Thorsten Sperber
October 25th, 2011 - 10:00 am ET | Report spam
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
with a subject of "unsubscribe". Trouble? Contact
Archive: http://lists.debian.org/j86etr$7eu$
Replies Reply to this message
#4 Thorsten Sperber
October 25th, 2011 - 10:10 am ET | Report spam
On 25.10.2011 15:38, Tom H wrote:
On Tue, Oct 25, 2011 at 6:49 AM, Thorsten Sperber 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
with a subject of "unsubscribe". Trouble? Contact
Archive: http://lists.debian.org/j86fsk$gao$
Replies Reply to this message
#5 Thorsten Sperber
October 27th, 2011 - 06:00 am ET | Report spam

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






ehm, bump?


To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact
Archive: http://lists.debian.org/
Replies Reply to this message
Help Create a new topicNext page Replies Make a reply
Search Make your own search