PVE Installer 5.0 - possible to install on disk partition only (not whole disk on zfs)

Giovanni

Renowned Member
Apr 1, 2009
108
10
83
Would it be possible to take an entire disk (256GB SSD) and break it down into smaller partitions, then install rpool on a fragment of the disk only?

Right now the installer for PVE 5.0 beta2 when selecting zfs raid1 from the menu it shows entire disk /dev/sda, any possibility to have the installer install on /dev/sda1 (first partition).

Why?
I have two Samsung 840 Pro 256gb SSDs and would like to avoid using the entire disk for rpool - ideally I would want to install proxmox on 60GB and then RAID1 with the second SSD, in such case that if either SSD fails the system will continue to boot up.

The remainder disk space (about 170gb left free), I would try to allocate 30gb for RAID0 for L2ARC, leaving 140gb unallocated so that the disk can reallocate sectors as they age with the SSD or use.

I know ZFS on Linux does not support SSD TRIM as FreeBSD does, has proxmox 5.0 Beta by chance implemented TRIM? There is a MERGE request in github including this feature.

Here is an example from the freenas forums for a similar attempt to do the above, is this possible in proxmox but for the rpool install?
 
I would like something like this as well :) It would be awesome to partition the disks used for ZFS boot-drives.

I'm currently using something like 20GB/250 so it would be good for longer lifespan.
 
I would like something like this as well :) It would be awesome to partition the disks used for ZFS boot-drives.

I'm currently using something like 20GB/250 so it would be good for longer lifespan.

I spent quite a few hours today figuring it out on my own, with a bit of trial and error I finally got what i wanted. I put together a quick blog post with the commands that may help you do the same. It's 4:30am here so time to rest and keep playing with this tomorrow.

root@pve:~# zpool status
pool: rpool
state: ONLINE
scan: none requested
config:

NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
sda2 ONLINE 0 0 0
sdb2 ONLINE 0 0 0

errors: No known data errors

pool: stripe
state: ONLINE
scan: none requested
config:

NAME STATE READ WRITE CKSUM
stripe ONLINE 0 0 0
sda3 ONLINE 0 0 0
sdb3 ONLINE 0 0 0

errors: No known data errors
root@pve:~# zpool list
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
rpool 74.5G 1010M 73.5G - 0% 1% 1.00x ONLINE -
stripe 46.5G 936K 46.5G - 0% 0% 1.00x ONLINE -
root@pve:~# fdisk -l /dev/sda /dev/sdb
Disk /dev/sda: 238.5 GiB, 256060514304 bytes, 500118192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 08D97179-2EC2-4FAD-BDDE-B9F58B687021

Device Start End Sectors Size Type
/dev/sda1 34 2047 2014 1007K BIOS boot
/dev/sda2 2048 156252048 156250001 74.5G Solaris /usr & Apple ZFS
/dev/sda3 156252049 205080174 48828126 23.3G Solaris /usr & Apple ZFS
/dev/sda4 205080175 205096559 16385 8M Solaris reserved 1


Disk /dev/sdb: 238.5 GiB, 256060514304 bytes, 500118192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 66EB71E4-0357-4197-B034-D8168D6C26B4

Device Start End Sectors Size Type
/dev/sdb1 34 2047 2014 1007K BIOS boot
/dev/sdb2 2048 156252048 156250001 74.5G Solaris /usr & Apple ZFS
/dev/sdb3 156252049 205080174 48828126 23.3G Solaris /usr & Apple ZFS
/dev/sdb4 205080175 205096559 16385 8M Solaris reserved 1
root@pve:~#
 
Would it be possible to take an entire disk (256GB SSD) and break it down into smaller partitions, then install rpool on a fragment of the disk only?

Right now the installer for PVE 5.0 beta2 when selecting zfs raid1 from the menu it shows entire disk /dev/sda, any possibility to have the installer install on /dev/sda1 (first partition).

Why?

to keep it simple. if you need to support more advanced/complicated setup scenarios, you can always install manually on top of Debian.

I have two Samsung 840 Pro 256gb SSDs and would like to avoid using the entire disk for rpool - ideally I would want to install proxmox on 60GB and then RAID1 with the second SSD, in such case that if either SSD fails the system will continue to boot up.

you already get that redundancy with the full disk?

The remainder disk space (about 170gb left free), I would try to allocate 30gb for RAID0 for L2ARC, leaving 140gb unallocated so that the disk can reallocate sectors as they age with the SSD or use.

putting L2ARC on the same disks where your pool already has does not make any sense at all. the idea behind L2ARC is to cache (meta)data on a device that is fast than your regular pool vdevs, in order to speed up read access.

I know ZFS on Linux does not support SSD TRIM as FreeBSD does, has proxmox 5.0 Beta by chance implemented TRIM? There is a MERGE request in github including this feature.

that is a way too big change to merge before upstream does, sorry.

Here is an example from the freenas forums for a similar attempt to do the above, is this possible in proxmox but for the rpool install?

please also note all the comments there telling the user that what they are trying to do is a bad idea ;)
 
to keep it simple. if you need to support more advanced/complicated setup scenarios, you can always install manually on top of Debian.



you already get that redundancy with the full disk?



putting L2ARC on the same disks where your pool already has does not make any sense at all. the idea behind L2ARC is to cache (meta)data on a device that is fast than your regular pool vdevs, in order to speed up read access.



that is a way too big change to merge before upstream does, sorry.



please also note all the comments there telling the user that what they are trying to do is a bad idea ;)


What would happen if I used parted to shrink the sda2 + sdb2 partitions on my rpool? Would that even be possible, and if yes, what steps would I take if its on my boot pool (I can't really export the pool?)
 

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!