EC2 added memory is not reflecting in the diskspace
Matthew Barrera
I have added some extra space to my EC2 instance and resized the filesystem following AWS docs.
Not sure what went wrong but my disk size is showing up correctly when I try df -h but the used space is wrong and not sure why my newly added disk space is showing up occupied.
ncdu is showing up the correct used space.
How can I fix and add space to my existing filesystem?
1 Answer
I found the issue and fixed it. Diskspace was occupied by the deleted log file whose reference was kept by a process (in my case PHP).
Used lsof +L1 to check which process was keeping the reference and then run kill -9 processID to terminate the process and it will release the memory as well.