1
0
mirror of https://github.com/rancher/os.git synced 2025-09-02 07:15:41 +00:00

Created Partition recommendations (markdown)

niusmallnan
2018-07-19 17:22:24 +08:00
parent 7527f4fbdb
commit 09731f694a

@@ -0,0 +1,69 @@
## System-docker and RootFS
When you ssh into RancherOS, you actually access the console container. The default console will automatically clean up the data, except for the following directories:
```
# These are the main ones
/opt
/home/
/var/lib/docker
/mnt
/var/log
...
...
```
If you put the data in these directories, you actually write directly to the root disk.
The system-docker data is written to the root disk, so it is not recommended for users to run their containers under system-docker.
If the user can use it friendly, two places still need attention:
1. the only thing that needs attention is the `/var/log` directory. It is necessary to clean it regularly.
2. the container logs in system-docker, they are in json-file format. This part of the change should be slow.
## User-docker
The user-docker data is written to the root disk by default. This part is necessary to use additional disk. Can refer to the following settings:
```
#cloud-config
mounts:
- - /dev/sdb
- /var/lib/docker/mnt
- ext4
- ""
rancher:
docker:
graph: /var/lib/docker/mnt
# check user docker
$ docker info
Name: rancher
ID: BU6T:6LTB:VKUU:GZM2:OGCR:IIVZ:6MVK:II73:KVVE:EEGI:CGPT:FWYS
***Docker Root Dir: /var/lib/docker/mnt****
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
...
# check mountinfo
$ df -hT
....
/dev/sdb ext4 9.8G 36.2M 9.2G 0% /var/lib/docker/mnt
....
```
## Others
If you are not using the default console, then most of the data you write will be saved in the root disk.
In the system, it is necessary to run a monitor to detect disk usage at all times.
## Reference
[Additional Mounts](https://rancher.com/docs/os/v1.x/en/installation/storage/additional-mounts/)