[SOLVED] Proxmox + Nas

Drok

Member
Sep 8, 2019
8
2
23
21
Hello,
I'm new to proxmox and virtualization in general. Currently i have two containers running one of which I'd like to use as a NAS with ZFS and RAIDZ5. However I have run into a problem with disks. At first I assumed I should just try to pass the physical drives to the Nas Container for it to handle without proxmox getting in the way. Sadly I couldn't get that to work so I decided to look for other solutions. One such solution seems to be creating a zpool in proxmox and passing that to the nas container. This method seems improper to me for some reason. Was I right to try to pass the hard rives to the container and have it handle the zfs and raid or is making the zpool in proxmox the proper solution.
 
Hello and welcome to Proxmox :)

there are many ways to use proxmox as NAS. To use ZFS is the first right point ;) We do this, this way. We use a lot of proxmox running as NAS or SAN with ZFS. Easily create an CT with one disk, after this add another disk to this container for the NAS storage. We install always an Ubuntucontainter and configure NASfeatures with webmin.
To export NFS use proxmox directly, if you would like also with webmin. AD/Domainjoin is also posible. So feel free.
 
Hello and welcome to Proxmox :)

there are many ways to use proxmox as NAS. To use ZFS is the first right point ;) We do this, this way. We use a lot of proxmox running as NAS or SAN with ZFS. Easily create an CT with one disk, after this add another disk to this container for the NAS storage. We install always an Ubuntucontainter and configure NASfeatures with webmin.
To export NFS use proxmox directly, if you would like also with webmin. AD/Domainjoin is also posible. So feel free.
So just to make sure I understand, I should use proxmox to create the RaidZ5 and then pass that to a container to act as the actual NAS? So for my case I'd pass it to CentOS with Samba or something similar to connect using my windows pc?
 
Yes and no. You do not pass that to the container. You create a zvol and that is part of the container. And i think you mean you create a RaidZ1 (mean Raid5) right? I can only advise against Raid 5, unless you care about the speed and security. If possible always use Raid10 And yes you can do this with CentOS and Samba :) Should work fine same like Ubuntu.
 
Yes and no. You do not pass that to the container. You create a zvol and that is part of the container. And i think you mean you create a RaidZ1 (mean Raid5) right? I can only advise against Raid 5, unless you care about the speed and security. If possible always use Raid10 And yes you can do this with CentOS and Samba :) Should work fine same like Ubuntu.
Sorry, yes i meant the equivalent to Raid5. I've heard conflicting info about raid5. I chose it because I though it was a good mix between being failure safe and high capacity unless you have a better solution for those two criteria.

Edit:
I planned on using 4x4TB WD Red.

Edit2:
Did some research and understand now that the issue with Raid5/Z1 would be read errors during a rebuild. Would Raid10 allow me to expand later and if so wouldn't that also create an issue regarding read errors as it would have to re-stripe the drives? Sorry if these are basic questions I'm just new to this whole thing and I'm trying to learn rather than just blindly follow advice.
 
Last edited:
  • Like
Reactions: fireon
So I believe I've properly created the zpool and the storage in a way that proxmox knows about it but it seems to only be able to store specific types of files such as iso. I'm so confused what am I doing wrong?
 
If you created your zpool, you have to create a dataset were you store your vm's and containers. If you can save iso-image, then you added only an directory. If you created your zpool over the gui, everything goes automaticly. So please post your "/etc/pve/storage.cfg".

Code:
For example for a zpool:

zfspool: SSD-local-zfs
        pool rpool/data
        content images,rootdir
        sparse 1
 
Here's the contents of "/etc/pve/storage.cfg".

Code:
dir: local
        path /var/lib/vz
        content iso,backup,vztmpl

lvmthin: local-lvm
        thinpool data
        vgname pve
        content rootdir,images

zfspool: shared
        pool zfs-pool
        content rootdir,images
        sparse 0

If I'm understanding what you're saying i should be able to put any files on there? The gui makes it seems like only Images for Vms and Containers so I was confused.
 
Last edited:
You have added an zpool directly. Not a good idea. Please add an dataset to you pool, and add this as storage to proxmox.
Code:
zfs create zfs-pool/vmdata
And yes you are able to place any files on zfs. But not directly with proxmox in the webgui. Create a container, add an extra mountpoint to you container, export this in your container with samba, and one part of your NAS is ready.

And yes, you can also add another dataset on you zpool to export the filesystem directly as NFS, or also on proxmox directly with samba too.
Code:
zfs create zfs-pool/mynfsshare-xxx
 
You have added an zpool directly. Not a good idea. Please add an dataset to you pool, and add this as storage to proxmox.
Code:
zfs create zfs-pool/vmdata
And yes you are able to place any files on zfs. But not directly with proxmox in the webgui. Create a container, add an extra mountpoint to you container, export this in your container with samba, and one part of your NAS is ready.

And yes, you can also add another dataset on you zpool to export the filesystem directly as NFS, or also on proxmox directly with samba too.
Code:
zfs create zfs-pool/mynfsshare-xxx
Thank you, I figured that much out earlier today but forgot to update this post. Two final things I can't figure out. Firrst how can I give the container access to all of the space on the zfs pool without manually entering the number. And second, I dont know if this is a proxmox or samba thing, how would I allow Samba or another piece of software to accurately report how much space is left. Currently on windows the share just looks like a folder and doesn't say how much space is used or available.
 
Last edited:
Firrst how can I give the container access to all of the space on the zfs pool without manually entering the number. And second, I dont know if this is a proxmox or samba thing, how would I allow Samba or another piece of software to accurately report how much space is left. Currently on windows the share just looks like a folder and doesn't say how much space is used or available.
Not give all the Space to to CT. For HDD's give max. 80% and for SSD's max 90%. Up this value zfs will be slower and slower because fragmentation. Advantage, up to this value: High write Speed :) because the data is stored somewhere on the pool.
For really easy monitoring, also @home use CheckMK: https://checkmk.de/
 
Not give all the Space to to CT. For HDD's give max. 80% and for SSD's max 90%. Up this value zfs will be slower and slower because fragmentation. Advantage, up to this value: High write Speed :) because the data is stored somewhere on the pool.
For really easy monitoring, also @home use CheckMK: https://checkmk.de/
Ok I didn't realize that. So if proxmox reports the pool having 7.25TiB I should only give 80% of that to the container meaning 5.8TiB? And you say that's because of fragmentation but couldn't I just defrag it or would it not work like that. I have it currently set to 7TiB how would I shrink it? 'pct resize' doesn't support shrinking.

Also got the disk usage to show up on windows I just mapped it as a network location instead of a network drive.
 
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!