Initializing a volume (cvmkfs), Applying volume configuration changes (cvupdatefs) – Apple Xsan 2 (Third Edition) User Manual
Page 119

Appendix B
Using the Command Line
119
Initializing a Volume (cvmkfs)
Use the
cvmkfs
command to initialize an Xsan volume based on the information in the
volume’s configuration (in /Library/Filesystems/Xsan/config/volume.cfg).
WARNING:
Initializing a volume destroys all existing data on the volume.
$ sudo cvmkfs [-G] [-F] [volume]
Parameter
Description
-G
Don’t display “Press return to continue” prompts.
-F
Don’t display warning and verification prompts.
Use with caution.
volume
The name of the volume to initialize. This name
matches the name of a configuration (.cfg) file in
/Library/Filesystems/Xsan/config/.
Applying Volume Configuration Changes (cvupdatefs)
Use the
cvupdatefs
command to apply configuration file changes to a volume after
you modify the volume’s configuration files.
$ sudo cvupdatefs [-f] volume [configdir]
Parameter
Description
-f
Update without prompting for confirmation or
advising of errors in the configuration file.
volume
The volume to update. If you don’t specify a
volume, available volumes are listed for you to
choose from.
configdir
Location of the volume’s configuration (.cfg)
file if it’s not in the default location (/Library/
Filesystems/Xsan/config/).
Defragmenting a File, Folder, or Volume (snfsdefrag)
Use the
snfsdefrag
command to defragment 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.
To defragment a file or folder:
$ snfsdefrag [-D] [-d] [-q] [-s] [-v] [-K affinity] [-k affinity] [-m
count
] [-r] target
To report file extents without defragmenting:
$ snfsdefrag -e [-K affinity] [-r] target [target] [...]