Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

Thanks!

share|improve this question
2  
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
add comment

1 Answer 1

up vote 2 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
add comment

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.