Review My ZFS & Proxmox Storage Commands For Problems Or Optimizations Please

WhosTheBosch

Member
Jan 6, 2020
8
0
6
I'm going to be creating 4 types of ZFS data stores and I'm wondering if someone more experienced could let me know if these commands look good. I've also included the Proxmox storage commands to add it properly to the Proxmox system. Any tips or issues with the below commands would be appreciated!

Code:
#############################################
### ISO directory for ISO storage

# Create ZFS pool for ISOs on partition from OS disk (partitioned OS disk as it was 1TB)
zpool create -o ashift=12 -o autotrim=on -O atime=off -O acltype=posixacl -O compression=zstd-5 -O dnodesize=auto -O normalization=formD -O recordsize=1m -O relatime=on -O utf8only=on -O xattr=sa -m /data/sata0 sata0 DEVICE_ID-PARTITION

# Make ZFS dataset and the defaults should be taken from the pool
zfs create sata0/pve

# add directory to Proxmox - list as mountpoint to ensure it's mounted at startup
pvesm add dir isos --content iso --mkdir yes --is_mountpoint yes --path /data/sata0/pve

#############################################
### SSD storage for containers and VMs

# create ZFS pool on NVME SSD
zpool create -o ashift=12 -o autotrim=on -O atime=off -O acltype=posixacl -O compression=zstd-5 -O dnodesize=auto -O normalization=formD -O recordsize=1m -O relatime=on -O utf8only=on -O xattr=sa -m /data/nvme0 nvme0 DEVICE_ID

# Create ZFS datasets for containers
zfs create nvme0/cts0

# Create ZFS dataset for VMs - change recordsize to 64k as zvols will use that size
zfs create -o recordsize=64k nvme0/vms0

# add both container and VM storage to Proxmox - make sure the blocksize matches recordsize
pvesm add zfspool cts0 --blocksize 1M --content rootdir --pool nvme0/cts0
pvesm add zfspool vms0 --blocksize 64k --content images --pool nvme0/vms0

#############################################
### HDD storage for archived media i.e. pics, movies, etc

# create ZFS zraid pool on 4 HDDs
zpool create -o ashift=12 -O atime=off -O acltype=posixacl -O compression=zstd-5 -O dnodesize=auto -O normalization=formD -O recordsize=1m -O relatime=on -O utf8only=on -O xattr=sa -m /data/archive archive raidz DEVICE_ID1 DEVICE_ID2 DEVICE_ID3 DEVICE_ID4

# create ZFS dataset for documents with smaller recordsize
zfs create -o recordsize=256k archive/documents

# create ZFS datasets for movies
zfs create archive/movies

# create ZFS dataset for pictures
zfs create archive/pictures

# no proxmox storage types needed as I will mount it as NFS where needed for Linux / Windows / MacOS
 
Last edited:

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!