
Appendix B Using the Command Line 121
List the extents:
$ snfsdefrag -e datafile
Defragment the le datale:
$ snfsdefrag datafile
Defragment every le in the folder /datafolder/ (or any folder within /datafolder/) that
has more than one extent:
$ snfsdefrag -r datafolder
Recover unused preallocated disk space assigned to every le in folder /datafolder/:
$ snfsdefrag -rp datafolder
Controlling the Xsan File System (xsanctl)
Use the xsanctl command to control basic Xsan le system functions. For details, see
the xsanctl man page.
$ sudo xsanctl command
xsanctl Commands
xsanctl command Description
ping
Sends a ping message to the Xsan le system
to verify that it’s responding to management
requests.
mount volume
Mount an Xsan volume on the computer.
volume – the name of the volume
unmount volume
Unmount an Xsan volume on the computer.
volume – the name of the volume
sanConfigChanged
Noties the Xsan le system that it should reload
the SAN conguration.
disksChanged
Noties the Xsan le system that it should rescan
disks.
Mounting an Xsan Volume
Use the xsanctl command to mount an Xsan volume on a computer.
To mount a volume from the command line:
1 Go to the computer and open Terminal, or use SSH to log in to the computer remotely:
$ ssh user@computer
Replace user with the name of a user account on the remote computer and computer
with its IP address or DNS name.
2 Mount the volume:
$ sudo xsanctl mount volume
Comments to this Manuals