Installer automatic partitioning

diaolin

Renowned Member
Jul 7, 2008
332
8
83
Trentino Italy
In the auto installer i've found such a dimension:

my $swapsize = (($hdgb > 32) ? 4 : $hdgb/8)*1024*1024;
my $space = (($hdgb > 32) ? 4 : $hdgb/8)*1024*1024;
my $maxroot = 96;
my $rootsize = (($hdgb > ($maxroot*4)) ? $maxroot : $hdgb/4)*1024*1024;
my $rest = int($hdsize) - $linuxstart - $swapsize - $space - $rootsize; # in KB


this lets the maxroot to 96Gb if the disk is smaller than 4*96 then
use the 25% of the disk...

I think that it's too much

I've just changed manually the iso but i think it would be better to
ask the user during the installation phase

30Gb of root i think is a big size due to the fact that all the vms
are installed on a separate partition (LVM) that uses the rest of the disk.

Is it possible to change that?


Tx, and my compliments for this great interface.
I've made a presentation with 20 or more sysadmins and all have my opinion
about this solution: GREAT!

Diaolin
 
this lets the maxroot to 96Gb if the disk is smaller than 4*96 then
use the 25% of the disk...

I think that it's too much

Many users make backups using 'vzdump' and LVM snapshots. Its just very convienient to have that data local, and that is why we reserve up to 100GB.

I've just changed manually the iso but i think it would be better to
ask the user during the installation phase

The basic design principle is to keep it simple, i.e. never ask users questions they cannot answer (Average Sysadmin has no idea about the partition sizes needed, or why he need partitions at all).

30Gb of root i think is a big size due to the fact that all the vms
are installed on a separate partition (LVM) that uses the rest of the disk.

Is it possible to change that?

I guess I would accept a patch adding a special boot parameter 'maxroot', defining the max. root partition size.

Tx, and my compliments for this great interface.
I've made a presentation with 20 or more sysadmins and all have my opinion
about this solution: GREAT!

Many thanks for that presentation.

- Dietmar
 
Ok, i'll post the patch...

Many users make backups using 'vzdump' and LVM snapshots. Its just very convienient to have that data local, and that is why we reserve up to 100GB.

Local backup is like to marry the same woman every 6 month :)
:)


I guess I would accept a patch adding a special boot parameter 'maxroot', defining the max. root partition size.

Ok i'll send the patch


Many thanks for that presentation.

As you heard it's all in italian...

Probably i will find $contributors$

Ciao, Daolin
 
patch....

line 268 of proxinstall

remove
my $swapsize = (($hdgb > 32) ? 4 : $hdgb/8)*1024*1024;
my $space = (($hdgb > 32) ? 4 : $hdgb/8)*1024*1024;
my $maxroot = 96;

and substitute with this:

#patch to pass swapsize and maxroot
open CMDLINE,"/proc/cmdline";
my $row = <CMDLINE>;
close CMDLINE;
my $swapsize = 0;
my $maxroot = 0;
if ($row =~ /swapsize/i) {
$row =~ /swapsize=(\d+)[\s|\n]/i;
$swapsize=$1*1024*1024;
} else {
$swapsize = (($hdgb > 32) ? 4 : $hdgb/8)*1024*1024;
}

my $space = (($hdgb > 32) ? 4 : $hdgb/8)*1024*1024;
if ($row =~ /maxroot/i) {
$row =~ /maxroot=(\d+)[\s|\n]/i;
$maxroot=$1;
} else {
$maxroot = 96;
}

#end cmdline parameters



In this manner you can pass maxroot=30 and swapsize=8
thus you can have a 8Gb swap and 30Gb partition fixed at boot


Ciao, Diaolin
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!