Skip to content

Commit

Permalink
Auto deploy from GitHub Actions build 456
Browse files Browse the repository at this point in the history
[10f1bcd] iBug: pve: Add virtiofs setup
  • Loading branch information
web-flow authored Aug 14, 2024
1 parent 1858e42 commit 5bb963f
Show file tree
Hide file tree
Showing 5 changed files with 212 additions and 103 deletions.
35 changes: 35 additions & 0 deletions assets/pve/mirrorlog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/sh

if [ $# -ne 2 ]; then
echo "Need exactly 2 arguments" >&2
exit 1
fi

VMID="$1"
PHASE="$2"

[ "$VMID" -eq 230 ] || exit 0

NAME=virtiofsd-230
SOCKPATH="/run/$NAME.sock"

case "$PHASE" in
pre-start)
systemctl stop "$NAME".service
rm -f "$SOCKPATH" "$SOCKPATH".pid

systemd-run \
--collect \
--unit="$NAME" \
/usr/libexec/virtiofsd \
--syslog \
--socket-path "$SOCKPATH" \
--shared-dir /mnt/mirrorlog \
--announce-submounts \
--inode-file-handles=mandatory
;;
pre-stop) ;;
post-start) ;;
post-stop) ;;
*) echo "Unknown phase $PHASE" >&2; exit 1;;
esac
Loading

0 comments on commit 5bb963f

Please sign in to comment.