beautypg.com

Check the integrity of a volume – Apple Xsan 2 User Manual

Page 86

background image

Defragment a file, folder, or volume:

1

Open Terminal (in the /Applications/Utilities/ folder) on any SAN computer.

If you aren’t working at a SAN computer, use SSH to log in to a SAN computer remotely:

$ ssh user@computer

Replace

user

with the name of an administrator user on the SAN computer and

computer

with the SAN computer’s name or IP address.

If you have trouble making an SSH connection, check the Sharing pane of System
Preferences on the SAN computer to make sure Remote Login service is turned on.

2

Run the

snfsdefrag

command-line tool.

To defragment individual files:

$ 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 “Defragment a file, folder, or

volume (snfsdefrag)” on page 154.

Check the integrity of a volume

If SAN users have trouble accessing files, use the

cvfsck

command-line tool to check

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

Check a volume:

1

Open Terminal (in the /Applications/Utilities/ folder).

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.

If you have trouble making an SSH connection, check the Sharing pane of System
Preferences on the controller to make sure Remote Login service is turned on.

3

Run the

cvfsck

command-line tool (in /System/Library/Filesystems/acfs.fs/Contents/

bin/) to check the volume without making repairs:

$ sudo cvfsck -vn volume

You’ll see a warning that the journal is active; this is normal.

For more information, see the

cvfsck

man page.

86

Chapter 5

Manage SAN storage