Labeling, listing, and unlabeling luns (cvlabel), Creating a folder with an affinity (cvmkdir), Labeling, listing, and unlabeling luns ( cvlabel ) – Apple Xsan 1.1 User Manual
Page 114: Creating a folder with an affinity ( cvmkdir )

114
Appendix B
Using the Command Line
Labeling, Listing, and Unlabeling LUNs (cvlabel)
You can use the
cvlabel
command to initialize LUNs so they can be added to storage
pools. For additional details, see the
cvlabel
man page.
To list available LUNs:
$ cvlabel -l [-s] [-v]
To list current LUN and label information you can paste into a label file:
$ cvlabel -c
To label a LUN:
$ cvlabel [-v] [-f] [labelfile]
To remove the existing label from a LUN:
$ cvlabel -u lun
Creating a Folder With an Affinity (cvmkdir)
You can use the
cvmkdir
command to create a folder with an affinity for a particular
storage pool in an Xsan volume.
$ cvmkdir [-k affinity] directory
Parameter
Description
-l
List available LUNs.
-s
Display device serial numbers.
-v
Show progress display.
-c
Create a label template file.
-f
Relabels LUNs that are already labeled.
labelfile
An optional file containing information for each label. You can use
the -c option to create this file, or use this file as a template:
/Library/Filesystems/Xsan/examples
/cvlabels.example
lun
The LUN identified by disk name, for example
/dev/disk4
.
-u
Unlabel the specified volume.
Parameter
Description
-k
Optional parameter for specifying the name of the storage pool to
be associated with the directory (folder). If you omit this parameter,
Xsan creates a folder without an affinity.
affinity
The name of a storage pool’s affinity key. In Xsan, this is the same
as the name of the storage pool. You can use the cvadmin show
long
command to see a storage pool’s affinity key.
directory
The name of the folder.