FlashArray CLI Steps
Connect to the FlashArray for command line interface (CLI) access via SSH with an array admin account. Create the file system with the desired name (ad-test in this example):
pureuser@flasharray-x50-1> purefs create ad-test
Name Created
ad-test 2023-04-14 10:18:31 PDT
Create an NFS policy so that the file system that was just created can be connected to the hosts with the desired export name (ad-test-export in this example).
pureuser@flasharray-x50-1> purepolicy nfs create ad-test-export
Name Type Enabled User Mapping Enabled
ad-test-export nfs True True
This command can vary based on the deployment. For NFS on vSphere, VMware requires no root squash (--no-root-squash). Specific to this example, read and write access (--rw) for any host that connects to the FA File virtual interface (*) are the rules being added.
Choose read/write or read-only depending on the use case. To create and run VMs, set it to --rw. If the use doesn't need read/write access (like backups), --ro is an option.
Host access to this NFS directory is controlled through the --client option. Enter in the IPs, CIDR, domain suffix or range of ESXi vmkernel addresses that should be able to access anything through this policy. Default configuration is anything (*).
pureuser@flasharray-x50-1> purepolicy nfs rule add ad-test-export --no-root-squash --rw --client *
Name Policy Client Access Permission Anonuid Anongid
r_72 ad-test-export * no-root-squash rw 65534 65534
Next, map the directory export rule modified in the previous step to the directory in the file system from the first step. The :root after the file system name indicates the directory level desired to map the export rule to; in this case, the root directory (/).
pureuser@flasharray-x50-1> purepolicy nfs add ad-test-export --dir ad-test:root --export-name ad-test
Name Type Member Member Type Export Name
ad-test-export nfs ad-test:root directory ad-test
Create a new autodir policy with the desired policy name (ad-test-policy in this example).
pureuser@flasharray-x50-1> purepolicy autodir create ad-test-policy
Name Type Enabled
ad-test-policy autodir True
Map the autodir policy from the previous step to the directory in the file system from the first step.
pureuser@flasharray-x50-1> purepolicy autodir add --dir ad-test:root ad-test-policy
Name Type Member Member Type
ad-test-policy ad-test ad-test:root directory
OPTIONAL: If quotas are desired for the file system just created, create a quota policy with the desired quota name (ad-test-quota in this example).
pureuser@flasharray-x50-1> purepolicy quota create ad-test-quota
Name Type Enabled
ad-test-quota quota True
OPTIONAL: Set the rules for the quota created in the previous step.
pureuser@flasharray-x50-1> purepolicy quota rule add ad-test-quota --quota-limit 214748364800 --enforced
Name Policy Quota Limit Notifications Enforced
r_3 ad-test-quota 200.00G none True
OPTIONAL: Map the quota created earlier to the autodir enabled directory.
pureuser@flasharray-x50-1> purepolicy quota add --dir ad-test:root ad-test-quota
Name Type Member Member Type
ad-test-quota quota ad-test:root directory