[SOLVED] Noob question about Proxmox and ZFS

Ovidiu

Renowned Member
Apr 27, 2014
324
12
83
Hi there,

I have used Proxmox before and I have used ZFs before but never in combination. I have read all the Proxmox Wiki pages about ZFS on Linus and storages and am even more confused now.

I have installed Proxmox 5.2-9 via a Soyoustart template(64bit and ZFS) - I ended up having ZFS as my root file system. In my Proxmox dashboard under Datacenter => Storage I only see "local / type directory" storage. This obviously points to my local file system which is ZFS.

This server has 2 SSDs which run in a mirror.

The file /etc/pve/storage.cfg contains:

Code:
# definition of storage for Proxmox VE.
# this config can be managed manually, or via PVE web interface.
# please read https://pve.proxmox.com/pve-docs/pve-admin-guide.html#_storage_pools before changing this file

# storage for iso,vztmpl,backups
dir: local
       path /var/lib/vz
       content iso,vztmpl,backup

# default image store on ZFS based installation
zfspool: local-zfs
        pool rpool/data
        sparse
        content images,rootdir

After reading the Wiki pages I understand I need to add storage: ZFS and I ticked the box for "thin provisioning" - the resulting /etc/pve/storage.cfg contains:
Code:
dir: local
        path /var/lib/vz
        content rootdir,iso,vztmpl,images
        maxfiles 0

zfspool: local-zfs
        pool rpool/data
        content rootdir,images
        nodes jarvis
        sparse 1

I have a couple of questions:
- is what I did correct?
- can someone provide a 100% correct storage.cfg?
- why does my adding ZFS local storage result in adding rootdir to the loca storage?
 
Hi,

I have installed Proxmox 5.2-9 via a Soyoustart template(64bit and ZFS)

hmm, maybe ask them what they do in their specialized template... wouldn't be the first time where a hoster assembles a bit strange template...

is what I did correct?

should be, but

can someone provide a 100% correct storage.cfg?
Here's my ZFS entry, don't have ZFS as root FS and the node entry misses because this is my single node workstation anyway:
Code:
zfspool: toms-big-pool
   pool toms-big-pool
   content rootdir,images
   sparse 1

why does my adding ZFS local storage result in adding rootdir to the loca storage?

the 'local' storage is a bit special, it's always there and gets always added and cannot be removed, if you don't use it it's just a empty directory so no harm.

Do you still only see the local storage? What does
Code:
pvesm status
# and
zpool list
zfs list
outputs?
 
Thanks for explaining. I have taken the following away from your explanations:

- there is always a "local" storage so I'll use it for everything except my VMs which should reside on the local-zfs storage as that will enable me to do snapshot backups.
- noted your comment on the node, I had removed that as it is also only 1 single server but I couldn't edit my post here anymore to remove it from here too

After adding local-zfs I do see both local and local-zfs so all looks good, I was simply wondering why to start with I only saw local even though local-zfs was in the config file. ONLY after adding local-zfs via Proxmox GUI was it visible in the GUI.

but as you mentioned its probably some peculiarity of the Hosting providers template.

Thanks for taking the time to help me figure things out.
 
I have a very strange question.

Why do you use a template to setup?
What advantage it has over direct install from proxmox iso?
 
I have a very strange question.

Why do you use a template to setup?
What advantage it has over direct install from proxmox iso?

Some hosting providers have a selection of common OS which you can select to image your new dedicated server with.
Some provide additional arbitrary ISO addition, and there may be some which do not have an easy way to do this (with a bit of work you can image anything from an tmpfs chroot, naturally)

As hosted environments have some more complex needs for avoiding address conflicts, cleanly separating different servers, if not explicit told otherwise, etc. it can make sense to use their image to start with, as it's (hopefully) already adapted to this environment and may save someone some headaches and cursing over a specific network setup.... :)

Empirically it may be still better to use ours as we then can easier tell what a problems cause may be as we know what's in it and you know how its configured from start and be sure that nothing undesired was done or setup.

there is always a "local" storage so I'll use it for everything except my VMs which should reside on the local-zfs storage as that will enable me to do snapshot backups.

yes in your case you can use it just fine, some which have just a small OS disk and additional disks for their VM storage may not want to use it at all.

After adding local-zfs I do see both local and local-zfs so all looks good, I was simply wondering why to start with I only saw local even though local-zfs was in the config file. ONLY after adding local-zfs via Proxmox GUI was it visible in the GUI.

That's a bit strange though, if it's in the /etc/pve/storage.cfg it should pop up in the WebUI...
 
@thomas, thanks for the elaborate answers. Everything is as it should be right now and you were spot on: I am using the provider's template because getting access to a KVM is expensive and manually mounting a custom ISO is a lot of work...
 

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!