<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 29, 2017 at 6:01 PM, Stéphane Graber <span dir="ltr"><<a href="mailto:stgraber@ubuntu.com" target="_blank">stgraber@ubuntu.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On Wed, Mar 29, 2017 at 03:13:36PM +0200, Gabriel Marais wrote:<br>
> Hi Guys<br>
><br>
> If this is the incorrect platform for this post, please point me in the<br>
> right direction.<br>
><br>
> We are in the process of deploying a small production environment with the<br>
> following equipment:-<br>
><br>
> 2 x Dell R430 servers each with 128GB Ram and 3 x 600GB SAS 10k drives<br>
> 1 x Dell PowerVault MD3400 with<br>
>       3 x 600GB 15k SAS Drives<br>
>       3 x 6TB 7.2k Nearline SAS drives<br>
><br>
> The PowerVault is cabled directly to the Host Servers via Direct Attached<br>
> Storage, redundantly.<br>
><br>
><br>
> We would like to run a mixture of KVM and LXD containers on both Host<br>
> Servers.<br>
><br>
> The big question is, how do we implement the PowerVault (and to a certain<br>
> extent the storage on the Host Servers themselves) to be most beneficial in<br>
> this mixed environment.<br>
><br>
> I have a few ideas on what I could do, but since I don't have much<br>
> experience with shared storage, I am probably just picking straws and would<br>
> like to hear from others that probably has more experience than me.<br>
<br>
</span>Hi,<br>
<br>
I'm not particularly familiar with the DELL PowerVault series, but it<br>
looks like the other answers you've received so far have entirely missed<br>
the "Direct Attached Storage" part of your description :)<br>
<br>
For others reading this thread, this setup will effectively show up on<br>
both servers as directly attached disks through /dev/mapper (because of<br>
multipath), there is no need to use any kind of networked storage on top<br>
of this.<br>
<br>
<br>
The answer to your question I suspect will depend greatly on whether<br>
you're dealing with a fixed number of VMs and containers, or if you<br>
intend to spawn and delete them frequently. And also on whether you need<br>
fast (no copy) migration of individual VMs and containers between the<br>
two hosts.<br></blockquote><div><br></div><div>We are not planning on having a fixed number of VMs and containers. It will always grow as the requirement grow and as many as CPU and RAM will allow.</div><div>Migration of containers seem easy enough using the lxc migrate command, although we have only done migrations with containers running on a normal file system (e.g ext4) on a host.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
One approach is to have a physical partition per virtual machine.<br></blockquote><div><br></div><div>Meaning, to create physical partitions on the controller and assign it to both hosts. So lets say we create a physical partitions on the controller, 60GB to be used for a specific VM. That partition will show up as e.g. sdd on the host. We can then install the VM on that partition. If I understand you correctly?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
With this, you can then access the drive from either host (obviously<br>
never from both at the same time), which means that should you want to<br>
start the VM on the other host, you just need to stop the kvm process on<br>
one and start it again on the other, without any data ever being moved.<br></blockquote><div><br></div><div>I assume we would simply use XML (export / import) to create the VM on the other host which is pointing to the partition sitting on the storage device?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
For containers, it's a bit trickier as we don't support using a raw<br>
block device as the root of the container. So you'd need LXD to either<br>
use the host's local storage for the container root and then mount block<br>
devices into those containers at paths that hold the data you care<br>
about. Or you'd need to define a block device for each server in the<br>
PowerVault and have LXD use that for storage (avoiding using the local<br>
storage).<br></blockquote><div><br></div><div>I like the idea of creating a block device on the storage for each container and have LXD use that block device for a specific container. I'm not sure how and if we would be able to simply migrate a container from one host to the other (assuming that we would have those block devices available to both hosts)...?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
The obvious advantage of the second option is that should one of the<br>
server go away for whatever reason, you'd be able to mount that server's<br>
LXD pool onto the other server and spawn a second LXD daemon on it,<br>
taking over the role of the dead server.<br></blockquote><div><br></div><div>From what I've read, a particular host can only use one ZFS Pool. This creates a limitation since we won't be able to create two pools - 1 for the faster storage drives and 1 for the slower storage drives.</div><div><br></div><div>My initial planning was to:-</div><div><br></div><div><br></div><div>Option 1</div><div>----------------</div><div>Take the Fast Storage (3 x 600GB 15k SAS drives) and configure them on the controller as RAID5, split them into 2 and give each host a partition (sdx) of +/- 600GB</div><div>Take the Slower Storage (3 x 6TB 7.2k drives) and configure them on the controller as RAID5, split them into 2 and give each host a partition (sdy) of +/- 6TB </div><div><br></div><div>Setup LVM with two volume groups, e.g. Vol0 - Fast Storage (300GB) and Vol1 (3TB) - Slow Storage</div><div>Create logical volumes as needed in terms of disk space per container and VMs and install the container and VMs onto those logical volumes.</div><div><br></div><div><br></div><div>Option 2</div><div>----------------<br></div><div>The other option I was thinking off was to create partitions on the controller and split the storage up so we could use say:-</div><div><br></div><div>150GB Fast Storage as a ZFS Pool for containers (that needs disk speed)</div><div>1.5TB Slow Storage as a ZFS Pool for containers (that doesn't need as much disk speed)</div><div>1.5TB Slow Storage with LVM for VMs</div><div><br></div><div>and the same with the Slower Storage but then as far as I know, we can only have one ZFS Pool per host. So that's not going to work...?</div><div><br></div><div><br></div><div>Option 3</div><div>----------------<br></div><div>The last option I had in mind was to create the partitions on the controller and assign them onto their respective hosts (having sda, sdb, sdc etc.)</div><div>That way, we could select whether we wanted Fast or Slow storage for a partition and have LXD and KVM use the partition for the installation.</div><div><br></div><div><br></div><div>At least with LVM we could still leverage from snapshots.</div><div><br></div><div><br></div><div>Option 4</div><div>----------------<br></div><div><br></div><div>Create a partition on the controller per host with space and use ZFS on those partitions and setup LXD to use those partitions, we would select either slower storage or faster storage for the purpose.</div><div>Create the same size partition on both hosts.</div><div>That way we can leverage from live migrations and snapshots.</div><div><br></div><div>Use LVM for the VMs and/or data mount points within the VMs / Containers.</div><div><br></div><div><br></div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class="gmail-HOEnZb"><font color="#888888"><br>
<br>
--<br>
Stéphane Graber<br>
Ubuntu developer<br>
<a href="http://www.ubuntu.com" rel="noreferrer" target="_blank">http://www.ubuntu.com</a><br>
</font></span><br>______________________________<wbr>_________________<br>
lxc-users mailing list<br>
<a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.<wbr>linuxcontainers.org</a><br>
<a href="http://lists.linuxcontainers.org/listinfo/lxc-users" rel="noreferrer" target="_blank">http://lists.linuxcontainers.<wbr>org/listinfo/lxc-users</a><br></blockquote></div><br></div></div>