Can a vxfs defrag operation, once initiated by running fsadm -e -d be safely canceled?

  • Modified Date:
  • Article ID:000009623


When defragmenting a vxfs filesystem, the program will make several passes across every inode in the filesystem.  Large filesystems will take a lot of time to complete.  It is not uncommon for the fsadm process to run for multiple days.  Additionally, since the defragment process performs many reads and writes when reallocating blocks, the process can impact read and write performance of production applications.


The fsadm process can be safely stopped, if the correct procedure is followed:

You can safely kill a defrag operation, with the -15.  It can take a few hours to complete the operation/file it is on, however, before it stops.

1. Use Ctrl-C or "kill -15" to kill fsadm
2. Don't use kill -9
3. You can run "truss -f -p <PID>" (on solaris or AIX) or "strace -f -p <PID>" (linux) to verify the process is still making progress, if you wish.
4. Fsadm will ignore a kill until it finishes reorganizing the file it is on file. So if there is a large file that is highly fragmented,  especially in a large file system, it could take a long time, especially one with little free space.


  1. Preallocate files that you know will grow to prevent fragmentation.
  2. Get a metasave output (see below for instructions) if filesytem problems persist and you need analysis from support.
  3. Generally filesystems less than 75% full, or a large amount of free space, will defrag much quicker.



Applies To

This affects vxfs filesystems on Solaris, Linux, AIX and HP-UX.

Terms of use for this information are found in Legal Notices.



Did this article answer your question or resolve your issue?


Did this article save you the trouble of contacting technical support?


How can we make this article more helpful?

Email Address (Optional)