You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1591 lines
38 KiB

  1. <!doctype html>
  2. <html lang="en" class="no-js">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1">
  6. <meta name="description" content="mergerfs - a featureful union filesystem">
  7. <link rel="canonical" href="https://trapexit.github.io/mergerfs/runtime_interfaces/">
  8. <link rel="prev" href="../error_handling/">
  9. <link rel="next" href="../remote_filesystems/">
  10. <link rel="icon" href="../assets/images/favicon.png">
  11. <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.49">
  12. <title>Runtime Interfaces - mergerfs</title>
  13. <link rel="stylesheet" href="../assets/stylesheets/main.6f8fc17f.min.css">
  14. <link rel="stylesheet" href="../assets/stylesheets/palette.06af60db.min.css">
  15. <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  16. <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
  17. <style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
  18. <script>__md_scope=new URL("..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
  19. </head>
  20. <body dir="ltr" data-md-color-scheme="default" data-md-color-primary="indigo" data-md-color-accent="indigo">
  21. <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
  22. <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
  23. <label class="md-overlay" for="__drawer"></label>
  24. <div data-md-component="skip">
  25. <a href="#runtime-interfaces" class="md-skip">
  26. Skip to content
  27. </a>
  28. </div>
  29. <div data-md-component="announce">
  30. </div>
  31. <header class="md-header md-header--shadow" data-md-component="header">
  32. <nav class="md-header__inner md-grid" aria-label="Header">
  33. <a href=".." title="mergerfs" class="md-header__button md-logo" aria-label="mergerfs" data-md-component="logo">
  34. <img src="../logo.jpeg" alt="logo">
  35. </a>
  36. <label class="md-header__button md-icon" for="__drawer">
  37. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg>
  38. </label>
  39. <div class="md-header__title" data-md-component="header-title">
  40. <div class="md-header__ellipsis">
  41. <div class="md-header__topic">
  42. <span class="md-ellipsis">
  43. mergerfs
  44. </span>
  45. </div>
  46. <div class="md-header__topic" data-md-component="header-topic">
  47. <span class="md-ellipsis">
  48. Runtime Interfaces
  49. </span>
  50. </div>
  51. </div>
  52. </div>
  53. <form class="md-header__option" data-md-component="palette">
  54. <input class="md-option" data-md-color-media="(prefers-color-scheme)" data-md-color-scheme="default" data-md-color-primary="indigo" data-md-color-accent="indigo" aria-label="Switch to light mode" type="radio" name="__palette" id="__palette_0">
  55. <label class="md-header__button md-icon" title="Switch to light mode" for="__palette_1" hidden>
  56. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m14.3 16-.7-2h-3.2l-.7 2H7.8L11 7h2l3.2 9zM20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12zm-9.15 3.96h2.3L12 9z"/></svg>
  57. </label>
  58. <input class="md-option" data-md-color-media="(prefers-color-scheme: light)" data-md-color-scheme="default" data-md-color-primary="indigo" data-md-color-accent="indigo" aria-label="Switch to dark mode" type="radio" name="__palette" id="__palette_1">
  59. <label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_2" hidden>
  60. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a4 4 0 0 0-4 4 4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0-4-4m0 10a6 6 0 0 1-6-6 6 6 0 0 1 6-6 6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg>
  61. </label>
  62. <input class="md-option" data-md-color-media="(prefers-color-scheme: dark)" data-md-color-scheme="slate" data-md-color-primary="indigo" data-md-color-accent="indigo" aria-label="Switch to system preference" type="radio" name="__palette" id="__palette_2">
  63. <label class="md-header__button md-icon" title="Switch to system preference" for="__palette_0" hidden>
  64. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12s-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6a6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg>
  65. </label>
  66. </form>
  67. <script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script>
  68. <label class="md-header__button md-icon" for="__search">
  69. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
  70. </label>
  71. <div class="md-search" data-md-component="search" role="dialog">
  72. <label class="md-search__overlay" for="__search"></label>
  73. <div class="md-search__inner" role="search">
  74. <form class="md-search__form" name="search">
  75. <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
  76. <label class="md-search__icon md-icon" for="__search">
  77. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
  78. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg>
  79. </label>
  80. <nav class="md-search__options" aria-label="Search">
  81. <a href="javascript:void(0)" class="md-search__icon md-icon" title="Share" aria-label="Share" data-clipboard data-clipboard-text="" data-md-component="search-share" tabindex="-1">
  82. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9a3 3 0 0 0-3 3 3 3 0 0 0 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.15c-.05.21-.08.43-.08.66 0 1.61 1.31 2.91 2.92 2.91s2.92-1.3 2.92-2.91A2.92 2.92 0 0 0 18 16.08"/></svg>
  83. </a>
  84. <button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">
  85. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>
  86. </button>
  87. </nav>
  88. </form>
  89. <div class="md-search__output">
  90. <div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix>
  91. <div class="md-search-result" data-md-component="search-result">
  92. <div class="md-search-result__meta">
  93. Initializing search
  94. </div>
  95. <ol class="md-search-result__list" role="presentation"></ol>
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. <div class="md-header__source">
  102. <a href="https://github.com/trapexit/mergerfs" title="Go to repository" class="md-source" data-md-component="source">
  103. <div class="md-source__icon md-icon">
  104. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.7.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81"/></svg>
  105. </div>
  106. <div class="md-source__repository">
  107. mergerfs
  108. </div>
  109. </a>
  110. </div>
  111. </nav>
  112. </header>
  113. <div class="md-container" data-md-component="container">
  114. <main class="md-main" data-md-component="main">
  115. <div class="md-main__inner md-grid">
  116. <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
  117. <div class="md-sidebar__scrollwrap">
  118. <div class="md-sidebar__inner">
  119. <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
  120. <label class="md-nav__title" for="__drawer">
  121. <a href=".." title="mergerfs" class="md-nav__button md-logo" aria-label="mergerfs" data-md-component="logo">
  122. <img src="../logo.jpeg" alt="logo">
  123. </a>
  124. mergerfs
  125. </label>
  126. <div class="md-nav__source">
  127. <a href="https://github.com/trapexit/mergerfs" title="Go to repository" class="md-source" data-md-component="source">
  128. <div class="md-source__icon md-icon">
  129. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.7.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81"/></svg>
  130. </div>
  131. <div class="md-source__repository">
  132. mergerfs
  133. </div>
  134. </a>
  135. </div>
  136. <ul class="md-nav__list" data-md-scrollfix>
  137. <li class="md-nav__item">
  138. <a href=".." class="md-nav__link">
  139. <span class="md-ellipsis">
  140. Home
  141. </span>
  142. </a>
  143. </li>
  144. <li class="md-nav__item">
  145. <a href="../quickstart/" class="md-nav__link">
  146. <span class="md-ellipsis">
  147. QuickStart
  148. </span>
  149. </a>
  150. </li>
  151. <li class="md-nav__item md-nav__item--nested">
  152. <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" >
  153. <label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="0">
  154. <span class="md-ellipsis">
  155. Installation
  156. </span>
  157. <span class="md-nav__icon md-icon"></span>
  158. </label>
  159. <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="false">
  160. <label class="md-nav__title" for="__nav_3">
  161. <span class="md-nav__icon md-icon"></span>
  162. Installation
  163. </label>
  164. <ul class="md-nav__list" data-md-scrollfix>
  165. <li class="md-nav__item">
  166. <a href="../setup/installation/" class="md-nav__link">
  167. <span class="md-ellipsis">
  168. Installation
  169. </span>
  170. </a>
  171. </li>
  172. <li class="md-nav__item">
  173. <a href="../setup/upgrade/" class="md-nav__link">
  174. <span class="md-ellipsis">
  175. Upgrade
  176. </span>
  177. </a>
  178. </li>
  179. <li class="md-nav__item">
  180. <a href="../setup/build/" class="md-nav__link">
  181. <span class="md-ellipsis">
  182. Build
  183. </span>
  184. </a>
  185. </li>
  186. </ul>
  187. </nav>
  188. </li>
  189. <li class="md-nav__item md-nav__item--nested">
  190. <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4" >
  191. <label class="md-nav__link" for="__nav_4" id="__nav_4_label" tabindex="0">
  192. <span class="md-ellipsis">
  193. Config
  194. </span>
  195. <span class="md-nav__icon md-icon"></span>
  196. </label>
  197. <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_4_label" aria-expanded="false">
  198. <label class="md-nav__title" for="__nav_4">
  199. <span class="md-nav__icon md-icon"></span>
  200. Config
  201. </label>
  202. <ul class="md-nav__list" data-md-scrollfix>
  203. <li class="md-nav__item">
  204. <a href="../config/terminology/" class="md-nav__link">
  205. <span class="md-ellipsis">
  206. Terminology
  207. </span>
  208. </a>
  209. </li>
  210. <li class="md-nav__item">
  211. <a href="../config/options/" class="md-nav__link">
  212. <span class="md-ellipsis">
  213. Options
  214. </span>
  215. </a>
  216. </li>
  217. <li class="md-nav__item">
  218. <a href="../config/deprecated_options/" class="md-nav__link">
  219. <span class="md-ellipsis">
  220. Deprecated Options
  221. </span>
  222. </a>
  223. </li>
  224. <li class="md-nav__item">
  225. <a href="../config/branches/" class="md-nav__link">
  226. <span class="md-ellipsis">
  227. branches
  228. </span>
  229. </a>
  230. </li>
  231. <li class="md-nav__item">
  232. <a href="../config/functions_categories_and_policies/" class="md-nav__link">
  233. <span class="md-ellipsis">
  234. functions, categories and policies
  235. </span>
  236. </a>
  237. </li>
  238. <li class="md-nav__item">
  239. <a href="../config/func_readdir/" class="md-nav__link">
  240. <span class="md-ellipsis">
  241. func.readdir
  242. </span>
  243. </a>
  244. </li>
  245. <li class="md-nav__item">
  246. <a href="../config/cache/" class="md-nav__link">
  247. <span class="md-ellipsis">
  248. caching
  249. </span>
  250. </a>
  251. </li>
  252. <li class="md-nav__item">
  253. <a href="../config/ioctl/" class="md-nav__link">
  254. <span class="md-ellipsis">
  255. ioctl
  256. </span>
  257. </a>
  258. </li>
  259. <li class="md-nav__item">
  260. <a href="../config/rename_and_link/" class="md-nav__link">
  261. <span class="md-ellipsis">
  262. rename and link
  263. </span>
  264. </a>
  265. </li>
  266. <li class="md-nav__item">
  267. <a href="../config/statfs/" class="md-nav__link">
  268. <span class="md-ellipsis">
  269. statfs / statvfs
  270. </span>
  271. </a>
  272. </li>
  273. <li class="md-nav__item">
  274. <a href="../config/flush-on-close/" class="md-nav__link">
  275. <span class="md-ellipsis">
  276. flush-on-close
  277. </span>
  278. </a>
  279. </li>
  280. </ul>
  281. </nav>
  282. </li>
  283. <li class="md-nav__item">
  284. <a href="../error_handling/" class="md-nav__link">
  285. <span class="md-ellipsis">
  286. Error Handling
  287. </span>
  288. </a>
  289. </li>
  290. <li class="md-nav__item md-nav__item--active">
  291. <input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
  292. <label class="md-nav__link md-nav__link--active" for="__toc">
  293. <span class="md-ellipsis">
  294. Runtime Interfaces
  295. </span>
  296. <span class="md-nav__icon md-icon"></span>
  297. </label>
  298. <a href="./" class="md-nav__link md-nav__link--active">
  299. <span class="md-ellipsis">
  300. Runtime Interfaces
  301. </span>
  302. </a>
  303. <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
  304. <label class="md-nav__title" for="__toc">
  305. <span class="md-nav__icon md-icon"></span>
  306. Table of contents
  307. </label>
  308. <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
  309. <li class="md-nav__item">
  310. <a href="#runtime-config" class="md-nav__link">
  311. <span class="md-ellipsis">
  312. Runtime Config
  313. </span>
  314. </a>
  315. <nav class="md-nav" aria-label="Runtime Config">
  316. <ul class="md-nav__list">
  317. <li class="md-nav__item">
  318. <a href="#mergerfs-pseudo-file" class="md-nav__link">
  319. <span class="md-ellipsis">
  320. .mergerfs pseudo file
  321. </span>
  322. </a>
  323. <nav class="md-nav" aria-label=".mergerfs pseudo file">
  324. <ul class="md-nav__list">
  325. <li class="md-nav__item">
  326. <a href="#keys" class="md-nav__link">
  327. <span class="md-ellipsis">
  328. Keys
  329. </span>
  330. </a>
  331. </li>
  332. <li class="md-nav__item">
  333. <a href="#values" class="md-nav__link">
  334. <span class="md-ellipsis">
  335. Values
  336. </span>
  337. </a>
  338. <nav class="md-nav" aria-label="Values">
  339. <ul class="md-nav__list">
  340. <li class="md-nav__item">
  341. <a href="#usermergerfsbranches" class="md-nav__link">
  342. <span class="md-ellipsis">
  343. user.mergerfs.branches
  344. </span>
  345. </a>
  346. </li>
  347. <li class="md-nav__item">
  348. <a href="#example" class="md-nav__link">
  349. <span class="md-ellipsis">
  350. Example
  351. </span>
  352. </a>
  353. </li>
  354. </ul>
  355. </nav>
  356. </li>
  357. </ul>
  358. </nav>
  359. </li>
  360. <li class="md-nav__item">
  361. <a href="#file-directory-xattrs" class="md-nav__link">
  362. <span class="md-ellipsis">
  363. file / directory xattrs
  364. </span>
  365. </a>
  366. </li>
  367. </ul>
  368. </nav>
  369. </li>
  370. <li class="md-nav__item">
  371. <a href="#signals" class="md-nav__link">
  372. <span class="md-ellipsis">
  373. Signals
  374. </span>
  375. </a>
  376. </li>
  377. <li class="md-nav__item">
  378. <a href="#ioctl" class="md-nav__link">
  379. <span class="md-ellipsis">
  380. ioctl
  381. </span>
  382. </a>
  383. </li>
  384. </ul>
  385. </nav>
  386. </li>
  387. <li class="md-nav__item">
  388. <a href="../remote_filesystems/" class="md-nav__link">
  389. <span class="md-ellipsis">
  390. Remote Filesystems
  391. </span>
  392. </a>
  393. </li>
  394. <li class="md-nav__item">
  395. <a href="../tips_notes/" class="md-nav__link">
  396. <span class="md-ellipsis">
  397. Tips and Notes
  398. </span>
  399. </a>
  400. </li>
  401. <li class="md-nav__item">
  402. <a href="../known_issues_bugs/" class="md-nav__link">
  403. <span class="md-ellipsis">
  404. Known Issues and Bugs
  405. </span>
  406. </a>
  407. </li>
  408. <li class="md-nav__item">
  409. <a href="../project_comparisons/" class="md-nav__link">
  410. <span class="md-ellipsis">
  411. Project Comparisons
  412. </span>
  413. </a>
  414. </li>
  415. <li class="md-nav__item">
  416. <a href="../performance/" class="md-nav__link">
  417. <span class="md-ellipsis">
  418. Tweaking Performance
  419. </span>
  420. </a>
  421. </li>
  422. <li class="md-nav__item">
  423. <a href="../benchmarking/" class="md-nav__link">
  424. <span class="md-ellipsis">
  425. Benchmarking
  426. </span>
  427. </a>
  428. </li>
  429. <li class="md-nav__item">
  430. <a href="../tooling/" class="md-nav__link">
  431. <span class="md-ellipsis">
  432. Tooling
  433. </span>
  434. </a>
  435. </li>
  436. <li class="md-nav__item md-nav__item--nested">
  437. <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_14" >
  438. <label class="md-nav__link" for="__nav_14" id="__nav_14_label" tabindex="0">
  439. <span class="md-ellipsis">
  440. FAQ
  441. </span>
  442. <span class="md-nav__icon md-icon"></span>
  443. </label>
  444. <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_14_label" aria-expanded="false">
  445. <label class="md-nav__title" for="__nav_14">
  446. <span class="md-nav__icon md-icon"></span>
  447. FAQ
  448. </label>
  449. <ul class="md-nav__list" data-md-scrollfix>
  450. <li class="md-nav__item">
  451. <a href="../faq/compatibility_and_integration/" class="md-nav__link">
  452. <span class="md-ellipsis">
  453. Compatibility and Integration
  454. </span>
  455. </a>
  456. </li>
  457. <li class="md-nav__item">
  458. <a href="../faq/configuration_and_policies/" class="md-nav__link">
  459. <span class="md-ellipsis">
  460. Configuration and Policies
  461. </span>
  462. </a>
  463. </li>
  464. <li class="md-nav__item">
  465. <a href="../faq/general_information_and_overview/" class="md-nav__link">
  466. <span class="md-ellipsis">
  467. General Information and Overview
  468. </span>
  469. </a>
  470. </li>
  471. <li class="md-nav__item">
  472. <a href="../faq/recommendations_and_warnings/" class="md-nav__link">
  473. <span class="md-ellipsis">
  474. Recommendations and Warnings
  475. </span>
  476. </a>
  477. </li>
  478. <li class="md-nav__item">
  479. <a href="../faq/technical_behavior_and_limitations/" class="md-nav__link">
  480. <span class="md-ellipsis">
  481. Technical Behavior and Limitations
  482. </span>
  483. </a>
  484. </li>
  485. <li class="md-nav__item">
  486. <a href="../faq/usage_and_functionality/" class="md-nav__link">
  487. <span class="md-ellipsis">
  488. Usage and Functionality
  489. </span>
  490. </a>
  491. </li>
  492. <li class="md-nav__item">
  493. <a href="../faq/limit_drive_spinup/" class="md-nav__link">
  494. <span class="md-ellipsis">
  495. Limit drive spinup
  496. </span>
  497. </a>
  498. </li>
  499. </ul>
  500. </nav>
  501. </li>
  502. <li class="md-nav__item">
  503. <a href="../related_projects/" class="md-nav__link">
  504. <span class="md-ellipsis">
  505. Related Projects
  506. </span>
  507. </a>
  508. </li>
  509. <li class="md-nav__item">
  510. <a href="../media_and_publicity/" class="md-nav__link">
  511. <span class="md-ellipsis">
  512. Media and Publicity
  513. </span>
  514. </a>
  515. </li>
  516. <li class="md-nav__item">
  517. <a href="../support/" class="md-nav__link">
  518. <span class="md-ellipsis">
  519. Support
  520. </span>
  521. </a>
  522. </li>
  523. <li class="md-nav__item">
  524. <a href="../donations/" class="md-nav__link">
  525. <span class="md-ellipsis">
  526. Donations
  527. </span>
  528. </a>
  529. </li>
  530. </ul>
  531. </nav>
  532. </div>
  533. </div>
  534. </div>
  535. <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
  536. <div class="md-sidebar__scrollwrap">
  537. <div class="md-sidebar__inner">
  538. <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
  539. <label class="md-nav__title" for="__toc">
  540. <span class="md-nav__icon md-icon"></span>
  541. Table of contents
  542. </label>
  543. <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
  544. <li class="md-nav__item">
  545. <a href="#runtime-config" class="md-nav__link">
  546. <span class="md-ellipsis">
  547. Runtime Config
  548. </span>
  549. </a>
  550. <nav class="md-nav" aria-label="Runtime Config">
  551. <ul class="md-nav__list">
  552. <li class="md-nav__item">
  553. <a href="#mergerfs-pseudo-file" class="md-nav__link">
  554. <span class="md-ellipsis">
  555. .mergerfs pseudo file
  556. </span>
  557. </a>
  558. <nav class="md-nav" aria-label=".mergerfs pseudo file">
  559. <ul class="md-nav__list">
  560. <li class="md-nav__item">
  561. <a href="#keys" class="md-nav__link">
  562. <span class="md-ellipsis">
  563. Keys
  564. </span>
  565. </a>
  566. </li>
  567. <li class="md-nav__item">
  568. <a href="#values" class="md-nav__link">
  569. <span class="md-ellipsis">
  570. Values
  571. </span>
  572. </a>
  573. <nav class="md-nav" aria-label="Values">
  574. <ul class="md-nav__list">
  575. <li class="md-nav__item">
  576. <a href="#usermergerfsbranches" class="md-nav__link">
  577. <span class="md-ellipsis">
  578. user.mergerfs.branches
  579. </span>
  580. </a>
  581. </li>
  582. <li class="md-nav__item">
  583. <a href="#example" class="md-nav__link">
  584. <span class="md-ellipsis">
  585. Example
  586. </span>
  587. </a>
  588. </li>
  589. </ul>
  590. </nav>
  591. </li>
  592. </ul>
  593. </nav>
  594. </li>
  595. <li class="md-nav__item">
  596. <a href="#file-directory-xattrs" class="md-nav__link">
  597. <span class="md-ellipsis">
  598. file / directory xattrs
  599. </span>
  600. </a>
  601. </li>
  602. </ul>
  603. </nav>
  604. </li>
  605. <li class="md-nav__item">
  606. <a href="#signals" class="md-nav__link">
  607. <span class="md-ellipsis">
  608. Signals
  609. </span>
  610. </a>
  611. </li>
  612. <li class="md-nav__item">
  613. <a href="#ioctl" class="md-nav__link">
  614. <span class="md-ellipsis">
  615. ioctl
  616. </span>
  617. </a>
  618. </li>
  619. </ul>
  620. </nav>
  621. </div>
  622. </div>
  623. </div>
  624. <div class="md-content" data-md-component="content">
  625. <article class="md-content__inner md-typeset">
  626. <a href="https://github.com/trapexit/mergerfs/tree/master/mkdocs/docs/runtime_interfaces.md" title="Edit this page" class="md-content__button md-icon">
  627. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10 20H6V4h7v5h5v3.1l2-2V8l-6-6H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h4zm10.2-7c.1 0 .3.1.4.2l1.3 1.3c.2.2.2.6 0 .8l-1 1-2.1-2.1 1-1c.1-.1.2-.2.4-.2m0 3.9L14.1 23H12v-2.1l6.1-6.1z"/></svg>
  628. </a>
  629. <h1 id="runtime-interfaces">Runtime Interfaces</h1>
  630. <h2 id="runtime-config">Runtime Config</h2>
  631. <h3 id="mergerfs-pseudo-file">.mergerfs pseudo file</h3>
  632. <div class="language-text highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a>&lt;mountpoint&gt;/.mergerfs
  633. </span></code></pre></div>
  634. <p>There is a pseudo file available at the mount point which allows for
  635. the runtime modification of certain <strong>mergerfs</strong> options. The file
  636. will not show up in <strong>readdir</strong> but can be <strong>stat</strong>'ed and manipulated
  637. via <a href="http://linux.die.net/man/2/listxattr">{list,get,set}xattrs</a>
  638. calls.</p>
  639. <p>Any changes made at runtime are <strong>not</strong> persisted. If you wish for
  640. values to persist they must be included as options wherever you
  641. configure the mounting of mergerfs (/etc/fstab).</p>
  642. <h4 id="keys">Keys</h4>
  643. <p>Use <code>getfattr -d /mountpoint/.mergerfs</code> or <code>xattr -l
  644. /mountpoint/.mergerfs</code> to see all supported keys. Some are
  645. informational and therefore read-only. <code>setxattr</code> will return EINVAL
  646. (invalid argument) on read-only keys.</p>
  647. <h4 id="values">Values</h4>
  648. <p>Same as the command line.</p>
  649. <h5 id="usermergerfsbranches">user.mergerfs.branches</h5>
  650. <p>Used to query or modify the list of branches. When modifying there are
  651. several shortcuts to easy manipulation of the list.</p>
  652. <table>
  653. <thead>
  654. <tr>
  655. <th>Value</th>
  656. <th>Description</th>
  657. </tr>
  658. </thead>
  659. <tbody>
  660. <tr>
  661. <td>[list]</td>
  662. <td>set</td>
  663. </tr>
  664. <tr>
  665. <td>+&lt;[list]</td>
  666. <td>prepend</td>
  667. </tr>
  668. <tr>
  669. <td>+&gt;[list]</td>
  670. <td>append</td>
  671. </tr>
  672. <tr>
  673. <td>-[list]</td>
  674. <td>remove all values provided</td>
  675. </tr>
  676. <tr>
  677. <td>-&lt;</td>
  678. <td>remove first in list</td>
  679. </tr>
  680. <tr>
  681. <td>-&gt;</td>
  682. <td>remove last in list</td>
  683. </tr>
  684. </tbody>
  685. </table>
  686. <p><code>xattr -w user.mergerfs.branches +&lt;/mnt/drive3 /mnt/pool/.mergerfs</code></p>
  687. <p>The <code>=NC</code>, <code>=RO</code>, <code>=RW</code> syntax works just as on the command line.</p>
  688. <h5 id="example">Example</h5>
  689. <div class="language-text highlight"><pre><span></span><code><span id="__span-1-1"><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a>[trapexit:/mnt/mergerfs] $ getfattr -d .mergerfs
  690. </span><span id="__span-1-2"><a id="__codelineno-1-2" name="__codelineno-1-2" href="#__codelineno-1-2"></a>user.mergerfs.branches=&quot;/mnt/a=RW:/mnt/b=RW&quot;
  691. </span><span id="__span-1-3"><a id="__codelineno-1-3" name="__codelineno-1-3" href="#__codelineno-1-3"></a>user.mergerfs.minfreespace=&quot;4294967295&quot;
  692. </span><span id="__span-1-4"><a id="__codelineno-1-4" name="__codelineno-1-4" href="#__codelineno-1-4"></a>user.mergerfs.moveonenospc=&quot;false&quot;
  693. </span><span id="__span-1-5"><a id="__codelineno-1-5" name="__codelineno-1-5" href="#__codelineno-1-5"></a>...
  694. </span><span id="__span-1-6"><a id="__codelineno-1-6" name="__codelineno-1-6" href="#__codelineno-1-6"></a>
  695. </span><span id="__span-1-7"><a id="__codelineno-1-7" name="__codelineno-1-7" href="#__codelineno-1-7"></a>[trapexit:/mnt/mergerfs] $ getfattr -n user.mergerfs.category.search .mergerfs
  696. </span><span id="__span-1-8"><a id="__codelineno-1-8" name="__codelineno-1-8" href="#__codelineno-1-8"></a>user.mergerfs.category.search=&quot;ff&quot;
  697. </span><span id="__span-1-9"><a id="__codelineno-1-9" name="__codelineno-1-9" href="#__codelineno-1-9"></a>
  698. </span><span id="__span-1-10"><a id="__codelineno-1-10" name="__codelineno-1-10" href="#__codelineno-1-10"></a>[trapexit:/mnt/mergerfs] $ setfattr -n user.mergerfs.category.search -v newest .mergerfs
  699. </span><span id="__span-1-11"><a id="__codelineno-1-11" name="__codelineno-1-11" href="#__codelineno-1-11"></a>[trapexit:/mnt/mergerfs] $ getfattr -n user.mergerfs.category.search .mergerfs
  700. </span><span id="__span-1-12"><a id="__codelineno-1-12" name="__codelineno-1-12" href="#__codelineno-1-12"></a>user.mergerfs.category.search=&quot;newest&quot;
  701. </span></code></pre></div>
  702. <h3 id="file-directory-xattrs">file / directory xattrs</h3>
  703. <p>While they won't show up when using <code>getfattr</code> <strong>mergerfs</strong> offers a
  704. number of special xattrs to query information about the files
  705. served. To access the values you will need to issue a
  706. <a href="http://linux.die.net/man/2/getxattr">getxattr</a> for one of the
  707. following:</p>
  708. <ul>
  709. <li><strong>user.mergerfs.basepath</strong>: the base mount point for the file given the current getattr policy</li>
  710. <li><strong>user.mergerfs.relpath</strong>: the relative path of the file from the perspective of the mount point</li>
  711. <li><strong>user.mergerfs.fullpath</strong>: the full path of the original file given the getattr policy</li>
  712. <li><strong>user.mergerfs.allpaths</strong>: a NUL ('\0') separated list of full paths to all files found</li>
  713. </ul>
  714. <h2 id="signals">Signals</h2>
  715. <ul>
  716. <li>USR1: This will cause mergerfs to send invalidation notifications to
  717. the kernel for all files. This will cause all unused files to be
  718. released from memory.</li>
  719. <li>USR2: Trigger a general cleanup of currently unused memory. A more
  720. thorough version of what happens every ~15 minutes.</li>
  721. </ul>
  722. <h2 id="ioctl">ioctl</h2>
  723. <p>Found in <code>fuse_ioctl.cpp</code>:</p>
  724. <div class="language-C++ highlight"><pre><span></span><code><span id="__span-2-1"><a id="__codelineno-2-1" name="__codelineno-2-1" href="#__codelineno-2-1"></a><span class="k">typedef</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">IOCTL_BUF</span><span class="p">[</span><span class="mi">4096</span><span class="p">];</span>
  725. </span><span id="__span-2-2"><a id="__codelineno-2-2" name="__codelineno-2-2" href="#__codelineno-2-2"></a><span class="cp">#define IOCTL_APP_TYPE 0xDF</span>
  726. </span><span id="__span-2-3"><a id="__codelineno-2-3" name="__codelineno-2-3" href="#__codelineno-2-3"></a><span class="cp">#define IOCTL_FILE_INFO _IOWR(IOCTL_APP_TYPE,0,IOCTL_BUF)</span>
  727. </span><span id="__span-2-4"><a id="__codelineno-2-4" name="__codelineno-2-4" href="#__codelineno-2-4"></a><span class="cp">#define IOCTL_GC _IO(IOCTL_APP_TYPE,1)</span>
  728. </span><span id="__span-2-5"><a id="__codelineno-2-5" name="__codelineno-2-5" href="#__codelineno-2-5"></a><span class="cp">#define IOCTL_GC1 _IO(IOCTL_APP_TYPE,2)</span>
  729. </span><span id="__span-2-6"><a id="__codelineno-2-6" name="__codelineno-2-6" href="#__codelineno-2-6"></a><span class="cp">#define IOCTL_INVALIDATE_ALL_NODES _IO(IOCTL_APP_TYPE,3)</span>
  730. </span></code></pre></div>
  731. <ul>
  732. <li>IOCTL_FILE_INFO: Same as the "file / directory xattrs" mentioned
  733. above. Use a buffer size of 4096 bytes. Pass in a string of
  734. "basepath", "relpath", "fullpath", or "allpaths". Receive details in
  735. same buffer.</li>
  736. <li>IOCTL_GC: Triggers a thorough garbage collection of excess
  737. memory. Same as SIGUSR2.</li>
  738. <li>IOCTL_GC1: Triggers a simple garbage collection of excess
  739. memory. Same as what happens every 15 minutes normally.</li>
  740. <li>IOCTL_INVALIDATE_ALL_NODES: Same as SIGUSR1. Send invalidation
  741. notifications to the kernel for all files causing unused files to be
  742. released from memory.</li>
  743. </ul>
  744. </article>
  745. </div>
  746. <script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
  747. </div>
  748. <button type="button" class="md-top md-icon" data-md-component="top" hidden>
  749. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8z"/></svg>
  750. Back to top
  751. </button>
  752. </main>
  753. <footer class="md-footer">
  754. <div class="md-footer-meta md-typeset">
  755. <div class="md-footer-meta__inner md-grid">
  756. <div class="md-copyright">
  757. Made with
  758. <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
  759. Material for MkDocs
  760. </a>
  761. </div>
  762. </div>
  763. </div>
  764. </footer>
  765. </div>
  766. <div class="md-dialog" data-md-component="dialog">
  767. <div class="md-dialog__inner md-typeset"></div>
  768. </div>
  769. <script id="__config" type="application/json">{"base": "..", "features": ["content.action.edit", "content.code.copy", "content.code.select", "navigation.instant", "navigation.instant.prefetch", "navigation.path", "navigation.top", "navigation.tracking", "optimize", "search.share", "toc.follow"], "search": "../assets/javascripts/workers/search.6ce7567c.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}}</script>
  770. <script src="../assets/javascripts/bundle.88dd0f4e.min.js"></script>
  771. </body>
  772. </html>