juju import-filesystem

See also: storage

Summary

Imports a filesystem into the model.

Usage

<storage-provider> <provider-id> <storage-name>

Options

Flag

Default

Usage

-B, --no-browser-login

false

Do not use web browser for authentication

--force

false

import a volume even if otherwise prohibited (cloud specific)

-m, --model

Model to operate in. Accepts [<controller name>:]<model name>|<model UUID>

Examples

Import an existing filesystem backed by an EBS volume, and assign it the pgdata storage name. Juju will associate a storage instance ID like pgdata/0 with the volume and filesystem contained within.

juju import-filesystem ebs vol-123456 pgdata

Import an existing unbound PersistentVolume in a Kubernetes model, and assign it the pgdata storage name:

juju import-filesystem kubernetes pv-data-001 pgdata

Import a PersistentVolume that is bound to a PVC not used by Juju:

juju import-filesystem kubernetes pv-data-001 pgdata --force

Details

Import an existing filesystem into the model. This will lead to the model taking ownership of the storage, so you must take care not to import storage that is in use by another Juju model.

To import a filesystem, you must specify three things:

  • the storage provider which manages the storage, and with which the storage will be associated

  • the storage provider ID for the filesystem, or volume that backs the filesystem

  • the storage name to assign to the filesystem, corresponding to the storage name used by a charm

Once a filesystem is imported, Juju will create an associated storage instance using the given storage name.

For Kubernetes models, when importing a PersistentVolume, the following conditions must be met:

  • the PersistentVolume’s reclaim policy must be set to Retain.

  • the PersistentVolume must not be bound to any PersistentVolumeClaim.

If the PersistentVolume is bound to a PersistentVolumeClaim that is not used by another Juju application, you can use the –force option to make the PV available for import.