mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 21:35:45 +02:00
Add new options MOUNT_OPTIONS
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com> [trailing whitespace deleted] Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
parent
081a6af278
commit
13abf8aada
@ -18,6 +18,9 @@ UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
|
|||||||
## Options to apply, see `beesd --help` for details
|
## Options to apply, see `beesd --help` for details
|
||||||
# OPTIONS="--strip-paths --no-timestamps"
|
# OPTIONS="--strip-paths --no-timestamps"
|
||||||
|
|
||||||
|
## Mount options
|
||||||
|
# MOUNT_OPTIONS=""
|
||||||
|
|
||||||
## Bees DB size
|
## Bees DB size
|
||||||
# Hash Table Sizing
|
# Hash Table Sizing
|
||||||
# sHash table entries are 16 bytes each
|
# sHash table entries are 16 bytes each
|
||||||
|
@ -91,6 +91,7 @@ MNT_DIR="${MNT_DIR:-$WORK_DIR/mnt/$UUID}"
|
|||||||
BEESHOME="${BEESHOME:-$MNT_DIR/.beeshome}"
|
BEESHOME="${BEESHOME:-$MNT_DIR/.beeshome}"
|
||||||
BEESSTATUS="${BEESSTATUS:-$WORK_DIR/$UUID.status}"
|
BEESSTATUS="${BEESSTATUS:-$WORK_DIR/$UUID.status}"
|
||||||
DB_SIZE="${DB_SIZE:-$((8192*AL128K))}"
|
DB_SIZE="${DB_SIZE:-$((8192*AL128K))}"
|
||||||
|
MOUNT_OPTIONS="${MOUNT_OPTIONS-}"
|
||||||
|
|
||||||
INFO "Check: Disk exists"
|
INFO "Check: Disk exists"
|
||||||
if [ ! -b "/dev/disk/by-uuid/$UUID" ]; then
|
if [ ! -b "/dev/disk/by-uuid/$UUID" ]; then
|
||||||
@ -114,7 +115,7 @@ umount_w(){ mountpoint -q "$1" && umount -l "$1"; }
|
|||||||
force_umount(){ umount_w "$MNT_DIR"; }
|
force_umount(){ umount_w "$MNT_DIR"; }
|
||||||
trap force_umount SIGINT SIGTERM EXIT
|
trap force_umount SIGINT SIGTERM EXIT
|
||||||
|
|
||||||
mount -osubvolid=5 /dev/disk/by-uuid/$UUID "$MNT_DIR" || exit 1
|
mount -osubvolid=5 -o "$MOUNT_OPTIONS" /dev/disk/by-uuid/$UUID "$MNT_DIR" || exit 1
|
||||||
|
|
||||||
if [ ! -d "$BEESHOME" ]; then
|
if [ ! -d "$BEESHOME" ]; then
|
||||||
INFO "Create subvol $BEESHOME for store bees data"
|
INFO "Create subvol $BEESHOME for store bees data"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user