2

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?

2
  • 2
    FYI: Use GNU screen for things like this!
    – Zoredache
    Oct 19, 2012 at 17:32
  • Yea, learning the hard way.. :(
    – Jim
    Oct 19, 2012 at 17:42

1 Answer 1

4

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.

1
  • 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, 2012 at 19:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .