From 69c3d99552dfedb61814653d90f587331658e46e Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Sat, 4 Sep 2021 15:56:39 +1000 Subject: [PATCH] Rm MOUNT_OPTIONS for it is of no use and dangerous Btrfs mount options effects all mount points using the same Btrfs partition, so specifing it per-mount is useless. Also, common mount options like `noatime,nosuid,nodev,noexec` has little to no effect on beesd, so it's just better and simpler to remove this. Signed-off-by: Jiahao XU --- scripts/beesd.conf.sample | 3 --- scripts/beesd.in | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/beesd.conf.sample b/scripts/beesd.conf.sample index f0304ce..845be86 100644 --- a/scripts/beesd.conf.sample +++ b/scripts/beesd.conf.sample @@ -18,9 +18,6 @@ UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx ## Options to apply, see `beesd --help` for details # OPTIONS="--strip-paths --no-timestamps" -## Mount options -# MOUNT_OPTIONS="" - ## Bees DB size # Hash Table Sizing # sHash table entries are 16 bytes each diff --git a/scripts/beesd.in b/scripts/beesd.in index 83350b5..c6bfc4b 100755 --- a/scripts/beesd.in +++ b/scripts/beesd.in @@ -91,7 +91,6 @@ MNT_DIR="${MNT_DIR:-$WORK_DIR/mnt/$UUID}" BEESHOME="${BEESHOME:-$MNT_DIR/.beeshome}" BEESSTATUS="${BEESSTATUS:-$WORK_DIR/$UUID.status}" DB_SIZE="${DB_SIZE:-$((8192*AL128K))}" -MOUNT_OPTIONS="${MOUNT_OPTIONS:-noatime,nodev,noexec,nosuid}" INFO "Check: Disk exists" if [ ! -b "/dev/disk/by-uuid/$UUID" ]; then @@ -111,7 +110,7 @@ mkdir -p "$WORK_DIR" || exit 1 INFO "MOUNT DIR: $MNT_DIR" mkdir -p "$MNT_DIR" || exit 1 -mount --make-private -osubvolid=5 -o "$MOUNT_OPTIONS" /dev/disk/by-uuid/$UUID "$MNT_DIR" || exit 1 +mount --make-private -osubvolid=5 /dev/disk/by-uuid/$UUID "$MNT_DIR" || exit 1 if [ ! -d "$BEESHOME" ]; then INFO "Create subvol $BEESHOME for store bees data"