-
Is my understanding is good ? A XCP-NG host cannot use a shared SR (based on linstor) if it's not part of the linstor nodes ?
How this new host can be part of the nodes if I don't want to add HDD/SSD to this new host ? can it be done ?
Again, I want to know the limitation before thinking using this new promising technology !
-
A XCP-NG host cannot use a shared SR (based on linstor) if it's not part of the linstor nodes ?
Yeah it's required to use diskless devices.
How this new host can be part of the nodes if I don't want to add HDD/SSD to this new host ? can it be done ?
There are small changes to add to support a node without storage. But it's feasible with a modification in the driver. It should be supported because diskless volumes is a feature of DRBD to access to data using local network.
-
@ronan-a
Hi,I did some experiment... and cannot get the missing piece of the puzzle to add my xcp-ng-04 host.
From my last status, I have my new xcp-ng-04 host part of the pool and I have installed all the tools for the linstor.
I checked the services for satellite and controller on the xcp-ng-04 and they are not running. I have no Idea if I need to start something manualy of not.
Here my SMlog on a freshly booted xcp-ng-04
Mar 22 11:54:14 xcp-ng-04 SM: [2685] sr_attach {'sr_uuid': '38c2baa3-bc8f-fbc5-ef5a-42461db92c51', 'subtask_of': 'DummyRef:|b4ea936f-80bb-4a6b-98b9-66a95f86b006|SR.attach', 'args': [],$ Mar 22 11:54:14 xcp-ng-04 SMGC: [2685] === SR 38c2baa3-bc8f-fbc5-ef5a-42461db92c51: abort === Mar 22 11:54:14 xcp-ng-04 SM: [2685] lock: opening lock file /var/lock/sm/38c2baa3-bc8f-fbc5-ef5a-42461db92c51/running Mar 22 11:54:14 xcp-ng-04 SM: [2685] lock: opening lock file /var/lock/sm/38c2baa3-bc8f-fbc5-ef5a-42461db92c51/gc_active Mar 22 11:54:14 xcp-ng-04 SM: [2685] lock: tried lock /var/lock/sm/38c2baa3-bc8f-fbc5-ef5a-42461db92c51/gc_active, acquired: True (exists: True) Mar 22 11:54:14 xcp-ng-04 SMGC: [2685] abort: releasing the process lock Mar 22 11:54:14 xcp-ng-04 SM: [2685] lock: released /var/lock/sm/38c2baa3-bc8f-fbc5-ef5a-42461db92c51/gc_active Mar 22 11:54:14 xcp-ng-04 SM: [2685] lock: opening lock file /var/lock/sm/38c2baa3-bc8f-fbc5-ef5a-42461db92c51/sr Mar 22 11:54:14 xcp-ng-04 SM: [2685] lock: acquired /var/lock/sm/38c2baa3-bc8f-fbc5-ef5a-42461db92c51/running Mar 22 11:54:14 xcp-ng-04 SM: [2685] lock: acquired /var/lock/sm/38c2baa3-bc8f-fbc5-ef5a-42461db92c51/sr Mar 22 11:54:14 xcp-ng-04 SM: [2685] RESET for SR 38c2baa3-bc8f-fbc5-ef5a-42461db92c51 (master: True) Mar 22 11:54:14 xcp-ng-04 SM: [2685] lock: released /var/lock/sm/38c2baa3-bc8f-fbc5-ef5a-42461db92c51/sr Mar 22 11:54:14 xcp-ng-04 SM: [2685] lock: released /var/lock/sm/38c2baa3-bc8f-fbc5-ef5a-42461db92c51/running Mar 22 11:54:14 xcp-ng-04 SM: [2685] set_dirty 'OpaqueRef:ea31ae92-4207-4c8b-8db6-da901c6a00a8' succeeded Mar 22 11:54:14 xcp-ng-04 SM: [2709] sr_update {'sr_uuid': '38c2baa3-bc8f-fbc5-ef5a-42461db92c51', 'subtask_of': 'DummyRef:|ae4505d5-b9fe-4f39-92dc-67ab9d0b579b|SR.stat', 'args': [], '$ Mar 22 11:54:15 xcp-ng-04 SM: [2725] lock: opening lock file /var/lock/sm/bef191f3-e976-94ec-6bb7-d87529a72dbb/sr Mar 22 11:54:15 xcp-ng-04 SM: [2725] lock: acquired /var/lock/sm/bef191f3-e976-94ec-6bb7-d87529a72dbb/sr Mar 22 11:54:15 xcp-ng-04 SM: [2725] sr_attach {'sr_uuid': 'bef191f3-e976-94ec-6bb7-d87529a72dbb', 'subtask_of': 'DummyRef:|ae624d96-e91a-4a12-afd6-35593be4ce51|SR.attach', 'args': [],$ Mar 22 11:54:15 xcp-ng-04 SMGC: [2725] === SR bef191f3-e976-94ec-6bb7-d87529a72dbb: abort === Mar 22 11:54:15 xcp-ng-04 SM: [2725] lock: opening lock file /var/lock/sm/bef191f3-e976-94ec-6bb7-d87529a72dbb/running Mar 22 11:54:15 xcp-ng-04 SM: [2725] lock: opening lock file /var/lock/sm/bef191f3-e976-94ec-6bb7-d87529a72dbb/gc_active Mar 22 11:54:15 xcp-ng-04 SM: [2725] lock: tried lock /var/lock/sm/bef191f3-e976-94ec-6bb7-d87529a72dbb/gc_active, acquired: True (exists: True) Mar 22 11:54:15 xcp-ng-04 SMGC: [2725] abort: releasing the process lock Mar 22 11:54:15 xcp-ng-04 SM: [2725] lock: released /var/lock/sm/bef191f3-e976-94ec-6bb7-d87529a72dbb/gc_active Mar 22 11:54:15 xcp-ng-04 SM: [2725] lock: acquired /var/lock/sm/bef191f3-e976-94ec-6bb7-d87529a72dbb/running Mar 22 11:54:15 xcp-ng-04 SM: [2725] RESET for SR bef191f3-e976-94ec-6bb7-d87529a72dbb (master: False) Mar 22 11:54:15 xcp-ng-04 SM: [2725] lock: released /var/lock/sm/bef191f3-e976-94ec-6bb7-d87529a72dbb/running Mar 22 11:54:16 xcp-ng-04 SM: [2725] Got exception: Error: Unable to connect to any of the given controller hosts: ['linstor://xcp-ng-02']. Retry number: 0 Mar 22 11:54:19 xcp-ng-04 SM: [2725] Got exception: Error: Unable to connect to any of the given controller hosts: ['linstor://xcp-ng-02']. Retry number: 1
On xcp-ng-02 (linstor controller)
[11:42 xcp-ng-02 ~]# linstor node list โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ Node โ NodeType โ Addresses โ State โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโก โ xcp-ng-01 โ COMBINED โ 192.168.2.221:3366 (PLAIN) โ Online โ โ xcp-ng-02 โ COMBINED โ 192.168.2.222:3366 (PLAIN) โ Online โ โ xcp-ng-03 โ COMBINED โ 192.168.2.223:3366 (PLAIN) โ Online โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
I list all the linstor PBD on hosts:
[11:49 xcp-ng-01 ~]# xe pbd-list | grep linstor -3 uuid ( RO) : e75fdc51-29a4-aa57-bc44-459f80a0d230 host-uuid ( RO): ad95c6ca-612d-42af-8909-d4e9dc7645bb sr-uuid ( RO): bef191f3-e976-94ec-6bb7-d87529a72dbb device-config (MRO): provisioning: thin; redundancy: 2; group-name: linstor_group/thin_device; hosts: xcp-ng-01,xcp-ng-02,xcp-ng-03 currently-attached ( RO): true -- uuid ( RO) : 063db650-55b1-a3e0-9d9a-e94ce938988d host-uuid ( RO): 5747f145-0dc2-4987-a6b9-b6c5a7ed0505 sr-uuid ( RO): bef191f3-e976-94ec-6bb7-d87529a72dbb device-config (MRO): hosts: xcp-ng-01,xcp-ng-02,xcp-ng-03; group-name: linstor_group/thin_device; redundancy: 2; provisioning: thin currently-attached ( RO): false -- uuid ( RO) : a1f876b1-0568-71ac-9ffb-720e626cb4ab host-uuid ( RO): e286a04a-69bf-4d59-a0c8-e7338e8c1831 sr-uuid ( RO): bef191f3-e976-94ec-6bb7-d87529a72dbb device-config (MRO): provisioning: thin; redundancy: 2; group-name: linstor_group/thin_device; hosts: xcp-ng-01,xcp-ng-02,xcp-ng-03 currently-attached ( RO): true uuid ( RO) : 08564ab5-a518-f709-8527-f592c2592d14 host-uuid ( RO): eb48f91d-9916-4542-9cf4-4a718abdc451 sr-uuid ( RO): bef191f3-e976-94ec-6bb7-d87529a72dbb device-config (MRO): provisioning: thin; redundancy: 2; group-name: linstor_group/thin_device; hosts: xcp-ng-01,xcp-ng-02,xcp-ng-03 currently-attached ( RO): true
After that, I remove all the PBD to all hosts to be able to recreate the PBDs on all hosts with the new xcp-ng-04
xe pbd-create host-uuid=e286a04a-69bf-4d59-a0c8-e7338e8c1831 sr-uuid=bef191f3-e976-94ec-6bb7-d87529a72dbb device-config:provisioning=thin device-config:redundancy=2 device-config:group-name=linstor_group/thin_device device-config:hosts=xcp-ng-01,xcp-ng-02,xcp-ng-03,xcp-ng-04 xe pbd-create host-uuid=ad95c6ca-612d-42af-8909-d4e9dc7645bb sr-uuid=bef191f3-e976-94ec-6bb7-d87529a72dbb device-config:provisioning=thin device-config:redundancy=2 device-config:group-name=linstor_group/thin_device device-config:hosts=xcp-ng-01,xcp-ng-02,xcp-ng-03,xcp-ng-04 xe pbd-create host-uuid=eb48f91d-9916-4542-9cf4-4a718abdc451 sr-uuid=bef191f3-e976-94ec-6bb7-d87529a72dbb device-config:provisioning=thin device-config:redundancy=2 device-config:group-name=linstor_group/thin_device device-config:hosts=xcp-ng-01,xcp-ng-02,xcp-ng-03,xcp-ng-04 xe pbd-create host-uuid=5747f145-0dc2-4987-a6b9-b6c5a7ed0505 sr-uuid=bef191f3-e976-94ec-6bb7-d87529a72dbb device-config:provisioning=thin device-config:redundancy=2 device-config:group-name=linstor_group/thin_device device-config:hosts=xcp-ng-01,xcp-ng-02,xcp-ng-03,xcp-ng-04
all succeed. No error.
After that I try to connect all PBDs to the SR
[11:13 xcp-ng-01 ~]# xe pbd-plug uuid=7d588c37-a152-9666-175e-91b2d48c150f [11:13 xcp-ng-01 ~]# xe pbd-plug uuid=99f76235-1b1a-e5fa-bb19-3883737fcc6d [11:13 xcp-ng-01 ~]# xe pbd-plug uuid=df727345-f475-b929-ecc1-b506f0053361 [11:13 xcp-ng-01 ~]# xe pbd-plug uuid=8b4ddc6f-e25a-1942-a435-345ccc93551a Error code: SR_BACKEND_FAILURE_47 Error parameters: , The SR is not available [opterr=Error: Unable to connect to any of the given controller hosts: ['linstor://xcp-ng-02']],
From there, I'm a bit lost...
1- Do I need to add the linstor satellite xcp-ng-04 before doing all the PBDs ?
2- Should I start any of the services on xcp-ng-04 before doing all this ?Regards
-
Any input appreciated
Regards
-
Question for @ronan-a
-
@dumarjo Could you open a ticket with a tunnel please? I can take a look. Also: I started a script this week to simplify the management of LINSTOR with add/remove commands.
-
Hi,
@ronan-a said in XOSTOR hyperconvergence preview:@dumarjo Could you open a ticket with a tunnel please? I can take a look. Also: I started a script this week to simplify the management of LINSTOR with add/remove commands.
Ticket done on vates.
-
So after analysis:
- The iptables of the new host must be updated (in the case of add/remove action) to connect the corresponding new node to the linstor controller. Otherwise, we can have a "Auto-evict" error in the database.
- PBDs must/can be updated after the creation of the new node.
Thank you for the feedback, it's helpful to see the potential issues to automatise LINSTOR management.
-
To be able to recreate and reconnect all the PBD, I have modified the /etc/hosts file to add manually each hosts with their IPs. I know that @ronan-a is working to fix the hostname addressing in the driver. But at least I can continue to test the scalability.
Looks promising !
-
Hi,
Ok, Figured out how to do it and get it working on 2 or more nodes. Here the process:
[xcp-ng-01 ~]#wget https://gist.githubusercontent.com/Wescoeur/7bb568c0e09e796710b0ea966882fcac/raw/26d1db55fafa4622af2d9ee29a48f6756b8b11a3/gistfile1.txt -O install && chmod +x install [xcp-ng-01 ~]# ./install --disks /dev/sdb --thin [xcp-ng-01 ~]# vgchange -a y linstor_group [xcp-ng-01 ~]# xe sr-create type=linstor name-label=XOSTOR host-uuid=71324aae-aff1-4323-bb0b-2c5f858b223e device-config:hosts=xcp-ng-01 device-config:group-name=linstor_group/thin_device device-config:redundancy=1 shared=true device-config:provisioning=thin
Now the SR is available to create the VMs. For simplicity, I won't create VM now.
[xcp-ng-02 ~]# wget https://gist.githubusercontent.com/Wescoeur/7bb568c0e09e796710b0ea966882fcac/raw/26d1db55fafa4622af2d9ee29a48f6756b8b11a3/gistfile1.txt -O install && chmod +x install [xcp-ng-02 ~]# ./install --disks /dev/sdb --thin [xcp-ng-02 ~]# vgchange -a y linstor_group
On both hosts, I modify the /etc/hosts to add both hosts with their IP to workaround the driver bug
Start services on nodes 2
systemctl enable minidrbdcluster.service systemctl enable linstor-satellite.service systemctl start linstor-satellite.service systemctl start minidrbdcluster.service
Open IPTables on node 2
/etc/xapi.d/plugins/firewall-port open 3366 /etc/xapi.d/plugins/firewall-port open 3370 /etc/xapi.d/plugins/firewall-port open 3376 /etc/xapi.d/plugins/firewall-port open 3377 /etc/xapi.d/plugins/firewall-port open 8076 /etc/xapi.d/plugins/firewall-port open 8077 /etc/xapi.d/plugins/firewall-port open 7000:8000
[xcp-ng-02 ~]linstor --controllers=10.33.33.40 node create --node-type combined $HOSTNAME [xcp-ng-02 ~]linstor --controllers=10.33.33.40 storage-pool create lvmthin $HOSTNAME xcp-sr-linstor_group_thin_device linstor_group/thin_device [xcp-ng-02 ~]linstor --controllers=10.33.33.40 resource create $HOSTNAME xcp-persistent-database --storage-pool xcp-sr-linstor_group_thin_device
After that, you should be in splitbrain. I have no Idea !, my knowledge are not good enough to figure it right now. But I know how to fix it.
On node 2 run those commands:
drbdadm secondary all drbdadm disconnect all drbdadm -- --discard-my-data connect all
On node 1 run those commands:
drbdadm primary all drbdadm disconnect all drbdadm connect all
Now the linstor/drbd are in good shape and should have all the resources.
for the sake of fun, I change the place count from 1 to 2 on linstor controller[xcp-ng-01 ~]linstor rg modify --place-count 2 xcp-sr-linstor_group_thin_device
Now the replication is working.
Now on node 1, I unplug the pbd of xcp-ng-02, destroyit and create a new on with 2 hosts [xcp-ng-01 ~]# xe pbd-unplug uuid=6295519d-1071-2127-4313-f14c9615f244 [xcp-ng-01 ~]# xe pbd-destroy uuid=6295519d-1071-2127-4313-f14c9615f244 [xcp-ng-01 ~]# xe pbd-create host-uuid=eb48f91d-9916-4542-9cf4-4a718abdc451 sr-uuid=505c1928-d39d-421c-1556-143f82770ff5 device-config:provisioning=thin device-config:redundancy=2 device-config:group-name=linstor_group/thin_device device-config:hosts=xcp-ng-01,xcp-ng-02 [xcp-ng-01 ~]# xe pbd-plug uuid=774971b4-dd03-18c8-92e5-32cac9bdc1e3
do the same thing with the second pbd and everything is connected together.
Not an easy task !
Imagine if I have 30 Vms... alot of resources to be created....
-
I edited your post to use Markdown syntax. It's easier to read. Don't forget next time
-
Ah, so diskless nodes aren't supported at Xcp-ng storage API level yet?
Because that was the next thing on my list of things to try and I'm confident enough to do it at the DRBD level (even if the documentation is skimping on examples there). But if still needs SR integration on the Xen hosts, then I can push that back onto the todo stack.
For background: For Xcp-ng and oVirt I have HCI clusters running permanently on low-power machines. And then I have powerful (noisy and hungry) workstations which I turn off when I'm not running experiments (they also run all kids of different operating systems).
So these only occasionally connect to the clusters but need access to the HCI storage. That's very natural in GlusterFS and I need something similar in LINSTOR.
-
@dumarjo FYI this logic is available since few days in this commit: https://github.com/xcp-ng/sm/commit/ec3ffffced1bf63fc3a88e0681ecbf7e288828de But not merged in the current beta.
Regarding the splitbrain, it's probably because you use two hosts, the minimal ideal count is 3. With a replication count of two, the third node can be used as a quorum โtie breakerโ diskless node.
Imagine if I have 30 Vms... alot of resources to be created....
I'm not sure to understand the link with VMs? ^^"
-
Imagine if I have 30 Vms... alot of resources to be created....
I'm not sure to understand the link with VMs? ^^"
From what I understand, I have to recreate all the resource manually, since all the VMs disk create a resource.. Maybe I'm wrong again
I'm very interested testing this new add_host functionnality. The fun part is now I have a better undertanding of what is going on under the hood !
regards,
-
@abufrejoval Diskless volumes are supported, you can start a VM using this type of volume on a host. A diskless link is created on the fly if necessary.
Also good news, it's now possible to use a host without physical disk. I just removed a limitation during the SR creation: https://github.com/xcp-ng/sm/commit/536277d4026ac7baeb9890fe65a87feb7d5a4721
We must test this change, but in theory it should not create a problem. -
@dumarjo I think we can add a script to reconfigure the replication. For example to create a copy of each VDI on a new node, or in a balanced way on a set of new nodes.
-
@ronan-a Is it already possible to specify a network adapter for the storage traffic?
I edited /etc/hosts and added each xcp-ng server with the IP of the storage interface. IS this a good workaround? -
That brings me to the topic of observability:
I can't say I have been entirely happy observing what was going on in Gluster on oVirt, but depending on if you used the chunking mode (or the oVirt storage overlay) vs. the pure file mode, you had a rather granular overview on what was going on, what was good, what needed healing and just how far behind synchronizations might be.
With DRBD I feel like flying blind again, mostly because it's a block not a file layer. From what I've seen in the DRBD and LINSTOR manuals, I'll be able to query replication state and whether or not replicas are in sync. When they are not and offlined, because the (limited?) update queue has overflowed, it seems you may have to re-create the replica. Yet there is also a checksumming mode, which might be able to "resilver" a replica even if the update queue isn't complete. I guess that's where LINBIT wants to sell consulting or support...
So when you suggest control over replication at the VDI level, I wonder how this happens, since without another layer in between, I can only imagine replication control at the SR level using distinct DRBD resources. Perhaps some explanations on how Xcp SRs and DRBD resources and volumes are supposed to correlate would be helpful.
In my edge oriented HCI setups, I'd just be using a triple replica setup, because it's a nice compromise between the write amplification and redundancy. Yeah, having a (pop-up?) arbiter that helps maintain a quorum while you're doing maintenance on one node, wouldn't be too bad to have, but I've not been too happy with 2 replica + 1 arbiter Glusters on oVirt: You're really only standing on one leg when doing maintenance or handling faults. I used it on the 2.5Gbit nodes, because write amplification was too expensive on the 10Gbit nodes with NVMe I prefer 3 replicas, if only to reduce making mistakes.
For the additional compute nodes I prefer to go diskless, also because I shut them down to save power when load is low.
But that's the home-lab. For the corporate lab (which is what I am testing it for), there it's more like a dozen machines, some storage heavy (recycled), some compute heavy (GPGPU compute), with both populations changing, sometimes by choice, sometimes because they fail.
Now since erasure coding isn't LINSTOR native, having to use staggered replicas in distinct SRs to manage fault-tolerance/write-amplification/storage-efficiency will quickly become a real burden: I'd love to know how much intelligence you're willing to put into XOA to help manage redistributions (which require observability). At least in theory, Gluster was vastly superior there, not that I've actually tried transforming terabytes of dispersed volumes say from a 6+2 to a 12+3 configuration.
And to be quite honest: I'm still struggling to understand the abstraction topology of DBRD/LINSTOR/Pacemaker and then their new LINBIT VSAN. Everbody is so focused on producing videos or 'getting started' tutorials, they completely forget writing a proper concept's & architecture guide.
-
@ronan-a Is it already possible to specify a network adapter for the storage traffic?
@Swen It should work, you can test using this doc: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en/#s-managing_network_interface_cards
I edited /etc/hosts and added each xcp-ng server with the IP of the storage interface. IS this a good workaround?
Not a good idea to modify directly this file. Using the previous link, it's normally the right direction to use.
So when you suggest control over replication at the VDI level, I wonder how this happens, since without another layer in between, I can only imagine replication control at the SR level using distinct DRBD resources. Perhaps some explanations on how Xcp SRs and DRBD resources and volumes are supposed to correlate would be helpful.
For each VDI, you have a DRBD. A VDI is just a link to a DRBD device (
/dev/drbd/by-res/XXX
), this volume is replicated on N hosts of your pool. A volume is strictly equal to one block. If a host doesn't have a copy of the volume, then it will use a DRBD diskless and the network to access data.In my edge oriented HCI setups, I'd just be using a triple replica setup, because it's a nice compromise between the write amplification and redundancy. Yeah, having a (pop-up?) arbiter that helps maintain a quorum while you're doing maintenance on one node, wouldn't be too bad to have, but I've not been too happy with 2 replica + 1 arbiter Glusters on oVirt: You're really only standing on one leg when doing maintenance or handling faults. I used it on the 2.5Gbit nodes, because write amplification was too expensive on the 10Gbit nodes with NVMe I prefer 3 replicas, if only to reduce making mistakes.
With LINSTOR, 3 hosts is the minimal config to limit split-brain (with diskless volume or not). Also regarding performance It's actually a good compromise between reading and writing to use a replication count of 3.
For the additional compute nodes I prefer to go diskless, also because I shut them down to save power when load is low.
FYI, a third node used as diskless volume is important to avoid a split brain, it's a quorum component.
And to be quite honest: I'm still struggling to understand the abstraction topology of DBRD/LINSTOR/Pacemaker and then their new LINBIT VSAN. Everbody is so focused on producing videos or 'getting started' tutorials, they completely forget writing a proper concept's & architecture guide.
Pacemaker is not used in our driver implementation, linstor is a manager on top of DRBD. Yeah the architecture is complex, so it's why our goal here is to abstract these layers to use this new LINSTOR smapi driver like the existing ones.
-
@Swen It should work, you can test using this doc: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en/#s-managing_network_interface_cards
Thank you very much for that link! I edited the setting according to this and now I can see traffic is going in and out via 10G NIC.
It looks like I only get descend bandwidth through it, around 130 MBps (Shown in XCP-ng Center). Do you know if there is any limitation on xcp-ng side which prevents Linstor to use more of the interface? I use 3 1TB SSDs on each node so it should be more possible.