System bloated after upgrade

hamdpa wrote on Saturday, April 23, 2016:

Hello to all,
Just succesfully upgraded appliance from 4.2.0-4 to 4.2.1. VMware Host is running on Windows 8.1 Pro with media/ guest is Ubuntu server 14.04.4 LTS (Trusty Tahr). Everything looks good, but noted that the entire appliance jumped from 43 to 60 gigabytes. I previously noted a similar 20 gig jump when I upgraded from 4.1 to 4.2. The message claims that a backup of OpenEMR is in /tmp/openemr-tmp/, but I don’t see it in that folder. Could someone help me understand where the “fat” is that needs to be trimmed.

Thank you,

Henry

fsgl wrote on Sunday, April 24, 2016:

Try deleting backup to see if it helps:

hamdpa wrote on Sunday, April 24, 2016:

Hi fsgl,

Looking for it, but its not where its supposed to be, according to the message your showing. Thats the same message that you posted. Where else could it be hideing? I think im going to search for large files. Would appreciate any better ideas.

Henry

fsgl wrote on Sunday, April 24, 2016:

Not in the office at the present time, so I can’t dig around in my LM copy.

The situation is probably different in your VM.

Try this to locate the folder.

hamdpa wrote on Sunday, April 24, 2016:

Good advice, as usual. Will be on the hunt. Remember going thru this last time and couldn’t find it. Will post what transpires.

hamdpa wrote on Monday, April 25, 2016:

Ok. Found these large files in /home/openemr/

Can all or some of these large files be safely deleted?

Thank you,

Henry

hamdpa wrote on Monday, April 25, 2016:

Sorry for the attachment, but I do not know how to insert image.

mdsupport wrote on Monday, April 25, 2016:

Unless you are retaining 10s of backups, nothing on openemr side can explain growth from 20GB to 60GB.
Basic command you need is du (disk usage). Look at several ways described in this askubuntu discussion. Basic du will tell you how much space is used by ubuntu. If that is way more than vm disk, your problem is with VMware - may be you are running snapshot(s). If you are indeed using 60GB of ubuntu space, the same link refers to some tools give you graphic view of all directories. You can then drill down the largest ones to find the root cause.

hamdpa wrote on Monday, April 25, 2016:

Hi MD Support,

I tried in Ubuntu the find command (find / -size +10G -ls) looking for files larger than 10G and it comes back without finding anything, despite finding the above files via webmins graphical interface. A search for openemr-tmp also comes up dry both via Ubuntu and webmin. Are those large files I found in the above /home file fluff or are they needed.
Thank you
Henry

fsgl wrote on Monday, April 25, 2016:

Don’t have OE in an appliance, but definitely nothing related to OE is in my home folder.

Try copying those huge files to an external hard drive, then delete them in your server to see if it makes any difference.

If bedlam ensues, you can always add them back.

mdsupport wrote on Tuesday, April 26, 2016:

What is seen in fat…rtf is a single picture of /home/openemr with 3 downloads of different openemr versions (total appx 150MB) and webmin (25MB) - each of it can be deleted releasing not more than 200MB. I fail to see any large files of anything of significance. If you must have graphical search, you could try webmin’s java file manager. It used to have size filter.

Hello to all,
Below is the solution to my problem.
If you are using a VMware Ubuntu appliance you will notice a significant increase in the size of the appliance after an upgrade or whenever migrating to a newer version of Ubuntu. This apparently occurs because Ubuntu does not actually delete files. Thus your appliance will become bloated pretty quickly. Below follows a solution I have found the to be very helpful.

Do the following from Ubuntu root (sudo -i) #.
First zero out the deleted files.
~# cat /dev/zero > zero.fill ; sync ; sleep 1 ; sync ; rm -f zero.fill

After it has worked for awhile it will say “cat: write error: No space left on device”
Then issue the following cmd

~# VMware-toolbox-cmd disk shrink /

You will then see the following;
" Please disregard any warning about disk space for the duration of the shrink process"
Then you will get the following ;
“Progress: 0% [==> 100%” when it is done

This has worked for me every time.
Hope this helps those who use a VMware appliance ,

Henry

Below is a screen shot. Don’t really know how to insert a screenshot, sorry.

Doc5.docx (193.8 KB)