You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/iot-edge/how-to-access-host-storage-from-module.md
+9-4Lines changed: 9 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Use environment variables and create options to enable module acces
4
4
author: PatAltimore
5
5
6
6
ms.author: patricka
7
-
ms.date: 06/10/2024
7
+
ms.date: 03/19/2025
8
8
ms.topic: concept-article
9
9
ms.service: azure-iot-edge
10
10
services: iot-edge
@@ -19,7 +19,7 @@ IoT Edge modules can use storage on the host IoT Edge device itself for improved
19
19
20
20
## Configure system modules to use persistent storage
21
21
22
-
By default, IoT Edge system modules, IoT Edge agent and IoT Edge hub, store state in the ephemeral file system of their container instance. This state is lost when the container instance is recycled, for example, when module image version or createOptions is updated.
22
+
By default, IoT Edge system modules, IoT Edge agent, and IoT Edge hub, store state in the ephemeral file system of their container instance. This state is lost when the container instance is recycled, for example, when module image version or createOptions is updated.
23
23
24
24
For production scenarios, use a persistent storage location on the host filesystem to store system module state. Doing so improves solution robustness and cloud message delivery guarantees.
25
25
@@ -80,13 +80,18 @@ Your deployment manifest would be similar to the following:
80
80
On version 1.4 and newer, there's no need for manually setting ownership or permissions for host storage backing the `StorageFolder`. Permissions and ownership are automatically managed by the system modules during startup.
81
81
82
82
> [!NOTE]
83
-
> Automatic permission management of host bound storage only applies to system modules, IoT Edge agent and Edge hub. For custom modules, manual management of permissions and ownership of bound host storage is required if the custom module container isn't running as `root` user.
83
+
> Automatic permission management of host bound storage only applies to system modules, IoT Edge agent, and Edge hub. For custom modules, manual management of permissions and ownership of bound host storage is required if the custom module container isn't running as `root` user.
84
84
85
85
86
86
87
87
## Link module storage to device storage for custom modules
88
88
89
-
If your custom module requires access to persistent storage on the host file system, use the module's create options to bind a storage folder in module container to a folder on the host machine. For example:
89
+
If your custom module requires access to persistent storage on the host file system, use the module's create options to bind a storage folder in module container to a folder on the host machine.
90
+
91
+
You can use a bind mount or a volume mount. A bind mount allows you to specify a host directory to be mounted into the module container. A volume mount allows you to specify a volume that is managed by Docker. For more information about when to use bind mounts or volume mounts, see the Docker documentation for [volume mounts](https://docs.docker.com/engine/storage/volumes) and [bind mounts](https://docs.docker.com/storage/bind-mounts).
92
+
93
+
The following example shows how to use a bind mount in the module's create options:
0 commit comments