如果我想在 LVM 中使用哪些命令:
之前使用过 btrfs,我惊讶地发现在 ZFS 中回滚快照不仅会更改文件的 \xe2\x80\x9cworking set\xe2\x80\x9d,而且还要求任何比回滚更新的快照目标也必须被摧毁:
\n zfs rollback [-Rfr] snapshot\n Roll back the given dataset to a previous snapshot. When a dataset is rolled back, all\n data that has changed since the snapshot is discarded, and the dataset reverts to the\n state at the time of the snapshot. By default, the command refuses to roll back to a\n snapshot other than the most recent one. In order to do so, all intermediate snapshots\n and bookmarks must be …
Run Code Online (Sandbox Code Playgroud) 据我所知,btrfs subvolume snapshot
默认情况下,由制作的快照是可写的,并且在 btrfs 卷挂载点下的某个路径上可见。
如何设置系统,以便在系统正常运行期间保证不向快照写入任何内容?但是不要让它对用户不可见(即,它应该保持可供任何用户阅读的访问权限)。
(目前,我只是chmod og-rwx /.snapshots
我的快照映射到的位置。但这并不能满足我的第二个愿望,而且保证也不够强大:具有 root 权限的进程可能会破坏那里的某些东西。)
是否需要做一些技巧mount
来实现这一目标?