linux lvm partition using partman in preseed
<p>I'm trying to customise preseed on ubuntu 14.04. Where all the parameter  required for installation are stored. At the time of first OS boot value and variables are exported, and configuration is completed without any manual intervention . 
During this process for hardware configuration i opted for LVM based architecture. </p>

<p>When i tried with fixed disk space it works fine for below configuration</p>

<pre><code>d-i partman-auto/expert_recipe string               \
    boot-root ::                                    \
        250 1000 300 ext4                           \
            $primary{ } $bootable{ }                \
            method{ format } format{ }              \
            use_filesystem{ } filesystem{ ext4 }    \
            mountpoint{ /boot }                     \
        .                                           \
# swap with at least 5GB, maximum size of memory
        5120 500 100% linux-swap                    \
            $lvmok{ }                               \
            method{ swap } format{ }                \
        .                                           \
# /var/db/application with at least 40GB, maximum 40GB, and ext4
        40960 1000 40960 ext4                       \
            $lvmok{ }                               \
            method{ format } format{ }              \
            use_filesystem{ } filesystem{ ext4 }    \
            mountpoint{ /var/db/application }           \
        .                                           \
# / with at least 40GB, maximum 40GB, and ext4
        40960 1000 40960 ext4                       \
            $lvmok{ }                               \
            method{ format } format{ }              \
            use_filesystem{ } filesystem{ ext4 }    \
            mountpoint{ / }                         \
        .                                           \
# /var/log/application with at least 20GB, maximum rest of space, and ext4
        20480 1000 1000000 ext4                    \
            $lvmok{ }                               \
            method{ format } format{ }              \
            use_filesystem{ } filesystem{ ext4 }    \
            mountpoint{ /var/log/application }      \
        .                                           \
</code></pre>

<p>My query is when i tried assigning disk space based on percentage, Since hard disk allocation is different every time. It doesn't work for me. The partman configuration is as below</p>

<pre><code>d-i partman-auto/expert_recipe string               \
    boot-root ::                                    \
        250 1000 300 ext4                           \
            $primary{ } $bootable{ }                \
            method{ format } format{ }              \
            use_filesystem{ } filesystem{ ext4 }    \
            mountpoint{ /boot }                     \
        .                                           \
# swap with at least 5GB, maximum size of memory
        5120 500 100% linux-swap                    \
            $lvmok{ }                               \
            method{ swap } format{ }                \
        .                                           \
# /var/db/application with at least 40% of disk provided, maximum 40% of disk provided, and ext4
        40% 1000 40% ext4                       \
            $lvmok{ }                               \
            method{ format } format{ }              \
            use_filesystem{ } filesystem{ ext4 }    \
            mountpoint{ /var/db/application }           \
        .                                           \
# / with at least 35% of disk provided, maximum 35% of disk provided, and ext4
        35% 1000 35% ext4                       \
            $lvmok{ }                               \
            method{ format } format{ }              \
            use_filesystem{ } filesystem{ ext4 }    \
            mountpoint{ / }                         \
        .                                           \
# /var/log/application with at least 20% of disk provided, maximum rest of space, and ext4
        20% 1000 1000000 ext4                       \
            $lvmok{ }                               \
            method{ format } format{ }              \
            use_filesystem{ } filesystem{ ext4 }    \
            mountpoint{ /var/log/application }      \
        .                                           \
</code></pre>

<p>Any help where i'm going wrong</p>