Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

I lost SSH connection after I executed a resize2fs command on my drive /dev/md0.

Is there a way, now that I've restablished a connection, to check if the resize2fs is still running? And the status?

share|improve this question
FYI: Use GNU screen for things like this! – Zoredache Oct 19 '12 at 17:32
Yea, learning the hard way.. :( – Jim Oct 19 '12 at 17:42
up vote 4 down vote accepted

There are plenty of ways to check if a process is running. An old school ps aux | grep resize2fs would do the trick, just as well as pgrep -l resize2fs. You could also use top or htop and search for the process.

There is a good chance that resize2fs aborted when your session got disconnected. If that is a concern, run it from within screen next time (as already suggested).

Regarding the progress, there is unfortunately no easy way to check. If you are doing an offline resize, then you might have some luck running dumpe2fs -h /dev/md0 and see if the block counters are moving. I wouldn't expect those to change until everything is finished though. If you were growing the system online, then it is easier. Just check how much free space there is on the mount point. The free space would normally constantly grow for an online resize.

share|improve this answer
Thanks! I ended up re-running the command under GNU screen. It said it could not be run because the filesystem was already ad the block edge of the drive. I also mountd it to make sure, everything looks good! – Jim Oct 19 '12 at 19:28

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.