[lxc-users] LXD - Small Production Deployment - Storage
Gabriel Marais
gabriel.j.marais at gmail.com
Wed Mar 29 22:01:14 UTC 2017
On Wed, Mar 29, 2017 at 6:01 PM, Stéphane Graber <stgraber at ubuntu.com>
wrote:
> On Wed, Mar 29, 2017 at 03:13:36PM +0200, Gabriel Marais wrote:
> > Hi Guys
> >
> > If this is the incorrect platform for this post, please point me in the
> > right direction.
> >
> > We are in the process of deploying a small production environment with
> the
> > following equipment:-
> >
> > 2 x Dell R430 servers each with 128GB Ram and 3 x 600GB SAS 10k drives
> > 1 x Dell PowerVault MD3400 with
> > 3 x 600GB 15k SAS Drives
> > 3 x 6TB 7.2k Nearline SAS drives
> >
> > The PowerVault is cabled directly to the Host Servers via Direct Attached
> > Storage, redundantly.
> >
> >
> > We would like to run a mixture of KVM and LXD containers on both Host
> > Servers.
> >
> > The big question is, how do we implement the PowerVault (and to a certain
> > extent the storage on the Host Servers themselves) to be most beneficial
> in
> > this mixed environment.
> >
> > I have a few ideas on what I could do, but since I don't have much
> > experience with shared storage, I am probably just picking straws and
> would
> > like to hear from others that probably has more experience than me.
>
> Hi,
>
> I'm not particularly familiar with the DELL PowerVault series, but it
> looks like the other answers you've received so far have entirely missed
> the "Direct Attached Storage" part of your description :)
>
> For others reading this thread, this setup will effectively show up on
> both servers as directly attached disks through /dev/mapper (because of
> multipath), there is no need to use any kind of networked storage on top
> of this.
>
>
> The answer to your question I suspect will depend greatly on whether
> you're dealing with a fixed number of VMs and containers, or if you
> intend to spawn and delete them frequently. And also on whether you need
> fast (no copy) migration of individual VMs and containers between the
> two hosts.
>
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.
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.
>
> One approach is to have a physical partition per virtual machine.
>
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?
> With this, you can then access the drive from either host (obviously
> never from both at the same time), which means that should you want to
> start the VM on the other host, you just need to stop the kvm process on
> one and start it again on the other, without any data ever being moved.
>
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?
>
> For containers, it's a bit trickier as we don't support using a raw
> block device as the root of the container. So you'd need LXD to either
> use the host's local storage for the container root and then mount block
> devices into those containers at paths that hold the data you care
> about. Or you'd need to define a block device for each server in the
> PowerVault and have LXD use that for storage (avoiding using the local
> storage).
>
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)...?
>
> The obvious advantage of the second option is that should one of the
> server go away for whatever reason, you'd be able to mount that server's
> LXD pool onto the other server and spawn a second LXD daemon on it,
> taking over the role of the dead server.
>
>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.
My initial planning was to:-
Option 1
----------------
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
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
Setup LVM with two volume groups, e.g. Vol0 - Fast Storage (300GB) and Vol1
(3TB) - Slow Storage
Create logical volumes as needed in terms of disk space per container and
VMs and install the container and VMs onto those logical volumes.
Option 2
----------------
The other option I was thinking off was to create partitions on the
controller and split the storage up so we could use say:-
150GB Fast Storage as a ZFS Pool for containers (that needs disk speed)
1.5TB Slow Storage as a ZFS Pool for containers (that doesn't need as much
disk speed)
1.5TB Slow Storage with LVM for VMs
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...?
Option 3
----------------
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.)
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.
At least with LVM we could still leverage from snapshots.
Option 4
----------------
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.
Create the same size partition on both hosts.
That way we can leverage from live migrations and snapshots.
Use LVM for the VMs and/or data mount points within the VMs / Containers.
>
> --
> Stéphane Graber
> Ubuntu developer
> http://www.ubuntu.com
>
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20170330/9ededb6f/attachment-0001.html>
More information about the lxc-users
mailing list