Chameleon provides a shared file system service through the OpenStack Manila interface. With the service, you can create a shared file system, mount to the bare metal instances, and manage some of its properties, such as visibility.
Chameleon shared file system service is currently backed by a CephFS. Same as our object store service, the data is replicated and the replication should provide good availability in case of hardware failures.
- Difference between shared file system and object store
You can choose either shared file system or object store to store, manage, and share your data with your collaborators. The object store is suitable for storing large objects at scale, but isn’t suitable for transactional data, as objects are immutable and updated in their entirety. Chameleon shared file system instead provides a NFS mount to the bare metal instances, with the NFS protocol managing locking and data integrity processes required to provide multiple concurrent access to data.
The shared file system service is available at CHI@UC and CHI@TACC. Each region has its own service and the shares created at one region are not available to the other. As all other Chameleon services, you can create and manage your shares using both GUI and CLI.
To provide isolation among shares created by different projects, accessing a share requires a storage network, which are special networks you can reserve to use. When reserving a storage network, add usage_type=storage to the resource properties. To learn more about reserving networks, read the reservations documentation. All bare metal instances that are created on the storage network have access to all the project shares.
To attach floating IP to your instance created on a storage network, you need to create a router with public external network. Then connect the storage subnet to the router. You must specify an unused IP address which belongs to the selected subnet. To learn more about creating router and connecting subnet, please read isolated network VLANs.
Shares are owned by the project. By default, all shares have private visibility and can only be listed and accessed within your project. All bare metal instances owned by the project have read and write permissions to the project’s shares. You can also make your shares public. All Chameleon users and projects can list public shares, and with a storage network, all projects have read-only access to a public share.
A share is a pre-allocated storage space at a CephFS. You can mount your shares to your bare metal instances via NFS protocol. The accessibility of the shares are controlled internally by the reservation service. You are not allowed to edit the access rules of a share.
We do not charge SUs for the storage spaces of your shares. However, we do limit the total size and the number of shares you can create within your project. The maximum number of shares is 10 and the maximum size allowed for all shares in a project is 2000 GiB. If you need to increase the default quota, please submit a ticket via the Help Desk.
Managing Shares using GUI
Click the Create Share button. In the Create Share dialog, provide a name and the size of your share, and then click the Create button to create a share.
A storage network is not required for creating shares. It’s only required to access the shares.
You can look at the details of a share by clicking the share name in the Shares page. Note that the paths of the export locations are important as you will use this path to mount your share to your bare metal instances. You can also see the other properties, such as visibility and size. The access rules are listed in the share details page, though you can not edit the rules, as they are controlled by the reservation service.
You can manage the properties and extend the size of a share by clicking the Action dropdown in the Shares page.
You can use the Action dropdown to delete a single share, or select multiple shares and click the Delete Shares button.
Be careful when deleting shares, as the action is irreversible. However, the termination of your storage network reservation DOES NOT delete your share. Your shares persist until you manually delete them.
Managing Shares using CLI
As all other Chameleon services, you can manage your shares via CLI as well.
Reading Command Line Interface (CLI) is highly recommended before continuing on the following sections.
In addition to installing the CLI, you must also install python-manilaclient package:
pip install python-manilaclient
Then, you must set environment variables for your account and project using The OpenStack RC Script.
If you get HTTP 406 error of
version is not supported by the API, please add
--os-share-api-version 2.65to the command to specify manila minor version.
To list all shares of your project, run the following command:
openstack share list
You can filter the results by the share name via adding a
--name argument to the list command.
To create a share, using the following command:
openstack share create --name <name of your share> NFS <size in GiB>
For example, for creating a 1 GiB share with name of
openstack share create --name my-first-share NFS 1
Only the NFS protocol is supported.
You can add the
--public true to make your share public.
To change the visibility of a share, run:
openstack share set --public <true/false> <name/id of the share>
To update the name or the description of a share, run:
openstack share set --name <new name> --description <description> <name/id of the share>
To extend/shrink the size of a share, run:
openstack share resize <name/id of the share> <new size in GiB>
To view the details of a share, run:
openstack share show <name/id of the share>
To delete a share, run the following command:
openstack share delete <name/id of the share>
Mounting Shares to Instances
In order to allow your instances to access the share, you need to create your instances using the pre-reserved storage network. To learn more about how to create a bare metal instance on a network, read the bare metal instances section.
The shares are independent of the storage networks. You can create shares any time regardless of the status of the storage networks. The storage networks are only used to access your data stored in the share.
sudo mount -t nfs -o nfsvers=4.2,proto=tcp <export location path> <mount dir>
Now, you can read and write to the share and it behaves identically to a regular file system.
To unmount, run the following command:
sudo umount <mount dir>