@@ -18,7 +18,7 @@ It will also need at least 512 2 MB Hugepages configured.
18
18
19
19
> Learn more about hugepages: [ parts 1] [ hugepages-lwn-one ] , [ 2] [ hugepages-lwn-two ] ,
20
20
> [ 3] [ hugepages-lwn-three ] , [ 4] [ hugepages-lwn-four ] , [ 5] [ hugepages-lwn-five ] .
21
-
21
+
22
22
In NixOS:
23
23
24
24
``` nix
@@ -78,7 +78,7 @@ In order to use the full feature set of Mayastor, some or all of the following c
78
78
+ ` nvme_loop ` : NVMe Loop Device support
79
79
80
80
To load these on NixOS:
81
-
81
+
82
82
``` nix
83
83
# /etc/nixos/configuration.nix
84
84
boot.kernelModules = [
@@ -91,7 +91,40 @@ In order to use the full feature set of Mayastor, some or all of the following c
91
91
``` bash
92
92
modprobe nbd nvmet nvmet_rdma nvme_fabrics nvme_tcp nvme_rdma nvme_loop
93
93
```
94
- * An NVMe device. (Typically via PCI-E through an standard slot or [ M.2] [ m-dot-2 ] port)
94
+ * For Asymmetric Namespace Access (ANA) support (early preview), the following kernel build configuration enabled:
95
+ + ` CONFIG_NVME_MULTIPATH ` : enables support for multipath access to NVMe subsystems
96
+
97
+ This is usually already enabled in distributions kernels, at least for RHEL/CentOS 8.2, Ubuntu 20.04 LTS, and SUSE Linux Enterprise 15.2.
98
+
99
+ On some distributions such as RHEL 8, the feature must be enabled manually:
100
+
101
+ ``` sh
102
+ # /etc/modprobe.d/nvme-multipath
103
+ options nvme_core multipath=1
104
+ ```
105
+
106
+ followed by reloading the ` nvme-core ` module or rebooting.
107
+
108
+ To build this on NixOS:
109
+
110
+ ``` nix
111
+ # /etc/nixos/configuration.nix
112
+ boot.kernelPackages = pkgs.linuxPackages;
113
+ boot.kernelPatches = [ {
114
+ name = "nvme-multipath";
115
+ patch = null;
116
+ extraConfig = ''
117
+ NVME_MULTIPATH y
118
+ '';
119
+ } ];
120
+ ```
121
+
122
+ followed by:
123
+
124
+ ``` sh
125
+ sudo nixos-rebuild boot
126
+ ```
127
+ * An NVMe device. (Typically via PCI-E through a standard slot or [ M.2] [ m-dot-2 ] port)
95
128
* A version of [ ` nix ` ] [ nix-install ] configured as in the [ build guide.] [ doc-build ]
96
129
97
130
## Running binaries directly
@@ -158,7 +191,7 @@ Why these parameters?
158
191
- ` --privileged ` to allow controlling memory policies.
159
192
160
193
> ** TODO:** We can use [ control groups] [ control-groups ] for this!
161
- - ` -v /dev:/dev:rw ` is needed to get access to any raw device you might want to consume as local
194
+ - ` -v /dev:/dev:rw ` is needed to get access to any raw device you might want to consume as local
162
195
storage and huge pages
163
196
- ` -v /dev/shm:/dev/shm:rw ` is needed as for a circular buffer that can trace any IO operations
164
197
as they happen
@@ -184,7 +217,7 @@ nixpkgs.overlays = [
184
217
];
185
218
186
219
systemd.services.mayastor = {
187
- wantedBy = [ "multi-user.target" ];
220
+ wantedBy = [ "multi-user.target" ];
188
221
after = [ "network.target" ];
189
222
description = "A cloud native declarative data plane.";
190
223
serviceConfig = {
@@ -273,4 +306,3 @@ production Mayastor deployment and operation instructions.
273
306
[ lxd ] : https://linuxcontainers.org/
274
307
[ libvirtd ] : https://libvirt.org/index.html
275
308
[ terraform-readme ] : ./terraform/readme.adoc
276
- [ aarch64-branch] :
0 commit comments