LibraryFilesystemsXsanbin


/LibraryFilesystems/Xsan/bin

cvadmin

cvadmin is an interactive command-line tool. This means that a number of subcommands can be entered after you enter the script. Type quit at the prompt to leave the interactive mode.

Make sure that you have either root access or have entered into the cvadmin interactive mode with sudo cvadmin. If you do not, you will not be able to access the file system. Here's an example of what you see when you enter the interactive mode:

mdc:/Library/Filesystems/Xsan/bin admin$ sudo ./cvadmin Password: ball$$n2 Xsan File System Administrator Enter command(s) For command help, enter "help" or "?". List FSS File System Services (* indicates service is in control of FS):  1>*XSAN[0]           located on localhost:49291 (pid 441) Select FSM "XSAN"  Created             :    Thu Mar 10 17:11:25 2005  Active Connections  :    6  Fs Block Size      :    4K  Msg Buffer Size    :    4K  Disk Devices       :    2  Stripe Groups      :    4  Mirror Groups      :    0  Fs Blocks           :    1073741312 (4.00 TB)  Fs Blocks Free     :    1072583247 (4.00 TB) (99%) Xsanadmin (XSAN) > activate [volume|index] 


Chooses 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).

This command may cause an FSM to activate. If the FSM is already active, no action is taken.

debug [<value>] 


Get or Set (with <value>) the FSS debug flags.

Enter debug with no value to get current setting and bit meanings. Value should be a valid number. Use 0x to indicate hexadecimal.

disable pool [read|write] 


Prevents read or write access to a storage pool.

pool the name of a storage pool in the currently active volume.

disks [refresh] 


Displays ACFS LUNs visible to this machine. If the refresh option is used, the volumes are rescanned. In the following example, two LUNs are visible to the machine.

Xsanadmin (XSAN) > disks Disks (File System XSAN) ACFS Disk Volumes: LUN1 on device:rdisk1        sectors:  4294967295   sector size: 512 LUN2 on device:rdisk2        sectors:  4294967295   sector size: 512 

down pool 


Disallows all access to a storage pool. For example:

Xsanadmin (XSAN) > down POOL1 Down Stripe Group "POOL1" (File System "XSAN") Stripe Group 0 [POOL1]  Status:Down,MetaData,Journal Total Blocks:1073741312 (4.00 TB) Free:1072583247 (4.00 TB) (99%) MultiPath Method:Rotate Primary  Stripe 0 [POOL1]  Read:Enabled  Write:Enabled 

enable pool [read|write] 


Allows read or write access to a storage pool.

fail (volume|index) 


Causes 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).

If there are no standby controllers available, the volume will fail back to the original metadata controller.

This command may cause a standby FSM to activate. If the FSM is already active, the FSM will shut down. A standby FSM will take over or the FSM will be relaunched if it is stand-alone.

