UnionFS: how to transfer overlay / uppercase changes to base / lowerdir filesystem?
Suppose you have the following scenario on Linux:
- Ext4 data partition set read-only:
data_ro
- Overlay section:
data_overlay
- Two of them are merged into UnionW:
mount -t overlayfs -o lowerdir=data_ro,upperdir=data_overlay overlayfs data
At some point in time, you need to save the changes from data_overlay
to data_ro
(obviously, the data_ro
R / W would be restarted in this case, and then the R / O would be reinstalled back).
How can I save changes to overlay / upperdir in base / lowerdir filesystem?
Is it compatible with going from overlay to base FS like the following sequence of commands?
umount data
mount -o remount,rw data_ro
mv -rf data_overlay data_ro
mount -o remount,ro data_ro
mount -t overlayfs -o lowerdir=data_ro,upperdir=data_overlay overlayfs data
+3
source to share
No one has answered this question yet
Check out similar questions: