Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make /etc a separate dataset #73

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Make /etc a separate dataset
For ease of fixing mis-configurations and other events leading to potential system corruption, the /etc dir would benefit from being covered by their own unique snapshots so that any problems can be easily rolled back atomically without affecting the rest of the filesystem
  • Loading branch information
q5sys committed Jan 2, 2020
commit ebdc11258f0dea757aaa4f30f2ed87c94a632add
@@ -406,15 +406,15 @@ exit_err $? "Could not import the new pool at ${MNT}"
zfs mount ${ZPOOL}/ROOT/${INITBE}
exit_err $? "Count not mount the root ZFS dataset"

datasets="home:usr/home vlog:var/log vtmp:var/tmp docker:var/lib/docker"
datasets="home:usr/home vlog:var/log vtmp:var/tmp docker:var/lib/docker etc:etc"
for ds in ${datasets}
do
echo "Creating Dataset: ${ds}"
zfs create -o compression=lz4 -o mountpoint=/$(echo ${ds} | cut -d : -f 2) ${ZPOOL}/$(echo ${ds} | cut -d : -f 1)
exit_err $? "Could not create dataset: ${ds}"
done

dirs="boot/grub boot/efi dev etc proc run sys"
dirs="boot/grub boot/efi dev proc run sys"
for dir in ${dirs}
do
mkdir -p ${MNT}/${dir}