/LibraryFilesystems/Xsan/bincvadmincvadmin 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]
debug [<value>]
disable pool [read|write]
pool the name of a storage pool in the currently active volume. disks [refresh]
down pool
enable pool [read|write]
fail (volume|index)
filelocks [yes|no]
help (?)
multipath pool (rotate|static)
paths
quit
quotas [yes|no]
quotas get (user|group) name
quotas set (user|group) name hard soft grace
quotacheck
repquota
repof
select [volume]
show [ <pool> ] [ long ]
start volume [on] [controller]
stat
stop <volume> | <index_number>
up pool
who
cvaffinityEstablishes 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) cvcpPerforms high-speed file copies to or from an Xsan volume. You can use this command to
$ 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. cvdbProvides 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. cvdbsetA 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. cvfsckChecks 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. cvfsdcvfsd 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. cvgatherThe 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. cvlabelInitializes 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 cvmkdirYou 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 cvmkfileAllocated 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. cvmkfsInitializes 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. cvupdatefsApplies 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. cvversionsDisplays 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_acfsA mount helper utility that mounts an Xsan volume on client machines. $ sudo mount -t acfs volume mountpoint snfs_defragDefragments 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 |