Xsan 2 Administrator Guide - Viewing or Changing Volume and Storage Pool Settings (cvadmin)

background image

Viewing or Changing Volume and Storage Pool Settings (cvadmin)

Use the

cvadmin

tool to perform status and setup tasks related to Xsan volumes.

For help, see the

cvadmin

man page or enter:

$ sudo cvadmin -e help

To enter interactive mode:

$ sudo cvadmin

To execute commands from a file:

$ sudo cvadmin [-H host] [-F volume] -f cmdfile

To execute a single command and return to the shell prompt:

$ sudo cvadmin [-H host] [-F volume] -e ["]command [cmdparam..."]

Parameter

Description

-H host

The metadata controller that is hosting the
volume. If not provided, the local computer is
assumed.

host

– the IP address or DNS name of a

metadata controller other than the one you’re
logged in on.

-F volume

The volume to be the active (“selected”) volume
in

cvadmin

.

volume

– the name of an Xsan volume

-f cmdfile

Read commands from the specified file.

cmdfile

– the name of a text file containing

cvadmin

commands

background image

112

Appendix B

Using the Command Line

Parameter

Description

-e command

Execute the specified command and return
to the shell prompt. Otherwise,

cvadmin

continues to run in interactive mode with the
prompt

Xsanadmin>

. If you include parameters

(

cmdparam

) with the command, enclose the

command and its parameters in a pair of quotes.
Available commands are listed in “cvadmin
Commands” below.

cmdparam

Values required by the command.

Commands available in the

cvadmin

tool are listed in the following table.

cvadmin Commands

cvadmin command

Description

activate
[volume|index]

Choose the active volume that you want to work
with interactively.

volume

– the name of the volume

index

– the numeric ID of the volume (to

see a list of these, use the

cvadmin select

command without any parameters)

disks [refresh]

List LUNs.

down pool

Disallow all access to a storage pool.

pool

– the name of a storage pool in the

currently active volume

fail (volume|index)

Cause a volume to fail over to a standby
controller.

volume

– the name of the volume

index

– the numeric ID of the volume (to

see a list of these, use the

cvadmin select

command without any parameters)

filelocks [yes|no]

Enable or disable file and record locks. Use the
command without any parameter to see the
current setting for locks.

multipath pool
(rotate|static)

Specify how Xsan uses multiple paths to a
storage pool.

pool

– the name of a storage pool in the active

volume

background image

Appendix B

Using the Command Line

113

cvadmin command

Description

paths

List available LUNs.

quit

Exit from

cvadmin

.

quotas [yes|no]

Enable or disable quotas for the active (selected)
volume. Use the command without parameters
to see the current setting for quotas.

quotas get (user|group) name

Display current quota information for a user or
group.

name

– the name of the user or group

quotas set (user|group) name hard

soft grace

Set quotas for user or group name.

name

– the name of the user or group

hard

– hard quota (bytes)

soft

– soft quota (bytes)

grace

– grace period (minutes)

quotacheck

Recalculate quota information for the active
volume.

repquota

Generate the following quota report files in
/Library/Filesystems/Xsan/data/volume:
quota_report.txt – text file
quota_report.csv – comma-delimited file
quota_regen.in –

cvadmin

commands that will

set up identical quotas on another metadata
controller. You can use

cvadmin -f

to execute

the commands.

repof

Create a report of open files on the active volume
in the file /Library/Filesystems/Xsan/data/volume/
open_file_report.txt.

select [volume]

Choose the active volume that you want to work
with. The name of the active volume appears
preceding the command prompt in interactive
mode, for example:

Xsanadmin (Vol1) >

To see a list of running volumes, leave off the
volume parameter.

volume

– the name of an Xsan volume

background image

114

Appendix B

Using the Command Line

cvadmin command

Description

show [pool] [long]

List storage pool information for the active
volume.

pool

– the name of a storage pool in the

currently active volume

start volume [on] [controller]

Start a volume based on the information in its
configuration file (/Library/Filesystems/Xsan/
config/volume.cfg).

volume

– the name of an Xsan volume

controller

– The address of the metadata

controller to start the volume’s FSM process on

stat

Display information about the active volume.

stop volume

Stop a volume and its FSM process on all
metadata controllers.

up pool

Allow access to the specified storage pool.

pool

– the name of a storage pool in the

currently active volume

who

Display client information for the active volume.