In certain instances, you might need to fail a volume to a standby metadata controller (for example, to update the primary metadata controller's software, add RAM, and so on). For example:

Xsanadmin (XSAN) > fail XSAN Fail over FSS "XSAN" FSS 'XSAN' fail over initiated. Select FSM "none" 

filelocks [yes|no] 


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

help (?) 


Displays a list and description of all cvadmin commands (similar to this section you are reading now).

multipath pool (rotate|static) 


Specifies how Xsan uses multiple paths to a storage pool. Choose Rotate to have Xsan alternate between the connections for maximum throughput. Choose Static to have Xsan assign each LUN in the storage pool alternately to one of the connections when the volume is mounted.

paths 


Displays the ACFS disk volumes visible to this machine grouped according to the "controller" identity. For example:

Xsanadmin (XSAN) > paths Paths (File System XSAN) ACFS Disk Volumes: Controller: <5000393000006B88>     LUN1 on device: rdisk1    hba_id: 2 lun: 0 state:     Available Controller: <5000393000006CC4>     LUN2 on device: rdisk2    hba_id: 1 lun: 0 state:     Available 

quit 


Exits from cvadmin.

quotas [yes|no] 


Enables or disables quotas for the active (selected) volume. Use the command without any 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.

For example, to check a user named albert or a group named creatives, enter the following:

Xsanadmin (XSAN) > quotas get user albert User:  HL: 3221225472 SL: 2097152 TL: 60 CSZ: 253952 Xsanadmin (XSAN) > quotas get group creatives Group:   HL: 268435456000 SL: 214748364800 TL: 60 CSZ: 278528 

Note the HL (hard limit), SL (soft limit), and TL (time limit) values in the output.

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 


Recalculates the amount of space consumed (the current size field of the quota record) by all users and groups in the file system. This command can be run on an active file system, although file updates (writes, truncates, and so on) will be delayed until quotacheck is completed.

repquota 


Generates quota reports for all users and groups in the file system. These files will be saved 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 controller. You can use cvadmin -f to execute these commands.

repof 


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

select [volume] 


Chooses the "active" volume that you want to work with. The name of the currently active volume appears following 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.

show [ <pool> ] [ long ] 


Shows all pools or a specific pool <pool>. Adding the modifier long shows more verbose information. For example:

Xsanadmin (XSAN) > show POOL1 long Show stripe group "POOL1" (File System "XSAN") Stripe Group 0 [POOL1] Status:Up,MetaData,Journal   Total Blocks:1073741312 (4.00 TB)    Free:1072583247   (4.00 TB) (99%)   MultiPath Method:Rotate   Stripe Depth:2   Stripe Breadth:256 blocks (1024.00   KB)   Affinity Key:POOL1   Realtime  limit  IO/sec:0  (~0 mb/sec)  Non-Realtime   reserve IO/sec:0     Committed  RTIO/sec:0  Non-RTIO  clients:0  Non-RTIO     hint IO/sec:0   Disk stripes:     Primary   Stripe 0  [POOL1]   Read:Enabled    Write:     Enabled       Node 0  [LUN1]       Node 1  [LUN2] 

start volume [on] [controller] 


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

controller The address of the controller on which to start the volume's FSM process.

stat 


Displays information about the active volume. For example:

Xsanadmin (XSAN) > stat Stat (File System "XSAN") Created            :    Thu Mar 10 17:11:25 2005 Active Connections :    4 Fs Block Size     :    4K Msg Buffer Size   :    4K Disk Devices      :    2 Stripe Groups     :    1 Mirror Groups     :    0 Fs Blocks          :    1073741312 (4.00 TB) Fs Blocks Free    :    1072583247 (4.00 TB) (99%) 

stop <volume> | <index_number> 


Stops the FSM processes for <volume> or <index_number>. Stopping by name will stop all instances of <volume>. Stopping by number stops only the service associated with the index. Indexes are displayed on the left side as "nn>" when using the select command.

up pool 


Allows access to the specified storage pool. For example:

Xsanadmin (XSAN) > up POOL1 Up Stripe Group "POOL1"  (File System "XSAN") Stripe Group 0 [POOL1]   Status:Up,MetaData,Journal Total Blocks:1073741312 (4.00 TB) Free:1072583247 (4.00 TB) (99%) MultiPath Method:Rotate Primary  Stripe 0 [POOL1]  Read:Enabled   Write:Enabled 

who 


Displays client information for the active volume.

Xsanadmin (XSAN) > who Who (File System "XSAN") #   ACFS I.D.  Type Location     Up Time    License Expires --  ---------- ---- -----------  -------    -------------- 0>             FSM               0d 2h 26m   N/A 2>             CLI  10.1.0.103   0d 2h 24m   N/A 7>             CLI  10.1.0.104   0d 2h 24m   N/A 9>             CLI  10.1.0.105   0d 2h 24m   N/A 10>            CLI  10.1.0.106   0d 2h 24m   N/A 15>            CLI  localhost    0d 0h 30m   N/A 54>            ADM  localhost    0d 0h 1m    N/A 

cvaffinity

Establishes an affinity to a storage pool or lists a files current affinity.

For example, to set an affinity for the folder Render Files to the storage pool POOL1, type the following:

mdc:/Library/Filesystems/Xsan/bin  root#   ./cvaffinity   -k POOL1 /Volumes/XSAN/MEDIA/albert/Render\ Files/ 


To check a folder's affinity:

mdc:/Library/Filesystems/Xsan/bin  root#  ./cvaffinity -l  / Volumes/XSAN/Media /Volumes/XSAN/Media: POOL1 (0x524f53434f520000) 


cvcp

Performs high-speed file copies to or from an Xsan volume. You can use this command to

  • Copy files or directories

  • Copy tar-formatted data to a directory

  • Copy a file or directory to a tar-formatted data stream

$ cvcp [options] source destination 


Example: Copy the file lightning to /Volumes/Xsan/Media:

$ cvcp lightning /Volumes/Xsan/Media 


Check the manual pages (man cvcp) to view additional options for this command.

cvdb

Provides a mechanism for developers and system administrators to extract debugging information from the Xsan File System (Xsan) client files system. It can also be used by system administrators to change the level of system logging that the client file system performs.

cvdbset

A tool for system administrators to control cvdb TRacing information from the Xsan File System (Xsan) client file system. The main purpose of this command is to facilitate the restriction of client tracing to a certain set of modules.

cvfsck

Checks and repairs Xsan file system metadata corruption due to a system crash, bad disk, or other catastrophic failure. This program also can list all of the existing files and their pertinent statistics, such as inode number, size, file type, and location in the volume. If the volume is active, it may be checked only in a read-only mode. In this mode, modifications are noted, but not committed. The -n option may be used to perform a read-only check as well.

The file-system-checking program must be run on the machine where the File System Services are running. cvfsck reads the configuration file and compares the configuration against the metadata it finds. If there are discrepancies with the configuration, the volume is repaired to reflect the correct configuration.

$ cvfsck [options] volume 


Check the manual pages (man cvfsck) to view additional options for this command.

cvfsd

cvfsd is a server daemon that is launched by the Xsan File System mount_cvfs(1M) command. It is an internal kernel thread and is used for network communication to the File System Manager. Multiple cvfsd threads are launched for each Xsan volume.

cvgather

The cvgather program is used to collect debug information from a volume. This creates a tar file of the system's Xsan File System debug logs, configuration, version information, and disk devices. The program will collect client debug information on client machines and server information on server machines, as well as portmap information from all machines. System log files as well as Xsan log files are included. At the users option, cvgather also collects core files from user space utilities, such as the FSM, and also from the operating system kernel, when available. This information provides Apple technical support staff with enough information to deal with most problems encountered by Xsan users.

For example:

mdc:/Library/Filesystems/Xsan/bin root# ./cvgather -f XSAN   ./cvgather: uname -a   ./cvgather: /Library/Filesystems/Xsan/bin/cvversions   ./cvgather: /Library/Filesystems/Xsan/bin/cvlabel -c   ./cvgather: /Library/Filesystems/Xsan/bin/cvfsid   ./cvgather: /var/log/system.log   ./cvgather: /Library/Filesystems/Xsan/config/XSAN.cfg   ./cvgather: /Library/Filesystems/Xsan/config/fsnameservers   ./cvgather: /Library/Filesystems/Xsan/config/fsmlist   ./cvgather: /Library/Filesystems/Xsan/debug/nssdbg.out   ./cvgather: /Library/Filesystems/Xsan/debug/cvfsd.out   ./cvgather: /Library/Filesystems/Xsan/debug/fsmpm.out   ./cvgather: /Library/Filesystems/Xsan/data/XSAN/log/cvlog Creating tar ball. Wrote 110592 bytes to /Library/Filesystems/Xsan/bin/MacOSX_mdc. local_XSAN.tgz ./cvgather: Complete. 


The new file it creates in the /Library/Filesystems/Xsan/bin directory can be emailed to an AppleCare specialist for further diagnostic of your system.

cvlabel

Initializes LUNs so they can be added to storage pools. The unlabel option is necessary when attempting to connect a RAID formatted for Xsan and use it as a direct-attached storage device. LUNs must be unlabeled in order to be initialized as HFS+ volumes in Disk Utility.

For example, to view labeled LUNs:

mdc:/Library/Filesystems/Xsan/bin root# ./cvlabel -l /dev/rdisk1  [APPLE    Xserve RAID        1.26] CVFS "LUN1" Sectors:  4294967295.  SectorSize:  512.   Maximum sectors: 4680626944. /dev/rdisk2  [APPLE    Xserve RAID        1.26] CVFS "LUN2" Sectors:  4294967295.  SectorSize:  512.   Maximum sectors: 4680626944. 


To unlabel LUNs:

mdc:/Library/Filesystems/Xsan/bin root# ./cvlabel -u LUN2 *WARNING* This program will remove the volume label from the device specified (LUN2). After execution, the devices will not be usable by the Xsan File System. You will have to relabel the device to use it on the Xsan File System. Do you want to proceed? (Y / N ) -> Y 


cvmkdir

You can use Xsan Admin to assign an affinity to a folder at the top level of a volume, but to assign an affinity to a folder that is inside another folder you need to use the cvmkdir command-line tool.

For example, to assign an affinity for the storage pool POOL1 to folder Audio which is inside the folder Projects on the volume BIGBOY, you would type the following:

$ sudo ./cvmkdir -k POOL1 /Volumes/BIGBOY/projects/audio 


cvmkfile

Allocated space for a file on a Xsan volume.

For example, to allocate 2 GB of space for the file dafney on the storage pool POOL1:

$ cvmkfile -k POOL1 2g dafney 


Check the manual pages (man cvmkfile) to view additional options for this command.

cvmkfs

Initializes an Xsan volume based on the information in the corresponding configuration file for the volume in /Library/Filesystems/Xsan/config/<vol>.cfg)

