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

beesd script can't handle BEESHOME on a non-btrfs filesystem #272

Open
nitroxis opened this issue Dec 26, 2023 · 4 comments
Open

beesd script can't handle BEESHOME on a non-btrfs filesystem #272

nitroxis opened this issue Dec 26, 2023 · 4 comments

Comments

@nitroxis
Copy link

nitroxis commented Dec 26, 2023

Hi,

currently, the beesd helper script always tries to create $BEESHOME as a subvolume (or checks whether it is one). However, it should be fine to have $BEESHOME set to e.g. a ext4 root partition, while bees is deduping a separate btrfs HDD, or am I mistaken? The docs seem to support this assumption

@nitroxis
Copy link
Author

nitroxis commented Dec 26, 2023

Proposal for changing the check:

BEESHOME_FSTYPE=$(stat -f -c %T "$BEESHOME")
if [ "$BEESHOME_FSTYPE" = "btrfs" ]; then
    if [ ! -d "$BEESHOME" ]; then
        INFO "Create subvol $BEESHOME for store bees data"
        btrfs sub cre "$BEESHOME"
    else
        btrfs sub show "$BEESHOME" &> /dev/null || ERRO "$BEESHOME MUST BE A SUBVOL!"
    fi
else
    mkdir -p "$BEESHOME"
fi

@kakra
Copy link
Contributor

kakra commented Dec 27, 2023

Yeah, it should be completely fine running the hash file on non-btrfs filesystems. I'm running it the same way here - actually by NOT using the beesd wrapper. Maybe create a PR so it gets merged.

@Connor22
Copy link

Connor22 commented Feb 4, 2024

Adding onto the script change, I also needed to make sure that the script had access to the volume (such as adding
ReadWritePaths=/var/.beeshome underneath the [service] header of the systemd service file) to get it working

@kakra
Copy link
Contributor

kakra commented Apr 22, 2024

If you are using customized configs (like a beeshome path differing from defaults), you should create a systemd override file instead to add the needed configs to the service. You can use systemctl edit [email protected] (or whatever your service is called) to create per-service or even per-instance settings. This way, your individual customizations won't be overwritten by updates.

I'm pretty sure /var/.beeshome is a non-default setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants