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

grobs

Active Member
Apr 1, 2016
56
0
26
38
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.