*WARNING* Initializing a volume destroys all existing data on the volume.

cvupdatefs

Applies configuration file changes to a volume after you modify the volume's configuration files. The volume will have to be stopped in order to run this script.

$ cvupdatefs volume 


In the following example, POOL1's journal will be resized. This is because the volume's configuration file was changed (/Library/Filesystems/Xsan/config/<volume>.cfg), and the cvupdatefs script was run.

mdc:/Library/Filesystems/Xsan/bin root# ./cvupdatefs Xsan File System File Systems on host mdc.local: 1)  XSAN Choose a file system by number (1-1) or zero (0) to exit - > 1 The following changes have been detected in the configura- tion Please review these changes carefully. Stripe Group Name  Stripe Status  MetaData   Journal =================  =============  ========   ======= POOL1              No Change      No Change  Resize This will modify the file system "XSAN". Are you sure you want to continue? [y/N] y Flushing journal entries...  done Freeing old journal space... Allocating new journal space... Updating ICB information... Updating SuperBlock information... File system 'XSAN' was modified. 


cvversions

Displays Xsan volume and client information. Useful when checking to see if the server and client software match.

mdc:/Library/Filesystems/Xsan/bin root# ./cvversions File System Server:   Server Revision 2.6.1 Build 16   Built for Darwin 8.0   Created on Fri Aug 12 14:23:18 PDT 2005   Server Revision 2.6.1 Build 16 File System Client:   Client Revision 2.6.1 Build 16   Built for Darwin 8.0   Created on Fri Aug 12 14:26:25 PDT 2005   Built in /SourceCache/XsanFS/XsanFS-261.16 


mount_acfs

A mount helper utility that mounts an Xsan volume on client machines.

$ sudo mount -t acfs volume mountpoint 


snfs_defrag

Defragments a file by reallocating its data in a single extent. This can improve read and write performance for a file by increasing disk efficiency and reducing file metadata management overhead.

For example, to defrag the entire volume BIGBOY, use the -r option:

mdc:/Library/Filesystems/Xsan/bin root#  ./snfsdefrag  -r  / Volumes/BIGBOY/ 28 files visited: 2 defragged, 26 skipped 




Apple Pro Training Series. Xsan Quick-Reference Guide
Apple Pro Training Series: Xsan Quick-Reference Guide (2nd Edition)
ISBN: 0321432320
EAN: 2147483647
Year: 2004
Pages: 120

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net