Showing results for 
Show  only  | Search instead for 
Did you mean: 

Web Gateway: Resizing the partitions

What is partition resizing and why would I want to do it?

Cache resizing is the process of making the cache partition smaller to allow more space going into the general "/opt" partition on the Web Gateway. The default scheme uses a large cache partition where sometimes it may be necessary to allocate more space to the partition where the log files are stored or the "/opt" partition. The default installation of Web Gateway on all hardware appliances restricts the opt partition to 40GB and gives the remaining space to the cache. When you switch to the alternate scheme, the cache partition size will be limited to 40GB and and the opt partition gets the remainder.


For information regarding how to monitor disk space usage and common causes leading to a full /opt partition, refer to the following link,


Resizing Guidelines

Note: Resizing the cache partition is permanent and there is no rollback procedure aside from re-imaging the appliance to restore default partition size.

  • Partition resizing is only possible on MWG 7.3.2 or newer installs.
  • The partition resizing can be done right after a fresh install or at any time in the future. You will not lose any of the data stored in your /opt partition!
  • A reboot is required for the repartitioning to be applied.
  • The minimum hard disk size for the repartitioning to work is 40GB. It is not recommended to modify your partition sizes if the hard disk size is under 100GB. For hard disk sizes under 100GB you would not see much benefit from the resizing.
    • To verify your hard disk size, run the 'df -h' command from the ssh console.  Afterwards, add the values of the 'Size' column to determine the total size of your hard disk.  (See the screenshot in the next section)
  • Prior to starting the resizing wizard below, it is recommended to perform a backup, To do so, go to the following location within the Web Gateway UI:
    • "Troubleshooting > Backup/Restore [Backup to file...]"



How to check current partition size

  • Log into the Web Gateway appliance as the "root" user using SSH.  Note: This password was setup when you initially built the appliance.
  • After logging into the Web Gateway run the "df -h" to take a look at your current partition scheme. The two partitions to note are the opt partition and cache partition below:



Note:  In the example above, the opt partition is 40GB and the cache partition is 725GB. The goal of resizing the cache is to reduce its size and reallocate that space to the opt partition where logs are stored.



How to resize the cache

  • In order to start the cache resize you will need to be logged into the Web Gateway as "root" and then enter the "mwg-cache-wizard" command:


root@mwg-appl #> mwg-cache-wizard


You will then get a screen which looks like the following:

Alternate Scheme Main Menu.jpg


Option 1 (Default scheme with full Web Cache) will leave the default partition scheme in place.


  • Select Option 2 (Alternate scheme with limited Web Cache) and select OK.

On the resulting screen below, the current cache size for the appliance along with the new partition scheme is displayed.   Sizes will vary based on space available, but notice that in the new partition scheme, the cache size is reduced to provide more space to logs on the opt partition!



  • Select "Yes" to save the new configuration and restart the appliance.



  • During the bootup process the following information is displayed.

On Boot.jpg


After the Cache resize

After the cache has been resized, you will be able to check the size of the partitions with the same "df -h" command as before. As you can see in the last 2 lines, the opt partition has been increased to 726GB and the cache has been reduced to 40GB.



Can the wizard be used a second time?

Partition resizing can only be performed once.  There are safeguards in place that will prevent you from re-running the format process which look like the image below.  The only way to revert the partitioning changes is to re-image the appliance and re-import a backup .



Or you could see the following;


Labels (1)

Worked perfekt for me! 🙂


But why the size of cache is too much as compared to opt directory as opt directory will get filled more quickly in comparison to cache directory????????????


The default partition scheme is still accomodating people who think that caching is effective in the web 2.0 world (or beyond). Over the last couple years more and more people realized that caching is not effective and that they would rather use the disk space (and I/O power for that matter) for othe rthings.

The problem for McAfee is that we can resize from a big cache to a small cache, but not the other way around. Thats why we have to keep the default with a large cache (and small opt) and give you guys the optionj to resize to small cache and big opt.

Version history
Revision #:
2 of 2
Last update:
‎03-20-2018 01:39 PM
Updated by:

Community Help Hub

    New to the forums or need help finding your way around the forums? There's a whole hub of community resources to help you.

  • Find Forum FAQs
  • Learn How to Earn Badges
  • Ask for Help
Go to Community Help

Join the Community

    Thousands of customers use the McAfee Community for peer-to-peer and expert product support. Enjoy these benefits with a free membership:

  • Get helpful solutions from McAfee experts.
  • Stay connected to product conversations that matter to you.
  • Participate in product groups led by McAfee employees.
Join the Community
Join the Community