I run a 3-node Kubernetes cluster on NixOS, with bcachefs as the primary storage pool.
Bcachefs handles auto re-replication, scrubbing, and integrated stats/notifications get sent to telegram (and eventually grafana).
An interesting issue came up. I noticed a few days ago that there was some data that had 1/1 even though the options are set to min 1 but desired 2. I tried bcachefs data rereplicate
but that did not seem to change anything.
Upon trying to boot the system and mount the FS, it seems to be failing because that replica isn't present?
Not sure why since all disks are present.
I guess there are 2 potential things going on: 1 rereplicate is not replicating all data to match desired options, and fsck fails if there are missing replicas (I think this is expected).
➜ ~ sudo bcachefs fsck -k /dev/nvme0n1
Running in-kernel offline fsck
bcachefs (27cac550-3836-765c-d107-51d27ab4a6e1): starting version 1.28: inode_has_case_insensitive opts=metadata_replicas=2,data_replicas=2,background_compression=zstd:15,foreground_target=cache.nvme1,background_target=hdd,promote_target=cache,degraded=yes,fsck,fix_errors=ask,noratelimit_errors,read_only
Kernel: Linux thinkpad 6.14.5 #1-NixOS SMP PREEMPT_DYNAMIC Fri May 2 06:02:16 UTC 2025 x86_64 GNU/Linux bcachefs version v1.25.2 (but when it runs, it finds extents with 1.20, even though I formatted with 1.25.2 tool chain)
Got asked multiple times for (y,n, or Y,N for all errors of this type) Y
=> captial Y didn't seem to be working? I got asked for each occurance after.
I have two volumes, a home directory and an extra data volume. Both use snapshots. dm-3 is home directory and dm-4 is the extra volume.
Bcachefs Read FUA Test Results - 2025-03-26 18:28:31.403309 | |
================================================== | |
Filesystem UUID: 27cac550-3836-765c-d107-51d27ab4a6e1 | |
-------------------------------------------------- | |
Device 0: | |
Device: nvme0n1 | |
Model: TEAM TM8FPD002T | |
Serial: TPBF2310170080202273 |
syntax enable | |
filetype plugin indent on | |
call plug#begin(stdpath("data") . '/plugged') | |
" The default plugin directory will be as follows: | |
" - Vim (Linux/macOS): '~/.vim/plugged' | |
" - Vim (Windows): '~/vimfiles/plugged' | |
" - Neovim (Linux/macOS/Windows): stdpath('data') . '/plugged' | |
" You can specify a custom plugin directory by passing it as the argument | |
" - e.g. `call plug#begin('~/.vim/plugged')` |
#!/usr/bin/env python3 | |
#Copyright 2022 Kyle Petryszak | |
# Exmple hook script for PVE guests (hookscript config option) | |
# You can set this via pct/qm with | |
# pct set <vmid> -hookscript <volume-id> | |
# qm set <vmid> -hookscript <volume-id> | |
# where <volume-id> has to be an executable file in the snippets folder | |
# of any storage with directories e.g.: | |
# qm set 100 -hookscript local:snippets/hookscript-pci.py |
#ifndef SAFE_QUEUE | |
#define SAFE_QUEUE | |
#include <queue> | |
#include <mutex> | |
#include <condition_variable> | |
// A threadsafe-queue. | |
template <class T> | |
class SafeQueue |
#!/usr/bin/env python3 | |
''' | |
The following link is where the majoity of the code is pulled from: | |
https://www.simplifiedpython.net/python-gui-login/ | |
''' | |
from tkinter import * | |
import os |