From fe1d4c345debccac26fbeb10af0c4ef73851dc85 Mon Sep 17 00:00:00 2001 From: Olivier Lambert Date: Fri, 18 Aug 2017 17:08:03 +0200 Subject: [PATCH] XOSAN content (#99) * feat(xosan): start to work on XOSAN doc --- docs/SUMMARY.md | 8 +++- docs/xosan.md | 32 ++++++++++++++ docs/xosan_replicated.md | 88 ++++++++++++++++++++++++++++++++++++++ docs/xosan_requirements.md | 37 ++++++++++++++++ docs/xosan_types.md | 12 ++++++ 5 files changed, 176 insertions(+), 1 deletion(-) create mode 100644 docs/xosan.md create mode 100644 docs/xosan_replicated.md create mode 100644 docs/xosan_requirements.md create mode 100644 docs/xosan_types.md diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index af7106a5f..ae922dbf9 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -64,5 +64,11 @@ * [Trial](trial.md) * [Invoices](invoices.md) * [Upgrade](upgrade.md) -* [General Troubleshooting](general-troubleshooting.md) +* [XOSAN](xosan.md) + * [Requirements](xosan_requirements.md) + * [Types](xosan_types.md) + * [Creation](xosan_create.md) + * [Management](xosan_management.md) + * [Trial](xosan_trial.md) +* [General Troubleshooting](general-troubleshooting.md) * [Glossary](glossary.md) diff --git a/docs/xosan.md b/docs/xosan.md new file mode 100644 index 000000000..08603bfca --- /dev/null +++ b/docs/xosan.md @@ -0,0 +1,32 @@ +# XOSAN + +XOSAN is a virtual SAN that allows you to create a shared SR (Storage Repository) by combining your existing local SRs. It's a software defined and hyperconverged solution for XenServer. + +![](https://xen-orchestra.com/blog/content/images/2016/12/XOSANpool.jpg) + +## Introduction + +This documentation will give you some advices and assistance in order to create a XOSAN storage on your XenServer infrastructure. + +## Objectives + +XOSAN will "gather" all your local disks into a shared SR, that XenServer will just see as any othershared SR, without limitations on it (you can live migrate, snapshot, backup, whatever you need). **It's a fully software solution** that doesn't require to buy extra-hardware. It could even run on the disk where your XenServer is already installed! + +![](https://xen-orchestra.com/blog/content/images/2016/12/hyperpool.jpg) + +The objectives are to: + +* protect your data thanks to replication of data on multiple hosts +* provide XenServer high availability without buying a NAS or a SAN +* give you flexibility to grow your storage by adding new nodes +* work on all kind of hardware, from HDDs to SSDs + +## Deployment + +To deploy XOSAN, please follow the rest of the documentation: + +* [XOSAN Requirements](xosan_requirements.md) +* [Types of XOSAN](xosan_types.md) +* [How to create a new XOSAN Storage](xosan_create.md) +* [XOSAN management](xosan_management.md) +* [Get a free XOSAN trial](xosan_trial.md) diff --git a/docs/xosan_replicated.md b/docs/xosan_replicated.md new file mode 100644 index 000000000..b7c2fa250 --- /dev/null +++ b/docs/xosan_replicated.md @@ -0,0 +1,88 @@ +## Replicated type + +Data are replicated from a node to another. + +Pros: + +* fast (**must be used for SSDs**) +* relatively flexible + +Cons: + +* low capacity (so higher cost, better for SSDs) +* a bit more complex to maintain in distributed-replicated (see "RAID 10 like") + +### 2-way replication + +This type is pretty simple to understand: everything written on one node is mirrored to another one. It's very similar to **RAID 1**. + +![picture replication]() + +If you lose one node, your data are still here. This mode will give you **50% of your total disk space** (e.g with 2x nodes of 250GiB, you'll have only 250GiB of space). + +### 3-way replication + +Same than 2-way, but data is replicated on 3 nodes in total. + +![picture triplication]() + +2 nodes can be destroyed without losing your data. This mode will give you **33% of your total disk space** (e.g with 3x nodes of 250GiB, you'll have only 250GiB of space). + +### Building a "RAID 10" like + +If you have more than 2 or 3 nodes, it could be interesting to distribute data on multiple replicated nodes. This is called "distributed-replicated" type. Here is an example with 6 nodes: + +![picture distributed-replicated with 6 nodes]() + +It's very similar to **RAID 10**. + +> This is the mode you'll use in a more than 3 nodes setup. + +### Examples + +Here is some examples depending of the number of XenServer hosts. + +#### 2 hosts + +This is a kind of special mode. On a 2 nodes setup, one node must know what's happening if it can't contact the other node. This is called a **split brain** scenario. To avoid data loss, it goes on read only. But there is a way to overcome this, with a special node, called **the arbiter**. It will only require an extra VM using only few disk space. + +Thanks to this arbiter, you'll have 3 nodes running on 2 XenServer hosts: + +* if the host with 1 node is down, the other host will continue to provide a working XOSAN +* if the host with 2 nodes (1 normal and 1 arbiter) id down, the other node will go into read only mode, to avoid split brain scenario. + +This way, in all cases, you are protected. + +#### 3 hosts + +The easiest way is to use 3-way replication. You can lose completely 2 hosts, it will continue to work on the survivor! + +#### 4 hosts + +The usual deal is to create a "group" of 2 replicated nodes (2x2). In a picture: + +![2x2 replication]() + +#### 5 hosts + +There is no way to use the local disks of 5 nodes in a replicated type. So you'll use 4 hosts in XOSAN, and the 5th would be also able to use the shared XOSAN SR, without participating directly to it. + +![2x2 replication and 1 extra node]() + +#### 6 hosts + +You have 2 choices: + +1. 2-way replication on 3 nodes (2x3) +2. 3-way replication on 2 nodes (3x2) + +There is more fault tolerance on mode 2, but less space usable. It's up to you! + +![2x3 vs 3x2 modes]() + +## Growing a replicated XOSAN + +You can grow a replicated XOSAN by adding pairs, in other words "RAID 1"-like mirrors to the existing setup, like you would adds mirrored disks in "RAID 10" setup. Examples: + +* on a 2 hosts setup, going for 4 hosts by adding 2 mirrored nodes +* on a 3 hosts setup using 3-way replication, by adding 3 mirrored nodes diff --git a/docs/xosan_requirements.md b/docs/xosan_requirements.md new file mode 100644 index 000000000..7dbe0376a --- /dev/null +++ b/docs/xosan_requirements.md @@ -0,0 +1,37 @@ +# XOSAN Requirements + +In order to work, XOSAN need a minimal set of requirements. + +## Storage + +XOSAN is deployed on an existing **Local LVM storage**, that XenServer configure by default during its installation. However, you can create yourself easily this kind of storage while using Xen Orchestra: + +* Go on the "New" menu entry, then select "Storage" +* Select the host having the disk you want to use for XOSAN +* Select "Local LVM" and enter the path of this disk (e.g: `/dev/sdf`) + +> You can discover disks names by issuing `fdisk -l` command on your XenServer host. + +> **Recommended hardware:** we don't have specific hardware recommendation regarding hard disks. It could be directly a disk or even a disk exposed via a hardware RAID. Note that RAID mode will influence global speed of XOSAN. + +## Network + +XOSAN will use the network card you choose at creation. For better performances, a dedicated storage network should be used. + +> **Recommended hardware:** 1 Gbit/s network card is the minmum to have decent performances. However, a **10 Gbits/s** network is preferable, especially for a setup using SSDs or more than 2 nodes. + +## RAM + +Each XOSAN VM deployed will use 2GiB of RAM. It could be increased (sweet spot seems to be around 4GiB), but it's also workload and infrastructure related. If you don't have a lot of RAM, keep it to 2GiB. If RAM is not an issue, 4GiB is better. + +## CPU + +Each XOSAN VM deployed will use 2x vCPUs. This setting should be enough for all cases. + +# Examples + +For a 6 nodes setup, XOSAN will use in total: + +* 12 vCPUs (usage is in general pretty low) +* 12 GiB RAM +* All Local LVM disk space diff --git a/docs/xosan_types.md b/docs/xosan_types.md new file mode 100644 index 000000000..c550ebe70 --- /dev/null +++ b/docs/xosan_types.md @@ -0,0 +1,12 @@ +# XOSAN types + +There is 2 modes for creating an XOSAN storage. They are different and the choice is done forever. You can't **switch from a mode to another** when XOSAN is created, except by removing and re-creating it. + +That's why it's **very important to understand pros and cons** of each type. + +> On "top" of there 2 types, you can also deciding to spread all operations to multiple number of volumes. This is called **distributed** mode. It's very similar to *RAID 0*, which can be placed on top of a *RAID 1* for example. We'll talk about it in the end of this guide. + +Here is those 2 types: + +* [Replicated](xosan_replicated.md) +* [Disperse](xosan_replicated.md)