[SOLVED] How to properly set/use ZFS pools in a cluster?

grobs

Active Member
Apr 1, 2016
56
0
26
37
France
Hi everyone,

I have a proxmox 4 cluster using local disks as storage (type = directory) and I'm currently testing ZFS pools on my futur cluster (proxmox 5).

On my old cluster (storage type = directory), I can cold-migrate LXC containers from a proxmox host to another because every host has a storage called "local".

On my new cluster, the first node have a "local" storage (type = directory) automatically created and a local-zfs (type = ZFS) that I created in order to store my LXC containers. The problem is that I tried to create a "local-zfs" storage on the second cluster's host but it tells my that the storage already exists:

Code:
root@proxmox5-staging-02:~# pvesm add zfspool --pool rpool/data local-zfs
create storage failed: error with cfs lock 'file-storage_cfg': storage ID 'local-zfs' already defined

Which is normal because it has already been created on the first node.

Here are my questions and thoughts:
  1. How can I set ZFS to be able to locally store my containers and migrate them from a host to another?
  2. What is the best use of ZFS pools for you to use every host's disks in the cluster and do replication? Should I have a ZFS pool per host or one pool shared with every host?
Regards
 
Last edited:
Of course it is, it was created on the first node and couldn't be created on the second, it seems legitimate.
But if I enable "local-zfs" storage on the second node, I think that data will go to my first node, which is not what I want.
Maybe I'm wrong on this?
 
If there's a local storage added (either via GUI or pvesm) that's not limited to specific nodes, it is assumed to be available on all nodes of a cluster.
 
You are wrong. local-zfs as name said is LOCAL !
The name "local-zfs" was decided my myself, I could have named it "foo-bar" if I wanted to ;-)

dlimeck said:
If there's a local storage added (either via GUI or pvesm) that's not limited to specific nodes, it is assumed to be available on all nodes of a cluster.
Ok so if I uncheck the first node for this storage on the GUI, it indicates that it will be available to every node of the cluster. I will test this and see if my data is locally written or not.
 

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!