Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it safe to interrupt (Ctrl-C) a long running xfs_fsr job?

I'm attempting to defragment a very large XFS volume.

share|improve this question
up vote 6 down vote accepted

Like all filesystem manipulation tools, xfs_fsr takes care of leaving the filesystem in a consistent state, in case the machine crashes (due to a power failure, for example). Unless you're unlucky and encounter a bug, that is — filesystem drivers are more complex than they look, especially as they are written for speed.

If you interrupt xfs_fsr cleanly (with any of the usual signals SIGINT, SIGHUP, SIGTERM or SIGQUIT), it takes care to write where it left off in /var/tmp/.fsrlast (or the file indicated with the -f option). So you can safely interrupt it with Ctrl+C, and restart it again with the same options later to complete the job.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.