Creating storage on second node with the same name

Archmatux

Renowned Member
Oct 18, 2016
16
5
68
32
Hi All,

I'm currently trying to get the replication feature set up.

My understanding was that at present, storage with the same ID was required on both nodes for this to function.

Unfortunately I'm unable to create storage with the same ID on my second node.

I currently have 2 nodes, HPV-01 and HPV-02.

HPV-01 currently has a ZFS pool named vmFlashPool which is added to Proxmox with the ID vmFlashPool.

I have created a ZFS pool on HPV-02 named vmFlashPool and am attempting to add it to Proxmox with the ID vmFlashPool as well.

However, I receive the error: create storage failed: storage ID 'vmFlashPool' already defined (500)

Am I going about this wrong?
 
Unfortunately I'm unable to create storage with the same ID on my second node.

What is the problem? Proxmox assumes that all storages are available on all nodes by default, so you cannot
create a second entry with the same ID.
 
What is the problem? Proxmox assumes that all storages are available on all nodes by default, so you cannot
create a second entry with the same ID.

That certainly makes sense.

I'm confused then how to configure the replication as it fails if the target storage does not have the same ID as the source.

Code:
2017-07-04 20:49:00 105-0: start replication job
2017-07-04 20:49:00 105-0: guest => CT 105, running => 1
2017-07-04 20:49:00 105-0: volumes => vmFlashPool:subvol-105-disk-1
2017-07-04 20:49:01 105-0: (remote_prepare_local_job) storage 'vmFlashPool' is not available on node 'hpv-02'

EDIT: Never mind. It appears to misunderstood the purpose of "Node Restrictions" when adding storage.

EDIT2: OK, replication now works. However, migration does not:

Code:
Task viewer: CT 105 - Migrate

OutputStatus

Stop
2017-07-05 20:30:36 shutdown CT 105
2017-07-05 20:30:36 # lxc-stop -n 105 --timeout 180
2017-07-05 20:31:02 # lxc-wait -n 105 -t 5 -s STOPPED
2017-07-05 20:31:03 starting migration of CT 105 to node 'hpv-02' (10.200.100.102)
2017-07-05 20:31:03 found local volume 'vmFlashPool2:subvol-105-disk-1' (via storage)
2017-07-05 20:31:03 found local volume 'vmFlashPool:subvol-105-disk-1' (in current VM config)
2017-07-05 20:31:03 start replication job
2017-07-05 20:31:03 guest => CT 105, running => 0
2017-07-05 20:31:03 volumes => vmFlashPool:subvol-105-disk-1
2017-07-05 20:31:04 create snapshot '__replicate_105-0_1499283063__' on vmFlashPool:subvol-105-disk-1
2017-07-05 20:31:04 incremental sync 'vmFlashPool:subvol-105-disk-1' (__replicate_105-0_1499283000__ => __replicate_105-0_1499283063__)
send from @__replicate_105-0_1499283000__ to vmFlashPool/subvol-105-disk-1@__replicate_105-0_1499283063__ estimated size is 561K
total estimated size is 561K
vmFlashPool/subvol-105-disk-1@__replicate_105-0_1499283000__ name vmFlashPool/subvol-105-disk-1@__replicate_105-0_1499283000__ -
TIME SENT SNAPSHOT
2017-07-05 20:31:05 delete previous replication snapshot '__replicate_105-0_1499283000__' on vmFlashPool:subvol-105-disk-1
2017-07-05 20:31:07 (remote_finalize_local_job) delete stale replication snapshot '__replicate_105-0_1499283000__' on vmFlashPool:subvol-105-disk-1
2017-07-05 20:31:07 end replication job
send from @ to vmFlashPool/subvol-105-disk-1@__replicate_105-0_1499283063__ estimated size is 999M
send from @__replicate_105-0_1499283063__ to vmFlashPool/subvol-105-disk-1@__migration__ estimated size is 0
total estimated size is 999M
vmFlashPool/subvol-105-disk-1 name vmFlashPool/subvol-105-disk-1 -
volume 'vmFlashPool/subvol-105-disk-1' already exists
TIME SENT SNAPSHOT
command 'zfs send -Rpv -- vmFlashPool/subvol-105-disk-1@__migration__' failed: got signal 13
send/receive failed, cleaning up snapshot(s)..
2017-07-05 20:31:08 ERROR: command 'set -o pipefail && pvesm export vmFlashPool2:subvol-105-disk-1 zfs - -with-snapshots 0 -snapshot __migration__ | /usr/bin/ssh -o 'BatchMode=yes' -o 'HostKeyAlias=hpv-02' root@10.200.100.102 -- pvesm import vmFlashPool2:subvol-105-disk-1 zfs - -with-snapshots 0 -delete-snapshot __migration__' failed: exit code 255
2017-07-05 20:31:08 aborting phase 1 - cleanup resources
2017-07-05 20:31:08 ERROR: found stale volume copy 'vmFlashPool2:subvol-105-disk-1' on node 'hpv-02'
2017-07-05 20:31:08 start final cleanup
2017-07-05 20:31:08 start container on target node
2017-07-05 20:31:08 # /usr/bin/ssh -o 'BatchMode=yes' -o 'HostKeyAlias=hpv-02' root@10.200.100.102 pct start 105
2017-07-05 20:31:09 Configuration file 'nodes/hpv-02/lxc/105.conf' does not exist
2017-07-05 20:31:09 ERROR: command '/usr/bin/ssh -o 'BatchMode=yes' -o 'HostKeyAlias=hpv-02' root@10.200.100.102 pct start 105' failed: exit code 255
2017-07-05 20:31:09 ERROR: migration aborted (duration 00:00:33): command 'set -o pipefail && pvesm export vmFlashPool2:subvol-105-disk-1 zfs - -with-snapshots 0 -snapshot __migration__ | /usr/bin/ssh -o 'BatchMode=yes' -o 'HostKeyAlias=hpv-02' root@10.200.100.102 -- pvesm import vmFlashPool2:subvol-105-disk-1 zfs - -with-snapshots 0 -delete-snapshot __migration__' failed: exit code 255
TASK ERROR: migration aborted

