Command-line arguments

Contributors netapp-ivanad akseldavis Download PDF of this page

The SnapDrive for UNIX takes arguments in a specific format.

The following table describes the arguments you can specify with the keywords.

Use the format snapdrive type_name operation_name [<keyword/option> <arguments>]; for example, if you wanted to create a Snapshot copy called snap_hr from the host file system /mnt/dir, you would enter the following command line:

snapdrive snap create -fs /mnt/dir -snapname snap_hr.

Argument Description


The name by which the target entity will be accessible after its disk groups or LUNs are connected.


The name of a disk group or volume group.


Allows you to specify a destination name that SnapDrive for UNIX uses to make the LUN available in the newly-connected copy of the Snapshot copy.


The name of a storage system.


A path name to a storage system object. This name can contain the storage system name and volume, but it does not have to if SnapDrive for UNIX can use default values for the missing components based on values supplied in the previous arguments. The following are examples of path names:

  • test_filer:/vol/vol3/qtree_2

  • /vol/vol3/qtree_2

  • qtree_2


The name of a storage entity, such as a host volume, LUN, disk or volume group, file system, or NFS directory tree.

In general, you use the file_spec argument as one of the following:

  • An object you want SnapDrive for UNIX to make a Snapshot copy of or to restore from a Snapshot copy

  • An object that you want to either create or use when provisioning storage

The objects do not have to be all of the same type. If you supply multiple host volumes, they must all belong to the same volume manager.

If you supply values for this argument that resolve to redundant disk groups or host volumes, the command fails.

Example of incorrect usage: This example assumes dg1 has host volumes hv1 and hv2, with file systems fs1 and fs2. As a result, the following arguments would fail because they involve redundant disk groups or host volumes.

-dg dg1 -hostvol dg1/hv1

-dg dg1


-hostvol dg1/hv1 -fs/fs1

Example of correct usage: This example shows the correct usage for this argument.



-hostvoldg1/hv1 -fs/fs2


Used with the snap connect command to identify:

  • A host LVM entity

  • A file system contained on a LUN

The argument also lets you specify a set of destination names that SnapDrive for UNIX uses when it makes the entity available in the newly connected copy of the Snapshot copy.

The format for fspec_set is: { -vg | -dg | -fs | -lvol | -hostvol } src_fspec [dest_fspec] [{ -destdg | -destvg } dg_name] [{ - destlv | -desthv } lv_name]


Lets you specify whether you want to create a file system, logical volume, or disk group when you are executing the storage create command. This argument might have any of the three formats as described in the following. The format you use depends on the entity you want to create.

The -dg and -vg options are synonyms that reflect the fact that some operating systems refer to disk groups and others refer to volume groups. In addition, -lvol and -hostvol are also synonyms. This guide uses -dg to refer to both disk groups and volume groups and -hostvol to refer to both logical volumes and host volumes.

To create a file system, use this format: -fs file_spec [-fstype type] [-fsopts options] [-hostvol file_spec] [-dg dg_name] To create a logical or host volume, use this format: [-hostvol file_spec] [-dg dg_name] | -hostvol To create a disk or volume group, use this format: file_spec [-dg dg_name] | -dg dg_name

You must name the top-level entity that you are creating. You do not need to supply names for any underlying entities. If you do not supply names for the underlying entities, SnapDrive for UNIX creates them with internally generated names.

If you specify that SnapDrive for UNIX create a file system, you must specify a type that SnapDrive for UNIX supports with the host LVM. These types include JFS2 or VxFS.

The option -fsopts is used to specify options to be passed to the host operation that creates the new file system; for example, mkfs.


The name of an initiator group.


A path name that includes the storage system name, volume name, and possibly other directory and file elements within that volume. The following are examples of long path names:



A name that includes the storage system name, volume, and LUN name. The following is an example of a long LUN name:



A name that includes the storage system name, volume, and Snapshot copy name. The following is an example of a long Snapshot copy name: test_filer:/vol/account_vol:snap_20040202

With the snapdrive snap show and snapdrive snap delete commands, you can use the asterisk (*) character as a wildcard to match any part of a Snapshot copy name. If you use a wildcard character, you must place it at the end of the Snapshot copy name. SnapDrive for UNIX displays an error message if you use a wildcard at any other point in a name.

Example: This example uses wildcards with both the snap show command and the snap delete command: snap show myfiler:/vol/vol2:mysnap*

myfiler:/vol/vol2:/yoursnap* snap show myfiler:/vol/vol1/qtree1:qtree_snap* snap delete** hersnap

Limitation for wildcards: You cannot enter a wildcard in the middle of a Snapshot copy name. For example, the following command line produces an error message because the wildcard is in the middle of the Snapshot copy name: banana:/vol/vol1:my*snap


The name of a LUN. This name does not include the storage system and volume where the LUN is located. The following is an example of a LUN name: lunA


Any path name.


prefix used in the volume clone’s name generation


Indicates a LUN entity that is captured in the Snapshot copy specified by long_snap_name.

Related information