Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Correct Manage disk space section #7171

Merged
merged 1 commit into from
May 13, 2020

Conversation

SumanPitta
Copy link
Contributor

The df -h command is only for dedicated clusters i.e. use it on Staging and Production environments of Magento Cloud Pro projects. On the Integration environments and for Magento Cloud Starter projects, use magento-cloud db:size

Purpose of this pull request

This pull request (PR) ...

Affected DevDocs pages

  • ...

Links to Magento source code

  • ...

The df -h command is only for dedicated clusters i.e. use it on Staging and Production environments of Magento Cloud Pro projects. On the Integration environments and for Magento Cloud Starter projects, use magento-cloud db:size
@magento-engcom-team
Copy link

@SumanPitta thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository.

@devops-devdocs
Copy link
Collaborator

An admin must run tests on this PR before it can be merged.

Copy link
Contributor

@hguthrie hguthrie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi there.

Thanks for bringing this up. In fact, df -h seems to work okay in Integration, but it can be confusing. Instead of creating a note here, it would be better to update the section with the magento-cloud CLI commands as it is the best practice from the local environment, and keep the df -h as another method for the clusters as you mentioned.

@hguthrie hguthrie added Technical Updates to the code or processes that alter the technical content of the doc Internal Dev Differentiates work between community and Magento staff labels May 7, 2020
@@ -9,6 +9,9 @@ You can find the total storage capacity for your Cloud project in your {{site.da

You can check disk space usage in each environment using the _disk free_ command, which reports the amount of disk space used by the file system. You must use SSH to log in to a remote environment.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example, you could update this part with something about the mount:size command and sample response:

Suggested change
You can check disk space usage in each environment using the _disk free_ command, which reports the amount of disk space used by the file system. You must use SSH to log in to a remote environment.
You can check disk space usage in the current environment using the `magento-cloud mount:size` command:
magento-cloud mount:size

Sample response:

Checking disk usage for all mounts on <project>-<branch>[email protected]...

+------------+-----------+---------+-----------+-----------+--------+
| Mount(s)   | Size(s)   | Disk    | Used      | Available | % Used |
+------------+-----------+---------+-----------+-----------+--------+
| app/etc    | 184 KiB   | 1.9 GiB | 481.3 MiB | 1.4 GiB   | 24.7%  |
| pub/media  | 128 KiB   |         |           |           |        |
| pub/static | 158.2 MiB |         |           |           |        |
| var        | 316.7 MiB |         |           |           |        |
+------------+-----------+---------+-----------+-----------+--------+

All the mounts share the same disk.

To increase the available space, edit the disk key in the .magento.app.yaml file.
Also, you can check disk space usage in the remote environments using the _disk free_ command, which reports a more detailed list of the amount of disk space used by the file system. You must use SSH to log in to a remote environment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Staging and Production environments: to check the disk space on these clusters "df -h" can be used. Sample output below. /data/exports/ mount shows the disk space for media and /data/mysql/ mount shows disk space for database

sngst3u29h5gf@i-04422e3b24f2ef115:~$ df -h
Filesystem                                    Size  Used Avail Use% Mounted on
udev                                           16G     0   16G   0% /dev
tmpfs                                         3.2G  9.1M  3.2G   1% /run
/dev/xvda1                                     59G  8.9G   48G  16% /
tmpfs                                          16G   36K   16G   1% /dev/shm
tmpfs                                         5.0M     0  5.0M   0% /run/lock
tmpfs                                          16G     0   16G   0% /sys/fs/cgroup
/dev/xvdj                                     9.8G  2.3G  7.6G  23% /data/mysql
/dev/xvdi                                     9.8G  491M  9.3G   5% /data/exports
192.168.5.5:/shared                           9.8G  591M  9.3G   6% /mnt/shared
/dev/loop0                                     91M   91M     0 100% /app/sngst3u29h5gf
192.168.5.5:/shared/sngst3u29h5gf/var         9.8G  591M  9.3G   6% /app/sngst3u29h5gf/var
192.168.5.5:/shared/sngst3u29h5gf/app/etc     9.8G  591M  9.3G   6% /app/sngst3u29h5gf/app/etc
192.168.5.5:/shared/sngst3u29h5gf/pub/media   9.8G  591M  9.3G   6% /app/sngst3u29h5gf/pub/media
192.168.5.5:/shared/sngst3u29h5gf/pub/static  9.8G  591M  9.3G   6% /app/sngst3u29h5gf/pub/static

Integration environment and Starter projects: Use "magento-cloud mount:size"

Sample response:

Checking disk usage for all mounts on <project>-<branch>[email protected]...

+------------+-----------+---------+-----------+-----------+--------+
| Mount(s)   | Size(s)   | Disk    | Used      | Available | % Used |
+------------+-----------+---------+-----------+-----------+--------+
| app/etc    | 184 KiB   | 1.9 GiB | 481.3 MiB | 1.4 GiB   | 24.7%  |
| pub/media  | 128 KiB   |         |           |           |        |
| pub/static | 158.2 MiB |         |           |           |        |
| var        | 316.7 MiB |         |           |           |        |
+------------+-----------+---------+-----------+-----------+--------+

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SumanPitta You need to update your PR with the changes you are proposing. Otherwise, you can bring this information up as a GitHub issue instead, and we will take the content of the GitHub issue under advisement and apply the changes accordingly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hguthrie seems update could not be made. You may take the content and update the devdocs if necessary.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay @SumanPitta Thanks for the updates. I will get this sorted out. 👍

@@ -9,6 +9,9 @@ You can find the total storage capacity for your Cloud project in your {{site.da

You can check disk space usage in each environment using the _disk free_ command, which reports the amount of disk space used by the file system. You must use SSH to log in to a remote environment.

{:.bs-callout-info}
The _df -h_ command is only for dedicated clusters i.e. use it on Staging and Production environments of Magento Cloud Pro projects. On the Integration environments and for Magento Cloud Starter projects, use _magento-cloud db:size_
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Staging and Production environments: to check the disk space on these clusters "df -h" can be used. Sample output below. /data/exports/ mount shows the disk space for media and /data/mysql/ mount shows disk space for database

sngst3u29h5gf@i-04422e3b24f2ef115:~$ df -h
Filesystem                                    Size  Used Avail Use% Mounted on
udev                                           16G     0   16G   0% /dev
tmpfs                                         3.2G  9.1M  3.2G   1% /run
/dev/xvda1                                     59G  8.9G   48G  16% /
tmpfs                                          16G   36K   16G   1% /dev/shm
tmpfs                                         5.0M     0  5.0M   0% /run/lock
tmpfs                                          16G     0   16G   0% /sys/fs/cgroup
/dev/xvdj                                     9.8G  2.3G  7.6G  23% /data/mysql
/dev/xvdi                                     9.8G  491M  9.3G   5% /data/exports
192.168.5.5:/shared                           9.8G  591M  9.3G   6% /mnt/shared
/dev/loop0                                     91M   91M     0 100% /app/sngst3u29h5gf
192.168.5.5:/shared/sngst3u29h5gf/var         9.8G  591M  9.3G   6% /app/sngst3u29h5gf/var
192.168.5.5:/shared/sngst3u29h5gf/app/etc     9.8G  591M  9.3G   6% /app/sngst3u29h5gf/app/etc
192.168.5.5:/shared/sngst3u29h5gf/pub/media   9.8G  591M  9.3G   6% /app/sngst3u29h5gf/pub/media
192.168.5.5:/shared/sngst3u29h5gf/pub/static  9.8G  591M  9.3G   6% /app/sngst3u29h5gf/pub/static

Integration environment and Starter projects: Use "magento-cloud mount:size"

Sample response:

Checking disk usage for all mounts on <project>-<branch>[email protected]...

+------------+-----------+---------+-----------+-----------+--------+
| Mount(s)   | Size(s)   | Disk    | Used      | Available | % Used |
+------------+-----------+---------+-----------+-----------+--------+
| app/etc    | 184 KiB   | 1.9 GiB | 481.3 MiB | 1.4 GiB   | 24.7%  |
| pub/media  | 128 KiB   |         |           |           |        |
| pub/static | 158.2 MiB |         |           |           |        |
| var        | 316.7 MiB |         |           |           |        |
+------------+-----------+---------+-----------+-----------+--------+

Copy link
Contributor Author

@SumanPitta SumanPitta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Staging and Production environments: to check the disk space on these clusters "df -h" can be used. Sample output below. /data/exports/ mount shows the disk space for media and /data/mysql/ mount shows disk space for database

sngst3u29h5gf@i-04422e3b24f2ef115:~$ df -h
Filesystem                                    Size  Used Avail Use% Mounted on
udev                                           16G     0   16G   0% /dev
tmpfs                                         3.2G  9.1M  3.2G   1% /run
/dev/xvda1                                     59G  8.9G   48G  16% /
tmpfs                                          16G   36K   16G   1% /dev/shm
tmpfs                                         5.0M     0  5.0M   0% /run/lock
tmpfs                                          16G     0   16G   0% /sys/fs/cgroup
/dev/xvdj                                     9.8G  2.3G  7.6G  23% /data/mysql
/dev/xvdi                                     9.8G  491M  9.3G   5% /data/exports
192.168.5.5:/shared                           9.8G  591M  9.3G   6% /mnt/shared
/dev/loop0                                     91M   91M     0 100% /app/sngst3u29h5gf
192.168.5.5:/shared/sngst3u29h5gf/var         9.8G  591M  9.3G   6% /app/sngst3u29h5gf/var
192.168.5.5:/shared/sngst3u29h5gf/app/etc     9.8G  591M  9.3G   6% /app/sngst3u29h5gf/app/etc
192.168.5.5:/shared/sngst3u29h5gf/pub/media   9.8G  591M  9.3G   6% /app/sngst3u29h5gf/pub/media
192.168.5.5:/shared/sngst3u29h5gf/pub/static  9.8G  591M  9.3G   6% /app/sngst3u29h5gf/pub/static

Integration environment and Starter projects: Use "magento-cloud mount:size"

Sample response:

Checking disk usage for all mounts on <project>-<branch>[email protected]...

+------------+-----------+---------+-----------+-----------+--------+
| Mount(s)   | Size(s)   | Disk    | Used      | Available | % Used |
+------------+-----------+---------+-----------+-----------+--------+
| app/etc    | 184 KiB   | 1.9 GiB | 481.3 MiB | 1.4 GiB   | 24.7%  |
| pub/media  | 128 KiB   |         |           |           |        |
| pub/static | 158.2 MiB |         |           |           |        |
| var        | 316.7 MiB |         |           |           |        |
+------------+-----------+---------+-----------+-----------+--------+

@hguthrie hguthrie changed the base branch from master to hg-managediskspace May 13, 2020 16:00
@hguthrie hguthrie merged commit ae6850f into magento:hg-managediskspace May 13, 2020
@ghost
Copy link

ghost commented May 13, 2020

Hi @SumanPitta, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

hguthrie added a commit that referenced this pull request May 14, 2020
* Correct Manage disk space section (#7171)

moving to another branch for continued edits

* Update manage-disk-space.md

* Update manage-disk-space.md

Co-authored-by: Suman <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Internal Dev Differentiates work between community and Magento staff Technical Updates to the code or processes that alter the technical content of the doc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants