Create a folder and assign an affinity (cvmkdir) – Apple Xsan 2 User Manual

Page 152

Advertising
background image

152

Appendix C

Use command-line tools

Label a LUN:

$ sudo cvlabel [-v] [-f] [labelfile]

Important:

Be sure to use this command only on disks that aren’t being used. Using

Xsan Admin to label LUNs is safer, because it only shows available LUNs.

Remove the label from a LUN:

$ sudo cvlabel -u lun

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 labeled.

labelfile

An optional file containing information for each
label. You can use the -c option to create this file.

lun

The LUN identified by disk name—for example:
/dev/disk4.

-u

Unlabel the specified LUN.

Create a folder and assign an affinity (cvmkdir)

Use the

cvmkdir

command to create a folder (directory) and assign it an affinity tag so

that its contents are stored on storage pools with the same affinity tag.

$ cvmkdir -k affinity folder

Parameter

Description

-k affinity

Specifies the affinity tag to be associated with the
folder.

affinity

– the affinity tag that’s assigned to

the storage pools where you want the folder’s
contents to be stored
You can use the

show long

command of the

cvadmin

tool to see a storage pool’s affinity tag.

You can use

-k ""

to remove the folder’s

affinity tag.

folder

The path to and name of the folder.

Advertising