Loading...

Creating an NFS or CIFS Share from the Command Line

You can use the qoperation command to export the backup data as an NFS or CIFS share.

File system module type V2 has better caching module for optimized performance, so Commvault recommends using file system module type V2 for the NFS or CIFS share. You must use the same file system module type number for exporting and unexporting an NFS or CIFS share.

Procedure

  1. On the MediaAgent, run the qlogin command to log on to the CommServe.
  2. Download the nfs_create_export_template.xml file to the computer where you will run the command.
  3. From software_installation_directory/Base type the following command:

    qoperation execute -af input_xml_file_path -maClientInfo/clientName 'MediaAgent_name' -subClientInfo/clientName 'client_name' -subClientInfo/backupsetName 'backupset_name' -subClientInfo/subclientName 'subclient_name' -toTime/timeValue 'to_time_for_backup' -nCopyPrecede copy_precedence_number -sNfsClntIP 'NFS_client_IP' -showdeleted 1 -sShare 'mount_path' -fsmtype file_system_module_number

    Note: You can also define parameter values in the nfs_create_export_template.xml file, instead of on the command line. For more information on command line parameters and XML elements, see Command Line - Syntax.

    If you enabled the Samba server, the command automatically creates a CIFS share in the format sharename_timestamp.

  4. To log off the CommServe computer, run the qlogout command.

Example

./qoperation execute -af /nfsexport.xml -maClientInfo/clientName '3dfsLatest' -subClientInfo/clientName '3dfsServer_CN_1' -subClientInfo/backupsetName 'fs1' -subClientInfo/subclientName 'etc' -toTime/timeValue '2016-04-25 02:00:00'-nCopyPrecede 0 -sNfsClntIP '0.0.0.0' -showdeleted 1 -sShare '3dfsnfsshare' -fsmtype 5

For information on parameters for creating an NFS Share, see NFS Share Export Parameters.

Output

The following sample output of the export command contains the share name that is given by the NFS server. You can use the share name to unexport the NFS share.

If you enabled the Samba server along with the NFS-Ganesha server, the output also contains the CIFS share name.

<App_Export3dfsResp>
<error>
<errorCode>0</errorCode>
</error>
<sShare>3dfsnfsshare</sShare>
<sAccessPath></sAccessPath>
</App_Export3dfsResp>

Diagnostics

Possible error code values are as follows:

  • 0: The export command executed successfully
  • -1: The export command failed
  • -7: Connectivity issue with the NFS server
  • -9: Reached the limit for number of exports. Applicable only for FSM type 4.

Related Topics

Restoring Data on the NFS Client

Deleting an NFS or CIFS Share

Last modified: 10/24/2018 10:42:07 AM