Skip to content

Commit

Permalink
DLPX-86523 CIS: /home filesystem and mount options
Browse files Browse the repository at this point in the history
  • Loading branch information
ShibasishDelphix committed Aug 8, 2023
1 parent c30d05d commit 1b14267
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions live-build/config/hooks/vm-artifacts/90-raw-disk-image.binary
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ zfs create \
# these mounts.
#
mkdir -p "$DIRECTORY/export/home"
mount -t zfs "$FSNAME/ROOT/$FSNAME/home" "$DIRECTORY/export/home"
mount -t zfs "$FSNAME/ROOT/$FSNAME/home" "$DIRECTORY/home"

mkdir -p "$DIRECTORY/var/delphix"
mount -t zfs "$FSNAME/ROOT/$FSNAME/data" "$DIRECTORY/var/delphix"
Expand Down Expand Up @@ -292,7 +292,7 @@ rsync --info=stats3 -Wa binary/* "$DIRECTORY/"
# automatically whenever we boot into the crash kernel.
#
cat <<-EOF >"$DIRECTORY/etc/fstab"
rpool/ROOT/$FSNAME/home /export/home zfs defaults,x-systemd.before=zfs-import-cache.service 0 0
rpool/ROOT/$FSNAME/home /home zfs defaults,x-systemd.before=zfs-import-cache.service nodev 0 0
rpool/ROOT/$FSNAME/data /var/delphix zfs defaults,x-systemd.before=zfs-import-cache.service 0 0
rpool/ROOT/$FSNAME/log /var/log zfs defaults,x-systemd.before=zfs-import-cache.service 0 0
rpool/crashdump /var/crash zfs defaults,x-systemd.before=zfs-import-cache.service,x-systemd.before=kdump-tools.service 0 0
Expand Down Expand Up @@ -335,8 +335,10 @@ done

umount "$DIRECTORY/var/log"
umount "$DIRECTORY/var/delphix"
umount "$DIRECTORY/export/home"
umount "$DIRECTORY/home"
umount "/var/crash"
retry 5 10 zfs umount "$FSNAME/ROOT/$FSNAME/root"
retry 5 10 zpool export "$FSNAME"
kpartx -d "$ARTIFACT_NAME.img"

ln -s /export/home /home

0 comments on commit 1b14267

Please sign in to comment.