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?
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
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
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.