Same error I'm getting if I have no replica on the other host before migration:

Code:
2017-07-05 20:33:11 starting migration of CT 105 to node 'hpv-02' (10.200.100.102)
2017-07-05 20:33:11 found local volume 'vmFlashPool2:subvol-105-disk-1' (via storage)
2017-07-05 20:33:11 found local volume 'vmFlashPool:subvol-105-disk-1' (in current VM config)
2017-07-05 20:33:11 start replication job
2017-07-05 20:33:11 guest => CT 105, running => 0
2017-07-05 20:33:11 volumes => vmFlashPool:subvol-105-disk-1
2017-07-05 20:33:11 create snapshot '__replicate_105-0_1499283191__' on vmFlashPool:subvol-105-disk-1
2017-07-05 20:33:12 full sync 'vmFlashPool:subvol-105-disk-1' (__replicate_105-0_1499283191__)
send from @ to vmFlashPool/subvol-105-disk-1@__replicate_105-0_1499283063__ estimated size is 999M
send from @__replicate_105-0_1499283063__ to vmFlashPool/subvol-105-disk-1@__replicate_105-0_1499283191__ estimated size is 0
total estimated size is 999M
TIME        SENT   SNAPSHOT
20:33:15   79.8M   vmFlashPool/subvol-105-disk-1@__replicate_105-0_1499283063__
20:33:16    177M   vmFlashPool/subvol-105-disk-1@__replicate_105-0_1499283063__
20:33:17    288M   vmFlashPool/subvol-105-disk-1@__replicate_105-0_1499283063__
20:33:18    391M   vmFlashPool/subvol-105-disk-1@__replicate_105-0_1499283063__
20:33:19    489M   vmFlashPool/subvol-105-disk-1@__replicate_105-0_1499283063__
20:33:20    549M   vmFlashPool/subvol-105-disk-1@__replicate_105-0_1499283063__
20:33:21    656M   vmFlashPool/subvol-105-disk-1@__replicate_105-0_1499283063__
20:33:22    756M   vmFlashPool/subvol-105-disk-1@__replicate_105-0_1499283063__
20:33:23    860M   vmFlashPool/subvol-105-disk-1@__replicate_105-0_1499283063__
20:33:24    965M   vmFlashPool/subvol-105-disk-1@__replicate_105-0_1499283063__
TIME        SENT   SNAPSHOT
2017-07-05 20:33:27 delete previous replication snapshot '__replicate_105-0_1499283063__' on vmFlashPool:subvol-105-disk-1
2017-07-05 20:33:28 (remote_finalize_local_job) delete stale replication snapshot '__replicate_105-0_1499283063__' on vmFlashPool:subvol-105-disk-1
2017-07-05 20:33:28 end replication job
send from @ to vmFlashPool/subvol-105-disk-1@__replicate_105-0_1499283191__ estimated size is 999M
send from @__replicate_105-0_1499283191__ to vmFlashPool/subvol-105-disk-1@__migration__ estimated size is 0
total estimated size is 999M
vmFlashPool/subvol-105-disk-1    name    vmFlashPool/subvol-105-disk-1    -
volume 'vmFlashPool/subvol-105-disk-1' already exists
TIME        SENT   SNAPSHOT
command 'zfs send -Rpv -- vmFlashPool/subvol-105-disk-1@__migration__' failed: got signal 13
send/receive failed, cleaning up snapshot(s)..
2017-07-05 20:33:33 ERROR: command 'set -o pipefail && pvesm export vmFlashPool2:subvol-105-disk-1 zfs - -with-snapshots 0 -snapshot __migration__ | /usr/bin/ssh -o 'BatchMode=yes' -o 'HostKeyAlias=hpv-02' root@10.200.100.102 -- pvesm import vmFlashPool2:subvol-105-disk-1 zfs - -with-snapshots 0 -delete-snapshot __migration__' failed: exit code 255
2017-07-05 20:33:33 aborting phase 1 - cleanup resources
2017-07-05 20:33:33 ERROR: found stale volume copy 'vmFlashPool2:subvol-105-disk-1' on node 'hpv-02'
2017-07-05 20:33:33 start final cleanup
2017-07-05 20:33:33 ERROR: migration aborted (duration 00:00:23): command 'set -o pipefail && pvesm export vmFlashPool2:subvol-105-disk-1 zfs - -with-snapshots 0 -snapshot __migration__ | /usr/bin/ssh -o 'BatchMode=yes' -o 'HostKeyAlias=hpv-02' root@10.200.100.102 -- pvesm import vmFlashPool2:subvol-105-disk-1 zfs - -with-snapshots 0 -delete-snapshot __migration__' failed: exit code 255
TASK ERROR: migration aborted
 
Last edited: