freeNAS storage creation

rhoule

New Member
Sep 18, 2020
5
1
1
36
Hi!

I've been struggling to understand how zfs and raidz works and how it report available space.

I'm testing a setup where I use Proxmox host to create a couple of VM for my personnal use.

My first project is a freeNAS. I scavenged 3 2TB hard drive from old setup (if everything works fine, i'm planning on investing on real NAS drive).
So I created in my pve a storage zfs pool using the three drives and set them up in a raidz. Until now, everything is fine, I understand that in a raidz, i loose one drive for parity. So I end up with a zpool of 3.52TiB of available space.

Then, i created a FreeNAS VM using the SSD boot drive for the VM boot drive.

Now the part I don't understand. I want to allocate all my zfs pool for the freeNAS, so I go in hardware, add a hard drive, select the zpool (which report as 3.52TiB) and then for the storage space, which is in GiB, I try to input 3500. but it returns this error:


zfs error: cannot create 'mypool/vm-100-disk-0': out of space at /usr/share/perl5/PVE/API2/Qemu.pm line 1334. (500)

After messing around, I find that I cannot create a hard drive bigger than approximately 2600 GiB. Then I go back to the storage of the pve folder, and the 3.52 Tib is almost full.....

I don't understand why I cannot allocate 3500GiB or something like that to the vm.
 

Attachments

  • error.png
    error.png
    45.7 KB · Views: 22
  • max space.png
    max space.png
    7.7 KB · Views: 18
  • storage full.png
    storage full.png
    21.5 KB · Views: 18
You will want to just create a disk image in your ZFS pool instead. The action you are trying to do will make storage for your PVE environment. You've already done that. What you need is to create a disk image under your VM by adding hardware. Click on your VM, Click on Hardware, then click add >> Hard Disk. Under storage, select your existing RAIDz storage. This will make a hard disk which will be available to your FreeNAS VM.
 
After reading all this, and followed the links still not sure what i'm supposed to do.... I might have taken a too big of a byte (pun intended) for my knowledge.

Theres so many numbers and new terms for me that i get lost.

I will try to create the zpool and raidz using the cli and trying different block sizes and ashift so see how the overhead react.

If you have steps and recommendations I'm all open!!

Thanks
 
This is how I did it:

1. create a zpool (ashift 12 is important for the right offset - you need to exchange the disk-paths to your own)
Code:
sudo zpool create -f -o ashift=12 HDD-POOL-RAIDZ raidz /dev/disk/by-vdev/C0-S0 /dev/disk/by-vdev/C0-S1 /dev/disk/by-vdev/C0-S2
2. create zfs devices - bs 64k needed due to RAIDZ* stripe behavior. 8k default creates overhead.
Code:
sudo zfs create -b 64k -V 1000gb HDD-POOL-RAIDZ/vm-100-disk-1

After that attach the disk to the VM in the UI. Make sure that the "vm-<id>" matches your own VM ID
 
Thanks for the detailled code!

I will have to try that later, looks like we have a puppy now and looks like it's a lot of work.... Every time I try to sit down and do my stuff, I end up with a wet spot on the carpet!!! haha
 

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!