Proxmox install script

Nemesiz

Renowned Member
Jan 16, 2009
753
65
93
Lithuania
Hello Proxmox architects.

This topic is for you. I started to use Proxmox a log time ago and in that period did only 2-3 (re-)installs and as I remember installer script doesn't improved talking from GUI functionality. Does it have a back button ? If yes then it hidden very well.

But I want to talk not about that. Mostly I care is setup of ZFS. You did very good job making it available to use. But it have few problems.

The list of ZFS setup problems.

1. missing options of ZFS pool in creating time.
2. ashift is set 12 in hard way
3. missing set up hard disk partition size for ZFS pool

There is my suggestions

1. Selecting hard disk for ZFS pool need to add line for custom ZFS pool options and modify zfs_create_rpool function

Code:
syscmd ("zpool create -f -o ashift=12 -o cachefile=none $zfspooolname $vdev") ....

to

Code:
syscmd ("zpool create -f -o ashift=12 -o cachefile=none $custom_zfs_options $zfspooolname $vdev") ....

In this way I can set any ZFS option I want. For example copies (1/2/3), checksum, compression and any other setting which is important in creating time.

2. ashift=12 sets to work with 4k sector size. But not all hard drives sectors are 4k in size. Then you use 4k bytes instead 512 bytes on old hard drive with 512 bytes physical sectors you loose space and performance. Of course not everyone care it but still will be cool to able control it.

So suggestion is to make available to choose ashift 9/12/auto in creating time as selectable option.

3. ZFS pool with different size of hard disks. A lot of people will say better to use all hard disk but in reality there are a lot of situation then you forced to use partition instead of all hard disk. Example http://forum.proxmox.com/threads/25...Error-when-installing-proxmox-4-to-zfs-raid10

As of me I have 2 hard disks. One is 50GB size, another 80GB size. Perfect to use in mirror to boot system only. But I cant use this mirror because of different size of hard disks.

To make it work we need editable option and some changes inside installation script.

Lets look at partition_bootable_zfs_disk. I see one line wich create partition for ZFS "sgdisk -n2:2048:0 ...." I dont care about -n1 (for boot) and -n9 for 8M size last partition but for this with editable option could look like this "sgdisk -n2:2048:$custom_size ...." and there I could set for example 20G or 45G and use ZFS pool from different size hard disks.


So Proxmox team I wish you to look at these suggestions and maybe implement it. Thanks
 

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!