
12 0 Appendix B Using the Command Line
To display an extent count without defragmenting:
$ snfsdefrag -c [-K affinity] [-r] target [target] [...]
To prune a le (remove allocated extents beyond the end of le):
$ snfsdefrag -p [-D] [-v] [-q] [-K affinity] [-m count] [-r] target
[target] [...]
To list les that are candidates for defragmentation:
$ snfsdefrag -l [-D] [-v] [-K affinity] [-m count] [-r]
target [target] [...]
Parameter Description
-c
Display an extent count but don’t defragment
target.
-D
Display debugging messages.
-d
Operate on les with other than the current
depth.
-e
Report extents without defragmenting.
-K affinity
Only operate on les with the specied storage
pool anity.
affinity – the anity key (in Xsan, the anity
key is the same as the name of the storage pool)
You can use the
cvadmin show long
command to see a storage pool’s anity key.
-k affinity
Allocate new extents on the storage pool with
this anity.
-l
List les that might benet from
defragmentation.
-m count
Only operate on les with more than count
extents.
-p
Prune instead of defragment.
-q
Suppress messages.
-r [target]
Operate recursively to defragment all les in all
folders within the specied target folder.
-s
Allocate new extents on block boundaries.
-v
Display all available information and status
during defragmentation.
Examples
Count the extents in the le datale:
$ snfsdefrag -c datafile
Comments to this Manuals