@@ -240,12 +240,11 @@ Mount options:
240
240
Redirects are enabled.
241
241
- "redirect_dir=follow":
242
242
Redirects are not created, but followed.
243
- - "redirect_dir=off":
244
- Redirects are not created and only followed if "redirect_always_follow"
245
- feature is enabled in the kernel/module config.
246
243
- "redirect_dir=nofollow":
247
- Redirects are not created and not followed (equivalent to "redirect_dir=off"
248
- if "redirect_always_follow" feature is not enabled).
244
+ Redirects are not created and not followed.
245
+ - "redirect_dir=off":
246
+ If "redirect_always_follow" is enabled in the kernel/module config,
247
+ this "off" traslates to "follow", otherwise it translates to "nofollow".
249
248
250
249
When the NFS export feature is enabled, every copied up directory is
251
250
indexed by the file handle of the lower inode and a file handle of the
@@ -349,6 +348,19 @@ The specified lower directories will be stacked beginning from the
349
348
rightmost one and going left. In the above example lower1 will be the
350
349
top, lower2 the middle and lower3 the bottom layer.
351
350
351
+ Note: directory names containing colons can be provided as lower layer by
352
+ escaping the colons with a single backslash. For example:
353
+
354
+ mount -t overlay overlay -olowerdir=/a\: lower\:\: dir /merged
355
+
356
+ Since kernel version v6.8, directory names containing colons can also
357
+ be configured as lower layer using the "lowerdir+" mount options and the
358
+ fsconfig syscall from new mount api. For example:
359
+
360
+ fsconfig(fs_fd, FSCONFIG_SET_STRING, "lowerdir+", "/a:lower: :dir", 0);
361
+
362
+ In the latter case, colons in lower layer directory names will be escaped
363
+ as an octal characters (\0 72) when displayed in /proc/self/mountinfo.
352
364
353
365
Metadata only copy up
354
366
---------------------
@@ -414,6 +426,16 @@ Only the data of the files in the "data-only" lower layers may be visible
414
426
when a "metacopy" file in one of the lower layers above it, has a "redirect"
415
427
to the absolute path of the "lower data" file in the "data-only" lower layer.
416
428
429
+ Since kernel version v6.8, "data-only" lower layers can also be added using
430
+ the "datadir+" mount options and the fsconfig syscall from new mount api.
431
+ For example:
432
+
433
+ fsconfig(fs_fd, FSCONFIG_SET_STRING, "lowerdir+", "/l1", 0);
434
+ fsconfig(fs_fd, FSCONFIG_SET_STRING, "lowerdir+", "/l2", 0);
435
+ fsconfig(fs_fd, FSCONFIG_SET_STRING, "lowerdir+", "/l3", 0);
436
+ fsconfig(fs_fd, FSCONFIG_SET_STRING, "datadir+", "/do1", 0);
437
+ fsconfig(fs_fd, FSCONFIG_SET_STRING, "datadir+", "/do2", 0);
438
+
417
439
418
440
fs-verity support
419
441
----------------------
@@ -542,6 +564,9 @@ b) If a file residing on a lower layer is opened for read-only and then
542
564
memory mapped with MAP_SHARED, then subsequent changes to the file are not
543
565
reflected in the memory mapping.
544
566
567
+ c) If a file residing on a lower layer is being executed, then opening that
568
+ file for write or truncating the file will not be denied with ETXTBSY.
569
+
545
570
The following options allow overlayfs to act more like a standards
546
571
compliant filesystem:
547
572
@@ -688,6 +713,31 @@ can be useful in case the underlying disk is copied and the UUID of this copy
688
713
is changed. This is only applicable if all lower/upper/work directories are on
689
714
the same filesystem, otherwise it will fallback to normal behaviour.
690
715
716
+
717
+ UUID and fsid
718
+ -------------
719
+
720
+ The UUID of overlayfs instance itself and the fsid reported by statfs(2) are
721
+ controlled by the "uuid" mount option, which supports these values:
722
+
723
+ - "null":
724
+ UUID of overlayfs is null. fsid is taken from upper most filesystem.
725
+ - "off":
726
+ UUID of overlayfs is null. fsid is taken from upper most filesystem.
727
+ UUID of underlying layers is ignored.
728
+ - "on":
729
+ UUID of overlayfs is generated and used to report a unique fsid.
730
+ UUID is stored in xattr "trusted.overlay.uuid", making overlayfs fsid
731
+ unique and persistent. This option requires an overlayfs with upper
732
+ filesystem that supports xattrs.
733
+ - "auto": (default)
734
+ UUID is taken from xattr "trusted.overlay.uuid" if it exists.
735
+ Upgrade to "uuid=on" on first time mount of new overlay filesystem that
736
+ meets the prerequites.
737
+ Downgrade to "uuid=null" for existing overlay filesystems that were never
738
+ mounted with "uuid=on".
739
+
740
+
691
741
Volatile mount
692
742
--------------
693
743
0 commit comments