5 ms·
mount -t overlayfs -o lowerdir=$HOME,upperdir=/tmp/tmpHOME overlayfs $HOME
by dchichkov 14y ago
mount -t overlayfs -o lowerdir=$HOME,upperdir=/tmp/tmpHOME overlayfs $HOME
- jlgreco 14y agoWhat is the purpose of this?
- dchichkov 14y agoVery useful, if you want to make a checkpoint (possibly for /), break things and then get back to the original state. If you'd do that for / , your own system would start behaving, like a system booted from LiveCD. And, after reboot, would return to the origanal state. Overlayfs is pretty cool actually. Allows you to overlay a lower directory with some other upper directory and mount the result somewhere. All the changes that you are making in the mounted directory would be visible to you, and would be stored in the upper directory. In the example above, after running this command, content of your $HOME would stop changing. But you still will be able to change it, with all the changed content going into tmpHome.
- dchichkov 14y agoAnd you can also use it on EC2, to reduce costs of EBS I/O.