Comments (2)
Looked into this a bit more and realized it's not deleting anything.
~/tester
❯ tree -a
.
├── a
│ └── test.txt
└── b
3 directories, 1 file
~/tester
❯ sudo mount -v -o bind ./b ./a
mount: /home/will/tester/b bound on /home/will/tester/a.
~/tester
❯ tree -a
.
├── a
└── b
3 directories, 0 files
~/tester
❯ sudo umount ./a
~/tester
❯ tree -a
.
├── a
│ └── test.txt
└── b
3 directories, 1 file
When using bind mount (mount -o bind
) a directory (./b
) to another directory
(./a
), the contents of ./a
are "hidden", and instead, the contents of ./b
become visible within ./a
.
In my case, tmpfs root, the data is actually only lost when rebooting.
I still think there should be an error message though. Perhaps a check can be added to create-directories.bash
?
Perhaps a more robust solution would be to move the data into /tmp and then back after mounting?
from impermanence.
Yes please. The current behavior of silently bind mounting is not convenient or obvious.
Apparently, there's a project that automates persisting: https://github.com/Geometer1729/persist-retro . I think this is not the best approach, and we should just throw an error if the directory is detected. The reason for that is there might be running processes that are working on the folder already. Unless we can figure out a heuristic that helps us not break running processes while moving the contents, we shouldn't do that.
from impermanence.
Related Issues (20)
- Can't rebuild system - getting attributes of path: Permission denied HOT 6
- nixos: Files mounted before fstab mounts (directories) HOT 2
- feature request: add wildcard matching HOT 3
- Any good way to handle `/etc/localtime`? (Or: "How to persist symlinks as symlinks?") HOT 2
- Fails with mkdir: cannot create directory: No such file or directory HOT 1
- Add `/etc/nixos/*.nix` to the example ?
- Regression after using escapeSystemdPath HOT 3
- `user.*.directories` assertion is displaying incorrectly`
- Issues with bindfs: no entry in /etc/mtab HOT 1
- Persisting Steam breaks any game within it and also fails shutdown HOT 4
- Boot does not revoke chmod permissions HOT 1
- [REQUEST] Declare `something.impermanence.enable` option for integration with other modules and easy way to disable impermanence HOT 1
- `nixos-rebuild` fails due to the symlink, Impermanence created
- Best practice to split configuration HOT 1
- missing `x-gvfs-hidein` in mount
- Strategies to deal with `renameat(3)` on persisted files HOT 1
- Infinite recursion error when persisting anything in /var/ HOT 1
- Symlinks created via the home-manager module are broken HOT 1
- The importance of persisting `/var/lib/nixos` is not documented HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from impermanence.