Difference between revisions of "Overlay file system linux"
From Teknologisk videncenter
m |
m |
||
Line 1: | Line 1: | ||
+ | <source lang=bash> | ||
+ | #/usr/bin/env bash | ||
+ | mkdir lowerdir # Common fs | ||
+ | mkdir upper1 work1 merged1 # Instance 1 fs | ||
+ | mkdir upper2 work2 merged2 # Instance 2 fs | ||
+ | mount -t overlay overlay -o lowerdir=./lower,upperdir=./upper1,workdir=./work1 /home/debian/overlay/merged1 | ||
+ | mount -t overlay overlay -o lowerdir=./lower,upperdir=./upper2,workdir=./work2 /home/debian/overlay/merged2 | ||
+ | </source> | ||
=Links= | =Links= | ||
*[https://www.kernel.org/doc/html/latest/filesystems/overlayfs.html The Linux Kernel Documentation - Overlay Filesystem] | *[https://www.kernel.org/doc/html/latest/filesystems/overlayfs.html The Linux Kernel Documentation - Overlay Filesystem] |
Revision as of 04:58, 16 September 2024
#/usr/bin/env bash
mkdir lowerdir # Common fs
mkdir upper1 work1 merged1 # Instance 1 fs
mkdir upper2 work2 merged2 # Instance 2 fs
mount -t overlay overlay -o lowerdir=./lower,upperdir=./upper1,workdir=./work1 /home/debian/overlay/merged1
mount -t overlay overlay -o lowerdir=./lower,upperdir=./upper2,workdir=./work2 /home/debian/overlay/merged2