Apply volume configuration changes (cvupdatefs), Defragment a file, folder, or volume (snfsdefrag) – Apple Xsan 2 User Manual
Page 154

154
Appendix C
Use command-line tools
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/Preferences/Xsan/.
Apply 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/
Preferences/Xsan/).
Defragment 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.
Defragment a file or folder:
$ snfsdefrag [-D] [-d] [-q] [-s] [-v] [-K affinity] [-k affinity] [-m
count
] [-r] target
Report file extents without defragmenting:
$ snfsdefrag -e [-K affinity] [-r] target [target] [...]
Display an extent count without defragmenting:
$ snfsdefrag -c [-K affinity] [-r] target [target] [...]
Prune a file (remove allocated extents beyond the end of file):
$ snfsdefrag -p [-D] [-v] [-q] [-K affinity] [-m count] [-r] target
[target] [...]
List files that are candidates for defragmentation:
$ snfsdefrag -l [-D] [-v] [-K affinity] [-m count] [-r]
target
[target] [...]