[openstack-dev] Extension to volume creation (filesystem and label)

John Griffith john.griffith at solidfire.com
Mon Aug 12 16:18:52 UTC 2013


On Mon, Aug 12, 2013 at 9:15 AM, Vishvananda Ishaya
<vishvananda at gmail.com>wrote:

> This would need to happen on the cinder side on creation. I don't think it
> is safe for nova to be modifying the contents of the volume on attach. That
> said nova does currently set the serial number on attach (for libvirt at
> least) so the volume will show up as:
>
> /dev/disk/by-id/virtio-<uuid>
>
> Although the uuid gets truncated.
>
> Vish
>
> On Aug 10, 2013, at 10:11 PM, Greg Poirier <greg.poirier at opower.com>
> wrote:
>
> > Since we can't guarantee that a volume, when attached, will become a
> specified device name, we would like to be able to create a filesystem and
> label it (so that we can programmatically interact with it when
> provisioning systems, services, etc).
> >
> > What we are trying to decide is whether this should be the
> responsibility of Nova or Cinder. Since Cinder essentially has all of the
> information about the volume and is already responsible for creating the
> volume (against the configured backend), why not also give it the ability
> to mount the volume (assuming support for it on the backend exists), run
> mkfs.<filesystem_type>, and then use tune2fs to label the volume with (for
> example) the volume's UUID?
> >
> > This way we can programmatically do:
> >
> > mount /dev/disk/by-label/<UUID> /mnt/point
> >
> > This is more or less a functional requirement for our provisioning
> service, and I'm wondering also:
> >
> > - Is anyone else doing this already?
> > - Has this been considered before?
> >
> > We will gladly implement this and submit a patch against Cinder or Nova.
> We'd just like to make sure we're heading in the right direction and making
> the change in the appropriate part of Openstack.
> >
> > Thanks,
> >
> > Greg Poirier
> > Opower - Systems Engineering
> > _______________________________________________
> > OpenStack-dev mailing list
> > OpenStack-dev at lists.openstack.org
> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>

The virtio-<uuid> method Vish described has worked pretty well for me so
hopefully that will work for you.  I also don't like the idea of doing a
parition/format on attach in compute, seems like an easy path to
inadvertently loosing your data.

If you still want to look at adding the partition/format functionality to
Cinder it's an interesting idea, but to be honest I've discounted it in the
past because it just seemed "safer" and more flexible to leave it to the
instance rather than trying to cover all of the possible partition schemes
and FS types etc.

Thanks,
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130812/5f0d9709/attachment.html>


More information about the OpenStack-dev mailing list