Storage¶
OpenStack offers two kinds of persistent storage that survive instance termination:
- Volumes (Cinder): block storage attached to a single instance, like a hard drive.
- Shares (Manila): shared file systems, such as NFS or CephFS, that can be mounted by multiple instances at once.
Volumes (Cinder)¶
Volumes are attached to an instance as a block device (for example /dev/vdb). You can add a volume when launching an
instance or attach one later.
To create and attach a volume in Horizon:
- Go to Project → Volumes → Volumes and click Create Volume.
- Give it a name and a size (GB), then click Create Volume.
- Next to the volume, click Manage Attachments → Attach to Instance, select your instance and save.
After attaching, you can format and mount it from inside the instance:
sudo mkfs.ext4 /dev/vdb # only the first time
sudo mkdir /mnt/data
sudo mount /dev/vdb /mnt/data
To make the mount persist across reboots, add an entry to /etc/fstab.
Note
The root disk of an instance is also a volume (backed by Ceph). Treat it the same way: attach additional volumes for data you want to keep.
Shares (Manila/CephFS)¶
A share is a file system that several instances can mount at the same time. We currently offer NFS shares backed by Ceph. Shares are provisioned as a share network within your project, and instances that need to mount them must be on that network.
To create a share in Horizon:
- Go to Project → Share → Shares and click Create Share.
- Choose the share type (e.g. NFS), a size, and the share network of your project.
- Once the share is
available, mount it from an instance on the same share network:
sudo mkdir /mnt/share
sudo mount -t nfs <share path> /mnt/share
The exact mount command is shown in the Horizon share details.
Warning
Shares, like all OpenStack storage, are not location-redundant. Use them for data you can recreate, not for mission-critical backups.