Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

1 Answer 1

up vote 4 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

 
discard

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.