User Guide
Chapter 3 Managing SAN Storage 55
Defragmenting a Volume
When you create a file, Xsan breaks the file into pieces and distributes these pieces
efficiently over the LUNs that make up one of the volume’s storage pools. Over time, as
the file is modified, its pieces can become scattered in less efficient arrangements.
Defragmenting the file reassembles its pieces into the most efficient arrangement.
You can use the snfsdefrag command to defragment a single file, a folder (directory
of files), or an entire volume.
To defragment a file, directory, or volume:
1 Open Terminal (in /Applications/Utilities).
2 If you are not working at the SAN controller computer, use SSH to log in to the
controller remotely:
$ ssh user@computer
where user is an administrator user on the controller computer and computer is the
controller’s name or IP address.
3 Type the snfsdefrag command (in /Library/Filesystems/Xsan/bin).
To defragment one or more individual files:
$ sudo snfsdefrag filename [filename ... ]
To defragment an entire directory:
$ sudo snfsdefrag -r directory
To defragment an entire volume, set directory to the root directory of the volume.
For more information see the snfsdefrag man page or “Defragmenting a File, Directory,
or Volume (snfsdefrag)” on page 93.
LL0192.book Page 55 Thursday, July 29, 2004 5:20 PM










