beautypg.com

Defragmenting a volume, Checking the integrity of a volume – Apple Xsan 1.1 User Manual

Page 68

background image

68

Chapter 3

Managing SAN Storage

Defragmenting a Volume

Defragmenting a 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

Run 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 117.

Checking the Integrity of a Volume

If SAN users are having trouble accessing files, you can use the

cvfsck

command to

check the integrity of a volume, its metadata, and files.

To check a 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

Run the

cvfsck

command-line utility (in /Library/Filesystems/Xsan/bin) to check the

volume without making repairs:

$ sudo cvfsck -vn volume

where

volume

is the name of an Xsan volume. You’ll see a warning that the journal is

active; this is normal.

For more information on using this command, see the

cvfsck

man page.