User guide
Checking Volume Fragmentation
When you create a le, Xsan divides the le into pieces and distributes these pieces
eciently over the LUNs that make up one of the volume’s storage pools. Over time, as
the le is modied, its pieces become scattered in less ecient arrangements. You can
use the cvfsck utility to check the state of le fragmentation on your volumes.
To check volume fragmentation:
1 Open Terminal (in /Applications/Utilities/).
2 If you aren’t working at the SAN controller computer, use SSH to log in to the controller
remotely:
$ ssh user@computer
Replace user with the name of an administrator user on the controller computer and
computer with the controller’s name or IP address.
3 Run the cvfsck command-line utility with the -f option:
$ sudo cvfsck -f volume
For more information, see the cvfsck man page.
Defragmenting a Volume
Defragmenting a le reassembles its pieces into the most ecient arrangement. You
can use the snfsdefrag command to defragment a le, a folder, or an entire volume.
To defragment a le, folder, or volume:
1 Open Terminal (in /Applications/Utilities/).
2 If you aren’t working at the SAN controller computer, use SSH to log in to the controller
remotely:
$ ssh user@computer
Replace user with the name of an administrator user on the controller computer and
computer with the controller’s name or IP address.
3 Run the snfsdefrag command.
To defragment individual les:
$ sudo snfsdefrag -v filename [filename ... ]
To defragment a folder:
$ sudo snfsdefrag -vr folder
To defragment a volume, set folder to the volume name.
For more information, see the snfsdefrag man page or “Defragmenting a File, Folder,
or Volume (snfsdefrag)” on page 11 9 .
64 Chapter 4 Managing SAN Storage










