You can configure honoring of the O_DIRECT flag inside containers with the sysctl parameter fs.odirect_enable:
-
To ignore the
O_DIRECTflag inside a container, setfs.odirect_enableto0in that container. -
To honor the
O_DIRECTflag inside the container, setfs.odirect_enableto1in that container. -
To have a container inherit the setting from the hardware node, set
fs.odirect_enableto2in that container (default value). On the hardware node,fs.odirect_enableis0by default.
Note
Note: The fs.odirect_enable parameter on the Node only affects honoring of the O_DIRECT flag in containers and not on the Node itself where the O_DIRECT flag is always honored.