How to create and use Manila share ?

1. To create manila share and access it, use below steps:

1. Use manila create command and specify the required arguments e.g. size of the share and the shared file system protocol e.g. NFSCIFSGlusterFSHDFSCephFS or MAPRFS. Optionally need to provide share type and share network
2. Use manila show command and make sure share is in available state. Also check export location path
3. Use manila access-allow to create access rule and then mount the share to use it.

2.1 Create a share in no share servers mode:

For share in no share servers mode, user must specify the share type with ‘driver_handles_share_servers = False‘ extra specification. This mode does not require share network as no share servers are created.

# select share type with extra specification 'driver_handles_share_servers: False'
$ manila type-list

$ manila create nfs 1 --name test_share --description "test share" --share-type test_type
2.2 Create a share in share servers mode:
# select share type with extra specification 'driver_handles_share_servers: True'
$ manila type-list

# select the share network
$ manila share-network-list

$ manila create nfs 1 --name test_share --description "test share" --share-type test_type2 \
 --share-network test_share_net
3. Manage access to share
$ manila access-allow test_share ip 10.0.0.10 --access-level rw
4 . Mount the share

Assume export location of share is 10.0.0.1:/shares/share_xxxxxxx_xxxx_xxxx_xxxxxx, mount share on host with IP 10.0.0.10 using command

$ mkdir -p /mnt/tmp_share
$ sudo mount -v -t nfs 10.0.0.1:/shares/share_xxxxxxx_xxxx_xxxx_xxxxxx /mnt/tmp_share

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top